 Itamar
WPML Supporter since 02/2016
Languages:
English (English )
Timezone:
Asia/Jerusalem (GMT+03:00)
|
Hi,
I'm sorry, but we don't have FTP access for those sandbox sites. Here is a new, fresh site you can use.
hidden link
Regards,
Itamar.
|
 markusN-7
|
Hi,
Thank you, i will try to set it up without breaking the site this time.
I'll get back to you when I'm done.
Regards
|
 Itamar
WPML Supporter since 02/2016
Languages:
English (English )
Timezone:
Asia/Jerusalem (GMT+03:00)
|
Hi,
Sure, thanks.
Please note that the sandbox site will be available for about one week if no one logs into it. If you need more than one week, please log in to it toward the end of the week to extend its lifetime for one week.
Regards,
Itamar.
|
 markusN-7
|
Hello,
Thanks for the advice, I managed to setup and reproduce the issue now.
I implemented it as a custom theme and reduced the code to the bare minimum.
Steps to reproduce:
First check the startpage in German and English, both show the title of the linked pages in the correct langauge.
Then:
1. Change a text in the German original (e.g. the number after "Beispieltext")
2. Send the page to the automatic translation via DeepL and wait until the page is done
3. Check the startpage in both languages and find, that the titles in EN are now also German and with mixed order.
To reset:
1. Go to the pages in the english backend and edit the page
2. Click on the block and wait until the ACF in the sidebar on the right loaded
3. See that the pages in the editor are also wrongly translated
4. In the sidebar, reorder the pages, this somehow restores the correct translations
5. Save the page
Please let me know, if there any questions.
Thank you,
best regards
|
 Itamar
WPML Supporter since 02/2016
Languages:
English (English )
Timezone:
Asia/Jerusalem (GMT+03:00)
|
Hi,
Thanks for replicating the issue on the sandbox site.
And thanks for the detailed steps on replicating the issue.
I could replicate it according to your steps.
Can you please tell us where in your theme's files the code for the 'Magical Journey' block is?
Thanks,
Itamar.
|
 markusN-7
|
Hi,
Specific code for the block is located in the components/blocks/magical-journey directory. Timber is installed via composer, and its setup is in functions/timber.php. Block-registration and the render-function is in functions/blocks.php. ACF-json (for reference) is in acf/json/, the PHP-definition is in components/blocks/magical-journey/magical-journey.php.
Thank you,
Regards
|
 Itamar
WPML Supporter since 02/2016
Languages:
English (English )
Timezone:
Asia/Jerusalem (GMT+03:00)
|
Hi,
Thanks a lot.
I'll escalate this issue and keep you updated.
I appreciate your patience.
Itamar.
|
 Itamar
WPML Supporter since 02/2016
Languages:
English (English )
Timezone:
Asia/Jerusalem (GMT+03:00)
|
Hi,
Our second-tier supporter and compatibility developer looked at your issue. Here is what they have found.
In your Twig templates, you defined the custom fields translation preference as 2. For example, this field:
{
"key": "field_67a4a26e0b2fd",
"label": "Items",
"name": "items",
"aria-label": "",
"type": "relationship",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"wpml_cf_preferences": 2,
"post_type": [
"page"
],
However, it should be set as 1, which means Copy. It should be like this:
"key": "field_67a4a26e0b2fd",
"label": "Items",
"name": "items",
"aria-label": "",
"type": "relationship",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"wpml_cf_preferences": 1, // 1: COPY (instead of 2)
"post_type": [
"page"
],
Also in WPML -> Settings -> Custom XML Configuration, you should add the following XML:
<wpml-config>
<gutenberg-blocks>
<gutenberg-block type="ttvie/magical-journey" translate="0">
<key name="data">
<key name="title" />
<key name="items">
<key name="*" type="post-ids" />
</key>
</key>
</gutenberg-block>
</gutenberg-blocks>
</wpml-config>
This should solve the problem.
Please check and confirm.
Regards,
Itamar.
|