WPML

Overview of the Issue

When using All in One SEO and WPML with the Adjust IDs for multilingual functionality option enabled (found on the WPMLLanguages page), the category-sitemap.xml file will have duplicated categories in the default language. Categories from secondary languages are not displayed.

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

A permenent fix is required in All in One SEO’s codebase, but you can use a workaround for this issue in the meantime by following these steps:

  1. Open the wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Query.php file
  2. Search for the terms method (around line 227)
  3. Add the following workaround to the beginning of the method:
    public function terms( $taxonomy, $additionalArgs = [] ) {
    
    //WPML workaround
    if (class_exists('SitePress')) {
    global $sitepress_settings;
    // Before building the sitemap and as we are on front-end make sure links aren't translated.
    // The setting should not be updated in DB.
    $sitepress_settings['auto_adjust_ids'] = 0;
    }
  4. Open the category-sitemap.xml file (yourwebsite.com/category-sitemap.xml) and refresh the page

Next Steps

We’ve already let the AIOSEO team know about this issue, and we’re sure they will get it resolved quickly. If you want to check in on progress, you can reach them via their support forum (opens in a new tab).

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.

Ask a support question

All known issues