Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

All in one SEO sitemap display the same slug based on language in the sitemap.

Solution:

The issue should be fixed with the latest All in one SEO plugin version. Please check with plugin support https://wordpress.org/plugins/all-in-one-seo-pack/.

Workaround used:
- in wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Content.php replace line 220-222:

$location = is_home()
                ? apply_filters( 'wpml_home_url', get_option( 'home' ) )
                : apply_filters( 'wpml_permalink', $permalink, $translation->language_code );

- Replace it with

$location = is_home()
            ? apply_filters( 'wpml_home_url', get_option( 'home' ) )
            : apply_filters( 'wpml_permalink', $entry['loc'], $translation->language_code, true );

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 9 replies, has 2 voices.

Last updated by Dražen Duvnjak 3 years, 2 months ago.

Assisted by: Dražen Duvnjak.

Author Posts
September 14, 2021 at 12:41 pm #9584015

Webest

I have a site hidden link for polish version and hidden link and hidden link for English and German versions.

September 15, 2021 at 6:31 am #9589281

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for the patience, I will be taking over and helping you further.

1) In order to expedite handling your support requests, can you please share WPML support debug information from your site.

- To give debug information, login to your site and go to WPML → Support. From there click on the “debug information” link at the bottom of the page.
- Once on the “debug information” page, select the entire content of the text box and copy it.
- Now go back to our support forum, find debug information box and paste it.

More information on the link: https://wpml.org/faq/provide-debug-information-faster-support/

2 ) Can you please go to the WPML → Languages page and disable/uncheck Adjust IDs for the multilingual functionality option if enabled for you.

Then go to the All in one SEO sitemap option, disable it and save, enable it again and save. Check the sitemap and if the issue still happens.

Let me know how it goes.

Thanks,
Drazen

September 15, 2021 at 10:14 am #9591373

Webest

Hi Drazen,
I've disabled and resaved sitemaps All in one SEO as you suggested (and saved links, and cleared cache).

With disabled option:
- there is no change in hidden link
- there are worse links to home page in sitemaps in language directories like hidden link:
print screen with disabled id:
hidden link

print screen with enabled id:
hidden link

Please help, cheers
Danka Stawarz
WEBEST

September 15, 2021 at 11:26 am #9591931

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello Danka,

thanks for getting back and taking the time to check my suggestion.

It looks to me like it could be a compatibility issue with the latest version All in One SEO plugin.

In order to confirm this, I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons.

You can access the WordPress dashboard using the link below:
- hidden link

Kindly follow the steps below:
- Set up WPML
- Install the necessary plugins.
- Try to replicate the issue with few dummy pages

This will help us to report the probable issue to the compatibility team and solve the possible problem faster.

Please let me know how it goes.

Thanks,
Drazen

September 15, 2021 at 1:56 pm #9593377

Webest

Hi Drazen,
thank your for the sanbox:)

So check those sitemaps:

hidden link
OK: hidden link → pl
spare/wrong: hidden link → de
spare/wrong:: hidden link → en

hidden link
OK: hidden link → en
spare/wrong: hidden link → de
spare/wrong:hidden link → pl

hidden link
OK: hidden link → de
spare/wrong: hidden link → en
spare/wrong: hidden link → pl

cheers
Danka Stawarz
WEBEST

September 16, 2021 at 6:36 am #9597629

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello Danka,

thanks for getting back and taking the time to reproduce the issue.

I was able to confirm this and have now escalated this ticket to our compatibility developers team.

They will be checking it and advising further.

I will update you here as soon as I have some news.

Thanks,
Drazen

September 16, 2021 at 10:31 am #9599563

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for the patience.

Our developers found the issue and are providing a temporary workaround fix.

If this fixes the issue for you too, please contact plugin author/support and report /check the solution suggested as they implemented that code and the full resolution of the permalinks would require a heavy change in their plugin code.

We will also contact and reach the author too once we have a confirmation about the workaround from you.

Workaround:
- in wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Content.php replace line 220-222:

$location = is_home()
				? apply_filters( 'wpml_home_url', get_option( 'home' ) )
				: apply_filters( 'wpml_permalink', $permalink, $translation->language_code );

- Replace it with

	$location = is_home()
				? apply_filters( 'wpml_home_url', get_option( 'home' ) )
				: apply_filters( 'wpml_permalink', $entry['loc'], $translation->language_code, true );

Please check and let me know.

Thanks,
Drazen

September 21, 2021 at 9:56 am #9626923
Webest

Hi again,

I'm afraid the issue is not completely resolved..
Please check the links here:
hidden link
hidden link

there are still three versions of the link (for each langauge), is it possible to leave only one?
So for PL sitemap, I would like to see only PL links, for DE only german links etc..

The second issue, please check the following sitemaps:
hidden link - this is correct
hidden link - this is NOT correct, links are in DE, but described as PL

New threads created by Dražen Duvnjak and linked to this one are listed below:

https://wpml.org/forums/topic/split-gallery-sitemap/

September 21, 2021 at 11:02 am #9627331

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

This thread is marked as resolved.

I have opened a new ticket and we can continue our conversation there:

- https://wpml.org/forums/topic/split-gallery-sitemap/

Please in the future open a new ticket if the current one is closed, as we may not reply anymore to it.

Thanks,
Drazen