Jump to content

Unknown column 'pt.id_lang' in 'where clause'


lowergear

Recommended Posts

Get this error message when trying to save any change in a product.  Despite the message, the change does seem to go through, although I cannot now import any data into the products.

 

Unknown column 'pt.id_lang' in 'where clause'

REPLACE INTO `ps_tag_count` (id_group, id_tag, id_lang, id_shop, counter)
            SELECT cg.id_group, t.id_tag, t.id_lang, ps.id_shop, COUNT(pt.id_tag) AS times
                FROM `ps_product_tag` pt
                LEFT JOIN `ps_tag` t ON (t.id_tag = pt.id_tag)
                LEFT JOIN `ps_product` p ON (p.id_product = pt.id_product)
                INNER JOIN `ps_product_shop` product_shop
                    ON (product_shop.id_product = p.id_product)
                JOIN (SELECT DISTINCT id_group FROM `ps_category_group`) cg
                JOIN (SELECT DISTINCT id_shop FROM `ps_shop`) ps
                WHERE pt.`id_lang` = 1 AND product_shop.`active` = 1
                AND EXISTS(SELECT 1 FROM `ps_category_product` cp
                                LEFT JOIN `ps_category_group` cgo ON (cp.`id_category` = cgo.`id_category`)
                                WHERE cgo.`id_group` = cg.id_group AND p.`id_product` = cp.`id_product`)
                AND product_shop.id_shop = ps.id_shop
                GROUP BY pt.id_tag, cg.id_group

 

I saw a similar posted topic that suggested the problem was the field "id_lang" doesn't appear in the table "ps_tag_count". However, using SQL Manager, I see these fields for that table:

 

LIST OF ATTRIBUTES FOR THIS MYSQL TABLE
Attribute Type Action id_group int(10) unsigned Add attribute to SQL query id_tag int(10) unsigned Add attribute to SQL query id_lang int(10) unsigned Add attribute to SQL query id_shop int(11) unsigned Add attribute to SQL query counter int(10) unsigned

 

Using 1.6.1.1.  No recent upgrade or changes I can think of that would have caused this to start happening.  Anyone have a suggestion?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...