Skip Navigation

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 3 replies, has 2 voices.

Last updated by Mohamed Sayed 1 year, 6 months ago.

Assisted by: Mohamed Sayed.

Author Posts
November 20, 2023 at 8:56 pm #14880787

sergeyD-7

I cannot set a global headers in Cloud Templates section of TagDiv theme again. This time on the copy of my site, with which I had problems with headers in the past. The cure which was recommended in the previous tickets did not help.
My steps.

I remove all headers.
I clear all headers from Trash.
On the troubleshooting page I:
- Clear the Cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Fix WPML table collation
- Set language information
- Fix post type assignment for translations
Then I go to Cloud Templates, I import a cloud template in any language and I cannot set it to be global.

I tried to switch off all plugins except TagDiv and WPML. The issue comes as soon as I activate string translation.

Also, I want to note that my original site had Russian language as main language. Now I create it's copy in other languages, so I want to keep Russian language as a donor, but I want my main language to be English. And this seem to create issues.

Please also see this 5 min long video (sorry for length, you can increase the speed).
hidden link

In the video you could see that I sequentially created three Cloud Templates:
- English (main language) ID 11172
- Russian (Hidden language) ID 11175
- Turkish ID 11178

As I the first Cloud Template I created is in English, I expected that on Admin Texts Translation I need to seek for ID 11172. But it is not found. Also 11178 is not found. But for some reason the Russian ID 11175 is found. I think this is incorrect. It is as if the Russian would be the original language. But it is not.

November 21, 2023 at 1:25 pm #14887243

Mohamed Sayed

Hi Sergey,
Thanks for contacting WPML support.

From what I understand, the header template can't be translated from WPML > Translation Management. If yes, I suggest following this guide to translate the header manually instead of creating separate templates and connecting them: https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/#how-to-use-manual-translation

Regarding the other issue about being unable to create a global header, please try the following:

- Go to WPML > String Translation
- Search for the Russian ID 11175
- Delete the string (Select it then click the delete button below the strings table)
- Create the new English header
- Go to WPML-> Theme and plugins localization, select your theme/plugin (which creates the template) and scan it
- Go to WPML-> String Translation
- Scroll down and click on the "Translate texts in admin screens »" link
- Search for the ID of the English template
- Select the string
- Click on the "Add to String Translation" button
- Then click on "the « Return to String Translation" link
- Translate the string, clear the cache, and check the front end

Let me know please if that helps.

Kind regards,
Mohamed

November 21, 2023 at 3:54 pm #14888863

sergeyD-7

I have resolved it, though this time it was a bit different.
But now I feel myself like a coder. 🙂
Is this really the way to create headers using WPML? I think not. I am still using it on two other sites successfully. I believe something is broken at my site 🙁

I will recreate my headers now and if it goes successfully, I will mark the issue as resolved. Please, kindly wait.

===============

Just for the history I describe the steps I have done:

The first thing that I tried was to create Cloud Templates using WP Editor. But it did not work as it did not assign header type to the created language versions of templates. I raised the below ticket and your supporter proposed to create templates manually. That is the reason I am doing it in this ridiculous way.
https://wpml.org/forums/topic/cannot-see-header-and-footer-template/

I tried to follow your suggested scenario, but I failed.
I removed all templates and also removed them from trash. Then I created English template and copied it to Russian and Turkish versions.
Now I have following IDs which I read from the URL:
English: 11202
Russian: 11204
Turkish: 11208

Then I go to Admin Texts Translations and try to seek for Russian records 11204, but it is not available, like in the previous times. Instead of it, an English template ID 11202 is now available!

So, I hoped that the issue is resolved, but it is not!

When I see the ID 11202, it is marked not as English translation, but as Russian translation (see the screenshot attached). And it offers me to translate ID 11202 into English and Turkish languages.
I see it is possible to change the language of the string. But I decided to follow your scenario.
So I deleted the string. It showed me warning that the translations will be deleted too. But in fact the translations were not deleted. All the templates in three languages were still there. So I did not have to create a new headers.

Then I went to WPML-> Theme and plugins localization, selected my theme Newspaper and scanned it.

From the Admin texts translations I added the record 11202 to string translation.

And now it was assigned English language and it was set as global!

Screenshot_53.jpg
November 22, 2023 at 12:32 pm #14897477

Mohamed Sayed

Hi,

So now the English header is set as global but not translated, right?

If the issue is not resolved, I would need to request temporary access (WP-Admin) so I can investigate it further.
– preferably to a test site where the problem has been replicated if possible –

Your next answer will be private, which means only you and I have access to it.

❌ Please backup your database and website before providing us with access details ❌

If you don't see the form below, please don't add your credentials as they will be publicly exposed:
hidden link

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

Thanks for your cooperation

November 23, 2023 at 5:23 am #14903615

sergeyD-7

I close this ticket, but if you think you still can help me, you can open it again and I will submit you access details.

Yes, you are right I cannot translate headers using WPML.
The headers are base64 encoded. And the problem is not that some particular field base64 encoded. The whole text is encoded. So I cannot add it to XML (we tried though).
I created few tickets on that issue. And we wasted some time trying to resolve it. As a conclusion your supporters recommend not to translate Cloud Templates using WPML or even WP Editor. I create three templates (one for each language manually) then I translate each of them manually.