This thread is resolved. Here is a description of the problem and solution.
Problem:
Yoast SEO sitemap. In the sitemap, there are links to pages with languages that no longer exist on the site. In addition, there are links with added /./, which look like this.
your-domain.com/de/./some-category/
The links work and lead to the correct category, for example.
your-domain.com/de/some-category/
But we don't want to have them on the sitemap in this way.
Solution:
The user wrote:
We've found the issue, there were some legacy rows in the wp_terms table from when we were doing the initial testing of languages on the site, and once we deleted those rows it fixed the issue.
Relevant Documentation:
https://wpml.org/documentation/plugins-compatibility/using-wordpress-seo-with-wpml/
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.
Tagged: Documentation request, Not WPML issue
This topic contains 8 replies, has 2 voices.
Last updated by danielM-171 1 year, 6 months ago.
Assisted by: Itamar.
Author | Posts |
---|---|
July 25, 2023 at 9:36 am #14094915 | |
danielM-171 |
All of our websites are crawled on a weekly basis, this week, the crawl on the HGF website highlighted the following URLs as having 404s; [Unknown Title] The languages for 'FR', "NL" and "NL BE" are not active on the website. Are you able to help investigate why these URLs are crawlable on the website? Thanks, Daniel Maw. |
July 25, 2023 at 1:05 pm #14096735 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, Daniel. Those URLs are on your site's category sitemap at this URL. You should generate a new sitemap that will not include 404 links, which will surely solve the problem. Regards, |
July 25, 2023 at 3:55 pm #14097913 | |
danielM-171 |
Hi Itamar, Thanks for the reply. So, a couple of things: 1. We've installed your WPML SEO plugin in order for WPML to work nicely with Yoast SEO as advised by one of your colleagues when we first launched the website some time ago. Without this plugin Yoast does not include the German pages in any of the XML sitemaps. 2. With that in mind, some things in that plugin isn't behaving correctly. 2a. The first thing is that it's adding URL like hidden link (not the full stop and extra / in the URL). Why is it doing this? 2b. The second is that for some reason it's this plugin that's adding in these strange URLs for languages that aren't even active on the website. For example: hidden link Like I said, these languages (i.e. nl, fr and nl-be) don't even exist in the WPML settings? They did at one point when we were testing the site but we deleted them as the client only opted to translate German. Are you able to help shed some light on why it's behaving in this way? Kind regards. |
July 25, 2023 at 6:49 pm #14098705 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, I can see the new issue you present where links in the sitemap look like this. Can you please confirm this? To be honest, I don't know why it's behaving in this way. But I'm here to investigate the issue and help you solve them. About 2a, I assume it is related to a known issue with regular expressions. You can read about this known issue here. https://wpml.org/errata/yoast-seo-redirection-regex-rules-differ-across-languages-with-wpml/ Are you using Redirection RegEx Rules on your site? About 2b, and also may help with 2a, did you try my suggestion to regenerate the sitemap? I need to understand this, please. Thanks, |
July 25, 2023 at 8:16 pm #14098825 | |
danielM-171 |
Yes, you’re right, the URLs do ultimately redirect to the correct page as per your example, it’s just the URL is incorrect. As per your idea re: RegEx, we’re not using Yoast Pro so therefore aren’t using that feature. Also, Yoast auto generates the site maps live, there is no option to regenerate. My gut is there is a bug somewhere or the plugin is seeing some legacy data in the DB which shouldn’t be there. |
July 26, 2023 at 8:12 am #14100779 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, and thanks for your confirmation and further details. You wrote: "Also, Yoast auto generates the site maps live, there is no option to regenerate." To generate a new sitemap, please proceed with the following. 1. Go to Yoast SEO -> Settings. 2. Scroll down or search for the API's section. 3. There, see the XML sitemap section. 4. Disable this feature and press the Save Changes button. Please see the attached screenshot. 5. Go to hidden link. When this feature is enabled, you will get a 404 (page not found) for this URL. This is how you ensure that the feature is turned off. 6. Enable the XML sitemap. 7. Go to the site map where you saw the wrong URLs and check if it is still there. Please let me know your findings. Thanks, |
July 26, 2023 at 12:14 pm #14103693 | |
danielM-171 |
I've done that now Itamar, no luck I'm afraid. |
July 26, 2023 at 12:57 pm #14104101 | |
Itamar Supporter
Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+02:00) |
Hi, and thanks for trying my suggestions. Do you have a staging site where we can investigate this issue? Investigating the issue may include the following process we avoid doing on a production site. I suspect that there is a collision with the theme or another plugin that might cause this problem. If possible, get your site into a minimum environment. Minimum environment means switching to a default WordPress theme like TwentyTwenty-One and no plugins activated except WPML and Yoast SEO. First, check if the problem persists when the theme is switched to TwentyTwenty-One. If it persists, then deactivate all plugins except the WPML, its add-ons, and Yoast SEO itself (without its extensions). Then please check if the problem persists. If it does not persist, start by activating the plugins one by one and check when the problem comes back, then report to me which was the culprit plugin. |
July 26, 2023 at 1:26 pm #14104299 | |
danielM-171 |
We've found the issue, there were some legacy rows in the wp_terms table from when we were doing the initial testing of languages on the site and once we deleted those rows it fixed the issue. We're just rolling out the fix on the prod site now. |