Hello @waldub
In order to show only translated categories, please go to your WPML Settings > Taxonomy Translations and set Categories as Translatable only show translated items – https://wpml.org/documentation/getting-started-guide/translating-post-categories-and-custom-taxonomies/#setting-taxonomy-terms-to-be-translatable. Default language Sitemap includes records from all languages when Translation Settings are set up as Not Translatable or Partly Translatable.
Also, all Category links are opening correctly. Could you please clarify the issue with “incorrectly displayed links”?
Best regards
Thread Starter
mupic
(@waldub)
We have it set to “only show translated items”. So I understand correctly that this is not the normal behavior of outputting items? If yes, and it is not a problem from your side, then we will look into it. Thank you very much for your help.
In this case, we will check this issue asap. I will respond in this thread about the progress of the work.
Best regards
Hello @waldub
We couldn’t simulate your case in our testing environment. Category Sitemap is showing only current language categories for us. How can we debug your website? We need to debug SQL Queries and check your Sitemap Settings (https://wpgrim.com/docs/google-xml-sitemaps-generator/general/settings/) in order to find the problem.
Best regards
Hello @waldub
We have improved WPML Compatibility and fixed Category Sitemap issue with latest version 1.9.11. Please update your plugin and this issue should be fixed.
Best regards
Thread Starter
mupic
(@waldub)
SELECT terms.*, term_taxonomy.taxonomy, term_taxonomy.count, (
SELECT MAX(p.post_modified)
FROM logic_posts AS p
INNER JOIN logic_term_relationships AS tr ON p.ID = tr.object_id
WHERE p.post_type IN ('post','theme_wiki')
AND p.post_status = 'publish'
AND tr.term_taxonomy_id = term_taxonomy.term_taxonomy_id
) AS post_modified
FROM logic_terms AS terms
INNER JOIN logic_term_taxonomy AS term_taxonomy ON terms.term_id = term_taxonomy.term_id
INNER JOIN logic_icl_translations AS translations ON term_taxonomy.term_taxonomy_id = translations.element_id
WHERE translations.language_code = 'de' AND translations.element_type IN ('tax_category','tax_post_tag','tax_wiki_archive')
AND term_taxonomy.taxonomy IN ('category','post_tag','wiki_archive')
AND term_taxonomy.count > 0
GROUP BY terms.term_id
ORDER BY post_modified DESC, terms.name ASC
LIMIT 0, 1000;
You have a query error here. You are comparing the wrong id, because element_id is the translation id, not the taxonomy id.
I ran this query manually and it gave the correct result.
Hello @waldub
We implemented your changes and released an update. Please check if everything is okay.
Thank you for helping us improve our plugin 🙂
Thread Starter
mupic
(@waldub)
Thanks a lot, it’s working now 🙂