This thread is resolved. Here is a description of the problem and solution.
Problem: If you're trying to translate a template and using block theme, but the translated template is not showing and being applied on the translated page check next solution. Solution: We have identified this as a known issue and are working on a permanent fix. Meanwhile, here's a workaround that should help: Follow these steps: - Remove the translated template. - Enable Slug Translation in WPML > Settings (Page URL > Translate). - Navigate to
thanks for the patience, I have checked but couldn't find a solution.
I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons.
You can access the WordPress dashboard using the link below:
- hidden link
Kindly follow the steps below:
- Set up WPML as in your website
- Try to replicate the issue with image banner in simple example
- Share with me step by step guide on how can I check the issue
This will help us to report the probable issue to the compatibility team and solve the possible problem faster.
you can do all the testing at: hidden link It is as simple as it can be with minimal plugins.
I created template for homepage and wanted to translate it and have the same layout in other languages. As I see it - problem is that the layout is saved for specific "titulinis" page and it is not copied when translating. Maybe I am wrong.
I checked further and it seems it is a known issue and we are working on a permanent fix for future versions.
In the meantime, I have applied the next workaround and it works fine for you.
Workaround
Make sure that the template slug in both languages matches the slug of the pages in question
OR
- Remove the translated template
- Enable Slug Translation in WPML > Settings (Page URL > Translate (this will include the slug in the translation and not create it automatically from the title))
- Go to: wp-content/plugins/sitepress-multilingual-cms/classes/full-site-editing/BlockTemplates.php and there comment-out the line:
$postData['post_name'] = $post->post_name;
- Send the template to the translation
- Translate the template while making sure that the slug is the correct one, for example page-homepage
I already applied the 2nd option for you, as it is an easier method. The first one would probably require some changes to the database, as I do not see the option to change the template slug inside WordPress manually.
Let me know if you have any further doubts about the method.
Few problems:
1) how to "Remove the translated template"? Or you meant page?
2) I re-did translating homepage but somehow it redirects me to original language homepage. I had this problem before but don't remember how I fixed it?
New threads created by Dražen and linked to this one are listed below:
1) No, I mean translated template. From the top admin bar change language and then go to Appearance > Editor > Template > Show All template > three dots and delete template.
2) I am not sure exactly what you mean. We limit 1 issue per 1 ticket, to keep things clear and easy to follow. I have opened a new ticket for your new issue and lets discuss it there: