[Resolved] Translation redirecting to main language
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing '404 not found' errors when trying to access pages that were automatically translated into French. The pages were showing correctly in English, but the French translations were not displaying properly and appeared as separate pages with an English flag. Solution: We discovered that there was a duplicate property with the same name in the list of English posts. We recommended the client to delete the duplicate property to resolve the issue. After testing, we confirmed that sending the duplicate properties to the trash resolved the issue for all affected links. We advised the client to go through the list of English properties and delete any that show the title in an incorrect language. Once the client confirms that the links are working as expected, they should permanently remove the duplicates from the trash.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If you're still experiencing issues, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us.
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.
I've got issues with translated pages. For instance: in english (original language) it's shows correct and complete. When I try to switch to the page automatically translated in french it comes as "404 not found". After debugging it shows in french, but without description and as a separate page with english flag. I
Please let me know once you have run the steps in the clean up section if anything has changed. If not, I will set up a test site and we can migrate a copy of your site there to test minimal settings.
Hello!
Yes, I've made the steps for trobleshooting. The issue persist.
For some reasons some translations are separating from the branch and appear as independent (different languages appear in english page - original language).
The problem may be in slug, as if I change it - it start to show correctly again...
If it is okay with you, I'd like to take a look at the database and compare TRID numbers. If these are not matching, this could be the problem. To do this, I can install a plugin called Adminer and that should allow me to look into the database. IF that's okay, please let me know and I will move forward with troubleshooting.
If you prefer to check this yourself, you can access the database and look in the icl_translations table. Look up the element ID of one of these properties. There you will find the TRID associated with it. Then, search the same table for the TRID and check to see if there is a connection for all languages. Follow the same steps for the translated property. Both should have matching TRIDs.
I believe I found the issue. It seems you have created a property in English with the exact same slug: hidden link
So WordPress is automatically guessing the URL land redirecting to the default language. You should either translate the slug for this English or since the property content is in French, you should change the language of this to French or delete it and remove it pernamently from the trash.
Once you do that, please let me know if the redirection is still happening.
No, I didn't create anything. It happens on it's own for some reason. And with different properties. Just as I explained you before...
Take a look at the pictures. I didn't do that!
As I told you in the previos message, the issue seems to be with the slug (which is created by WPML).
Basically, the issue is that now I see duplicates of other languages in the tab where everything has to be in english.
I've attached screenshot. Where you can see no image and the title on other language, it's created by WPML, not by me, and there are many of this bags
How did you originally translate the properties with WPML? are you using automatic translation, importing them, duplicating, etc?
If you delete a property that is showing the incorrect language in English, does it get created again? It's not expected that WPML would automatically create properties from the second language in the original langauge, so I'm trying to understand what steps were taken that could have possibly caused this to happen. It looks like deleting the incorrect language properties from English would resolve it, but not if the properties are recreated somehow in English again. The more information you can give me on your translation process, the more helpful it may be.
Hello,
I’m always using automatic translation.
I don’t know how and why it happens, it wasn’t like this before!
I think it happens after some update.
My website is completely messed up now. In English version appearing Bulgarian and polish in Bulgarian version appear English! All wrong! I have to fix it ASAP
It’s a shame of a website now…
I’ve tried to trash one of the wrong versions, and not they are not redirecting. I could send you screen recording, but the chat doesn’t allow me to do it.
For the French property that was listed under English language, I sent this to the trash and now the French property page loads as expected without redirection: hidden link
So, deleting the incorrect language property from English seems to resolve the issue. You mentioned that there is an English property showing in Bulgarian. Please send me the link to which property this is so that I can further troubleshoot.
Maybe it’s working because I’m changing slugs manually and save changes. Because when I’ve tried to trash a wrong page it didn’t work. The page is simply not switching to the language I’m removing.
It’s a serios problems, I’ll send you some links of pages that are wrong and I don’t know from where they come from:
I followed the steps in your previous reply. After testing, I noticed there was a property with the same name as the Bulgaria property in the list of English posts. So I deleted it and now, if I go to
hidden link
and switch first to some language (I tested German) and then to Bulgarian, I go to this page:
hidden link
So again, it appears that deleting the translated property from English resolved the issue on this one.
I tested the same steps on the rest of the links in the reply above and sending the properties to the trash resolved the issue for all of the links.
For this link hidden link, the languages loaded the translations as expected.
I have not deleted the properties permanently, they are all in the trash. Once you confirm that these links are now working as expected, you should remove them permanently from the trash.
I suggest going to your list of English properties and deleting any that are showing the title in the incorrect language.