Background of the issue:
I am using WP All Import to upload new Meta Descriptions and Meta Titles. I had a ticket before this because the import was not running successfully. I then had to also install and then run WPML Importer after the import was successful from step one. Once I was using the additional WPML plugin the import gave no errors.
Symptoms:
The Chinese site is now broken and does not load the Chinese site's pages on the front end, but I can see them still on the backend. When I click on the globe to go to the Chinese site, I am just redirected to the English homepage.
Questions:
Why does the Chinese site not load on the front end after importing new meta descriptions and titles?
Why am I redirected to the English homepage when trying to access the Chinese site?
Thanks for contacting WPML forums support. I'll be glad to help you today.
First of all, sorry for the late reply; it was due to a higher workload.
I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Thanks for the access details. I checked the homepage in the dashboard and noticed that it's not translated into Chinese. (Kindly check the attached screenshot)
So that is the result of when i uploaded and imported the csv. The page was translated, I ran the import, and now the link to the chinese homepage is redirected to the english homepage. As you can see it now shows that the page has not been translated. I will run a backup of the site from last week. Are you able to to try it and run the import to see the results/ troubleshoot?
Thanks for the sheet and access details. I checked the sheet and noticed that the Chinese home page has no "_wpml_import_source_language_code" value. (Kindly check the attached screenshot)
Please add it and try to re-import a sheet with only the home page and its translations.
Ahh i see that! Would you be able to clarify what value should go in _wpml_import_source_language_code for chinese?
I guess i am just confused what values that column is supposed to hold for all the languages on my site.
for chinese should it be zh or zh-hands
Same for Portugues, should that be pt-br or pt?
* _wpml_import_language_code: This should be the language code for the translated pages.
* _wpml_import_source_language_code: This should be the site's default language (en) for the translated pages and empty for the English pages.
* _wpml_import_translation_group: It should be the same number for the same page in all languages.
You can know the language codes by visiting WPML-> Languages-> Edit Languages. On your site, you have the following languages:
[0] => en
[1] => es
[2] => de
[3] => fr
[4] => it
[5] => ja
[6] => ko
[7] => pl
[8] => pt-br
[9] => ro
[10] => ru
[11] => tr
[12] => zh-hans
[13] => en-in