Hi Jan,
thanks for your advice.
I managed to "fix" it: When I turn on the option "Search Custom Fields" the error disappears. However I had only one Custom Field which was there for testing purposes, then removed it, deactivated the option and the error is coming again.
So as long as I have it activated the search seems to function normally - which is fine for me.
However I still installed n3t Debug; the SQL of the error is the following:
Code: Select all
SELECT a.id, a.image, a.unit_amount, a.unit_unit, a.sku, a.ean, a.upc, a.type, a.points_received, a.price_original, a.stock, a.stock_calculation, a.min_quantity, a.min_multiple_quantity, a.stockstatus_a_id, a.stockstatus_n_id, a.date, a.sales, a.featured, a.external_id, a.external_link, a.external_text, a.price, a.gift_types, m.id as manufacturerid, a.title AS title, a.alias AS alias, a.description AS description, m.title AS manufacturertitle, m.alias AS manufactureralias, (SELECT im.image FROM ke6sw_phocacart_product_images im WHERE im.product_id = a.id ORDER BY im.ordering LIMIT 1) as additional_image, GROUP_CONCAT(DISTINCT c.id) AS catid, GROUP_CONCAT(DISTINCT c.title) AS cattitle, GROUP_CONCAT(DISTINCT c.alias) AS catalias, a.catid AS preferred_catid, t.id as taxid, t.tax_rate as taxrate, t.calculation_type as taxcalculationtype, t.title AS taxtitle, t.tax_hide as taxhide, at.required AS attribute_required, MIN(ppg.price) as group_price, MAX(pptg.points_received) as group_points_received, AVG(r.rating) AS rating FROM ke6sw_phocacart_products AS a LEFT JOIN ke6sw_phocacart_product_categories AS pc ON pc.product_id = a.id LEFT JOIN ke6sw_phocacart_categories AS c ON c.id = pc.category_id LEFT JOIN ke6sw_phocacart_manufacturers AS m ON m.id = a.manufacturer_id LEFT JOIN ke6sw_phocacart_attributes AS at ON a.id = at.product_id AND at.id > 0 AND at.required = 1 LEFT JOIN ke6sw_phocacart_item_groups AS ga ON a.id = ga.item_id AND ga.type = 3 LEFT JOIN ke6sw_phocacart_item_groups AS gc ON c.id = gc.item_id AND gc.type = 2 LEFT JOIN ke6sw_phocacart_reviews AS r ON a.id = r.product_id AND r.id > 0 LEFT JOIN ke6sw_phocacart_taxes AS t ON t.id = a.tax_id LEFT JOIN ke6sw_phocacart_product_price_groups AS ppg ON a.id = ppg.product_id AND ppg.group_id IN (SELECT group_id FROM ke6sw_phocacart_item_groups WHERE item_id = a.id AND group_id IN (1) AND type = 3) LEFT JOIN ke6sw_phocacart_product_point_groups AS pptg ON a.id = pptg.product_id AND pptg.group_id IN (SELECT group_id FROM ke6sw_phocacart_item_groups WHERE item_id = a.id AND group_id IN (1) AND type = 3) WHERE a.published = 1 AND c.published = 1 AND c.type IN (0, 1) AND c.access IN (1, 5) AND a.access IN (1, 5) AND (ga.group_id IN (1) OR ga.group_id IS NULL) AND (gc.group_id IN (1) OR gc.group_id IS NULL) AND (((a.title LIKE '%metall%' OR a.alias LIKE '%metall%' OR a.title_long LIKE '%metall%' OR a.metatitle LIKE '%metall%' OR a.metakey LIKE '%metall%' OR a.metadesc LIKE '%metall%' OR a.description LIKE '%metall%' OR a.sku LIKE '%metall%' OR a.ean LIKE '%metall%' OR ps.sku LIKE '%metall%' OR ps.ean LIKE '%metall%'))) GROUP BY a.id ORDER BY pc.ordering ASC LIMIT 9
It seems that the ps alias of ps.sku never gets defined - so it throws an error.
When I activate the option "Search Custom Fields" the ps alias gets defined:
Code: Select all
LEFT JOIN ke6sw_phocacart_product_stock AS ps ON a.id = ps.product_id
and there's no problem, the rest of the SQL looks the same.
I also checked my database, the column sku is in #__phocacart_product_stock.
Do you have any idea why my system behaves like that?
I also setup a test system, where the search just functions normally without having Seach Custom Fields activated, so I still wondern why.
Best regards and thanks in advance
Marco