I'm started to translate a site made with Toolset and after I installed and configured WPML everything is working in default language, which is Russian, except for one custom category archive (the slug is 'goods-categories') for a custom post type 'goods'.
Here is a link to one of the category archive pages: hidden link. It shows 'Nothing found' which Views template shows if query returns no items. Debug bar also shows the following error:
Unknown column 't.language_code' in 'where clause'
SELECT SQL_CALC_FOUND_ROWS yms_posts.ID FROM yms_posts INNER JOIN yms_term_relationships ON (yms_posts.ID = yms_term_relationships.object_id) LEFT JOIN yms_posts AS p2 ON (yms_posts.post_parent = p2.ID) WHERE 1=1 AND (
yms_term_relationships.term_taxonomy_id IN (13)
) AND yms_posts.post_type = 'goods' AND (((yms_posts.post_status = 'publish' OR yms_posts.post_status = 'private') OR (yms_posts.post_status = 'inherit' AND (p2.post_status = 'publish' OR p2.post_status = 'private')))) AND ( ( t.language_code = 'ru' AND yms_posts.post_type IN ('post','page','apto_sort','wpcf7_contact_form','sobytiya-reteila','goods' ) ) OR yms_posts.post_type NOT IN ('post','page','apto_sort','wpcf7_contact_form','sobytiya-reteila','goods' ) ) GROUP BY yms_posts.ID ORDER BY yms_posts.post_date DESC LIMIT 0, 20
If I disable WPML, the archive page shows properly.
It's interesting that this custom post type has a second category, 'Producers', and this page is shown properly: hidden link
From the error message it seems that a language code get messed up somewhere in DB tables and this prevents archive view from showing properly. Could you please help me to solve this? It is very important for me.
Because fzs-union.ru is a production site, I turned WPML off there to make things working and created a copy of it at hidden link.
The link to a category archive (goods-categories) that is not working is now hidden link
The category archive page that is working (producers) is hidden link
If you need, I can provide you a full access to this site.
A very nice catch, Nigel!
Looks like your finding helped to solve the problem completely. The site seems to be working properly now. Don't know why there was this '$taxonomy', but looks like it was causing a wrong behavior. Thank you for your help in fixing this! Excellent job!