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: 

This topic contains 15 replies, has 3 voices.

Last updated by Itamar 1 year ago.

Assigned support staff: Itamar.

Author Posts
September 24, 2018 at 7:32 am #2759571

Peter

Tell us what you are trying to do?
-> Hi , I am trying to remove old language urls from XML sitemap generated using Yoast SEO. But i am unable to do so.

Is there any documentation that you are following?
-> Not any particular document, i just read some suggesions on google and tried that.

Is there a similar example that we can see?
->Yes, hidden link Inside these when you open: hidden link , you can see various urls which are now not present on site, and redirecting to other urls. For example:
hidden link
hidden link

And many more like these. Our site is not using only 5 languages/regions:
Uk and Ireland,
Asia Pacific
Americas
Europe
Middle east and Africa

And on Xml sitemap, still there are urls of old languages/regions which we used in previous times, but they are not present now.

What is the link to your site?
->hidden link

September 25, 2018 at 5:37 am #2762531

Peter

Hi,

Till now i did not get any reply regarding my issue. Please help me.

Thanks!

September 25, 2018 at 10:31 am #2763387

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hello and sorry for the late response here.

This issue is related to the Yoast SEO plugin support more than to WPML's support, but I'll try to help you with this anyway. I've read this article from the Yoas SEO website.
hidden link
The article explains how to force an update for the sitemap. So the simple way to do that is to deactivate and then activate the sitemap option again in SEO-> General -> Features tab.
But it also explains that in most of the cases where the sitemap is not being updated the issue is with a cache. It can be a cache that is enabled on the site's itself (usually a plugin), or it can be a cache on the server's level. When I check the URL for your site's sitemap with this service hidden link, it seems that cache is enabled on your site or server. Please see the attached screenshot.

Please follow the instructions on Yoast's article and see if it helps to solve this issue on your site.

Regards,
Itamar.

September 26, 2018 at 10:08 am #2766795

Peter

Hi,

As you mentioned that it seems to be a cache issue. So i cleared all cache from the website. Also i asked at server support to clear cache from server. This is also done. Then i came to know that the site domain is pointing to 104.27.150.53 which is a cloudflare server, so i login into cloudware and clear/purge cache from there also. Then i disabled and again enabled the XML sitemap: hidden link , but no luck. Things are as it is. Still it is showing url's which are not found in backend and are of old languages.

Can you please suggest now next what i have to do to resolve the issue as it has been proved that it was not cache issue?

Waiting for your swift reply.

Thanks!

September 26, 2018 at 2:11 pm #2767639

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I'm consulting our second tier supporters about this issue.
I'll get back to you here once I have a reply from them.

Thanks,
Itamar.

September 26, 2018 at 2:22 pm #2767672

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi again.

Our second tier supporter asks to try adding a new post and see if the sitemap is then updated with a new record.
Can you please try it?
What happens when you add a new post/page to the site, is the sitemap then updated with this new post?

Thanks,
Itamar.

September 27, 2018 at 10:43 am #2770163

Peter

Hi,

As requested by you, i create a new page with url: hidden link . And it gets added in XML sitemap here hidden link ,at last. You can also see today's date over there. It means that sitemap is updating.

Now next what we can do?

Waiting for your swift reply.

Thanks!

September 27, 2018 at 5:44 pm #2771428

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for trying our second tier suggestion.

If you agree, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue.
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you will enter is private which means only you and I can see and have access to it.

If you prefer to do it on your own, you can provide me with the snapshot of your website following these directions:
If you already know how Duplicator works (http://wordpress.org/plugins/duplicator/), please skip the following steps and just send me the installer file and the zipped package you downloaded.
Duplicator instructions
- From WordPress plugin page, look for “Duplicator” and install it.
- Once installed, you get a new item in the main menu “Duplicator.”
- Chose “Packages.”
- Click on the first button you find in the toolbar on the right (“Create Package”)
- Give it a name or leave it as is
- Click on “Create Package Set.”
- Wait until the package is ready
- Click on “Installer”, then on “Package”: the first one is just a PHP script, the second one is a zip file containing everything you need
- Send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big).

***********************
Once the problem is resolved, I will delete the local site.
***********************
IMPORTANT: Be sure to take a complete backup of your site and database first before you proceed!
***********************

Privacy and Security when Providing Debug Information for Support:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Please, could you provide me the additional Info and as well permit me to perform the required steps?

Thanks,
Itamar.

September 28, 2018 at 7:48 am #2772775

Peter

Hey,

Also you will have to enter below authentication details to view the site:

--removed by supporter---

Thanks!

September 30, 2018 at 10:10 am #2776405

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for creating the staging site for me.

I've tested many things on the staging site and here is what I did.
1. Updated WPML and its add-ons to the latest versions (the first procedure we should have tried). -> Didn't help.
2. I tried minimum environment where the theme is switched to a default WordPress theme, and all the plugins besides WPML and Yoast are deactivated. -> Didn't help.
3. I tried all the troubleshooting options in WPML -> Support -> Troubleshooting. -> Didn't help.
4. I've installed the ARI Adminer plugin to check the DB and found many entries in the wp_translations table for the /gr/ and /ma/ language. So I've made a test and deleted all the /gr/ entries. And this made all the /gr/ URLs disappear from the sitemap. For example, you will not see anymore the hidden link in this sitemap hidden link

So it seems that this solves the issue. I'm consulting our second tier supporter if there is anything else that should be done or that we should bring into account before performing this DB operation.

I'll keep you updated here.

Thanks,
Itamar.

October 1, 2018 at 8:03 am #2777302

Peter

Hi,

But this DB operation is a lot of time consuming. Is there no other solution for these? This is the last option we can do, but it will be good if we have any other solution for these.

Waiting for your reply.

Thanks!

October 2, 2018 at 12:57 am #2779729

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

Itamar is currently offline but i have followed up with our second tier and seen that one recommendation other than the proposed solution above is the following

Perhaps another approach is to re-add the language (re-activate it) and then use the checkbox to HIDE the language that is not needed.

usually the inactivate languages will show within WPML->languages page

Of course, if this does not work and you are sure that you do not need the posts – removing them manually is a good idea.

October 2, 2018 at 7:03 am #2780507

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I'm back handling this ticket.

Performing the DB operation is not time-consuming at all. It is a fast operation. Here is an example for what you need to do to delete all the /ma/ posts.
1. Take a backup of your DB.
2. In the DB select to see the data of the wp_icl_translations table.
3. Select to search this table.
4. Perform this search:

SELECT * FROM `wp_icl_translations` WHERE `language_code` = 'ma' LIMIT 550

5. Select all the rows and delete them.
Please see the attached screenshot search-and-delete-wp-translations.jpg

**** Important! Make a DB before you proceed with those steps****

Please let me know if you have any questions about the above or if you need help with this DB operation.

Regards,
Itamar.

October 4, 2018 at 7:05 am #2786528

Peter

Hi,

According to you, i have searched and deleted records. But now my site has become terribly slow, and also in backend, i am unable to add any page/post. It is througing 500 Error.
Please help. It is saying that primary key/foreign key is deleted. something like these.

Thanks!

October 4, 2018 at 9:39 am #2787021

Peter

Hi,

Please provide other solution rather then deleteing entries from database, as it is creating problem for us, and it is affecting other site. Is there no other solution for these?

Thanks!

The topic ‘[Closed] XML sitemap generated using Yoast SEO still shows old language URL's’ is closed to new replies.