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

Last updated by gergelyH 1 year, 10 months ago.

Assisted by: Kor.

Author Posts
May 27, 2022 at 7:47 am #11323275

gergelyH

Hi,

Our client has a site using Elementor page builder and Stratum plugin for Elementor widget add-ons.

We are trying to register a widget for translation as per this article: https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/

See below the corresponding serialized array for the widget:

[{"id":"cc9e7bc","elType":"section","settings":[],"elements":[{"id":"64117b0","elType":"column","settings":{"_column_size":100,"_inline_size":null},"elements":[],"isInner":false}],"isInner":false},{"id":"5dd3e92","elType":"section","settings":[],"elements":[{"id":"898a34b","elType":"column","settings":{"_column_size":100,"_inline_size":null},"elements":[{"id":"ffe43ac","elType":"widget","settings":{"accordion_items":[{"text":"<p>Plan and review geological data, with tools to develop accurate geological models quickly<\/p>","_id":"efbdc2c","title":"Geological Modelling"},{"text":"<p>Produce reliable resource and reserve models using functions such as advanced block modelling, geostatistical analysis, grade estimation and mineable shape optimisation<\/p>","active":"no","_id":"7005bbe","title":"Flexible Resource Modelling"},{"_id":"c3a394b","title":"Superior Automation","text":"<p>Save time and reduce errors on sites by capturing and automating pieces of workflow to reliably carry out repetitive and complex tasks<\/p>"}],"__globals__":{"custom_header_background_color":"globals\/colors?id=444a98c","custom_hover_header_background_color":"globals\/colors?id=primary"},"_margin":{"unit":"px","top":"200","right":"0","bottom":"0","left":"0","isLinked":false},"head_icon_size":{"unit":"px","size":0,"sizes":[]},"head_icon_spacing":{"unit":"px","size":0,"sizes":[]}},"elements":[],"widgetType":"stratum-advanced-accordion"}],"isInner":false}],"isInner":false}]

Can you help us modify the wpml-congig.xml file to make it translatable?

Thank you

May 27, 2022 at 3:10 pm #11328135

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for contacting WPML support.

Please try the XML configuration below and see if it works. Remember to make small edits to the page so that it refreshes the "Advanced Translation Editor".

<wpml-config>
    <elementor-widgets>
        <widget name="stratum-advanced-accordion">
            <conditions>
                <condition key="widgetType">stratum-advanced-accordion</condition>
            </conditions>
            <fields>
                <field type="Heading" editor_type="LINE">title</field>
		<field type="Content" editor_type="LINE">text</field>
            </fields>
        </widget>
    </elementor-widgets>
</wpml-config>

Let me know how it goes.

Thanks!

Kor

May 31, 2022 at 2:27 am #11348205

gergelyH

Hi Kor,

It's still not working. I duplicated the page, made some changes but it still show the serialised array in translation editor. We're not using the Advanced editor, is this required?

Regards

May 31, 2022 at 3:17 pm #11354945

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

You can check using the "Advanced Translation Editor". But if it's not working, I would need to take a closer look 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 if possible, to better help and check if some configurations might need to be changed.

IMPORTANT: Please, note that a backup is required for security reasons, and to avoid any data loss, you can use the https://wordpress.org/plugins/updraftplus/ plugin for these backup needs.

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

✙ I would need your permission to de-activate and re-activate Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.

Thanks!

Kor

June 1, 2022 at 1:59 pm #11363263

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

I can't seem to save the XML configuration on your Website here hidden link . It could be a server restriction or some conflict with another plugin as shown in the attached screenshot(error-xml.png). Could you check?

This XML configuration below is the correct one and I've tested it here. hidden link and it works fine when I translate it using the "Advanced Translation Editor" hidden link as shown in the attached screenshot(accordion.png).

<wpml-config>
  <elementor-widgets>
    <widget name="stratum-advanced-accordion">
      <fields-in-item items_of="accordion_items">
        <field type="Accordion: Title" editor_type="LINE">title</field>
         <field type="Accordion: Content" editor_type="LINE">text</field>
      </fields-in-item>
    </widget>
  </elementor-widgets>
</wpml-config>

Let me know how it goes.

Thanks!

Kor

accordion.png
error-xml.png
June 2, 2022 at 12:12 am #11366387

gergelyH

Hi Kor,

I can see this work great on your test site using Classic or Advanced editor. We are providing translation services to this customer via the WPML translation services connector and have preference for Classic editor.

We were able to update the config file in theme root folder, however there's no change. In fact, we can't even see the serialised array in translation editor anymore.

Can you please investigate?

Regards

June 2, 2022 at 4:02 am #11367727

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

I tried inserting the XML configuration into the theme root folder earlier and it's not working for me either when I tested it. As I've mentioned above, it could be caused by a server restriction or some conflict with another plugin as shown in the attached screenshot I've shared above that shows errors on the XML configuration page. We'll need to perform a conflict test list below and see if it helps.

1. Disable all the plugins except the WPML-related ones from your WordPress Dashboard > Plugins and see if the issue is gone, if so, activate one plugin at a time until the culprit one is found.

2. Temporary change to a default WordPress theme such as the ‘TwentySeventeen’ theme from your WordPress Dashboard > Appearance > Themes menu.

Or would you like me to test it for you?

As for the missing "serialised array", I've set the "_elementor_data" custom field to "Don't Translate" in WPML > Settings page, scroll to the Custom Fields Translation section and click the Show system field link as explained here https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/#how-to-find-widget-s-registration-information

I've enabled it back for you as shown in the attached screenshot and now you just need to make a small edit to the page and the "serialised array" will appear on the classic editor.

Let me know how it goes.

Thanks!

Kor

data.png
June 9, 2022 at 5:55 am #11420169

gergelyH

Hi Kor,

We will put the troubleshooting on hold as our client wishes to release the website soon and that would delay things. We will input the translations manually for now and revisit this at a later stage.

Thank you for your help.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.