Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You created custom Beaver Builder modules and are trying to translate them. You added a custom XML configuration to the WPML settings but cannot see the 'interview header' field in the translation editor.
Solution:
We recommend updating your XML configuration to ensure that the fields within the 'interview_fields' array are also registered for translation. Here is the corrected XML configuration:

<wpml-config><br />  <beaver-builder-widgets><br />    <widget name="interview-module"><br />      <fields-in-item items_of="interview_fields"><br />        <field>interview_title</field><br />        <field>interview_text</field><br />      </fields-in-item><br />      <fields><br />        <field>interview_header</field><br />      </fields><br />    <widget><br />  </beaver-builder-widgets><br /></wpml-config>

Please check if the module translates correctly now. If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by roelV 2 years, 5 months ago.

Assisted by: Osama Mersal.

Author Posts
December 28, 2022 at 10:28 am #12721889

roelV

I made custom Beaver Builder Modules, I like to translate these; I could not find the unserialized _fl_builder_data as in the documentation but in the database in table postmeta of the page I found this in the _fl_builder_data entry:
....
[pnu91yck3ft8] => stdClass Object
(
[node] => pnu91yck3ft8
[type] => module
[parent] => w1vm9gei3r28
[position] => 0
[settings] => stdClass Object
(
[interview_header] => This is a test
[nr_of_slides] =>
[interview_fields] => Array
(
[0] => stdClass Object
(
[interview_title] =>
[interview_text] =>
[interview_photo] =>
[interview_photo_src] =>
[0] =>
)

)

[responsive_display] =>
[visibility_display] =>
[visibility_user_capability] =>
[visibility_logic] => []
[animation] => Array
(
[style] =>
[delay] => 0
[duration] => 1
)

[container_element] => div
[id] =>
[class] =>
[node_label] =>
[export] =>
[import] =>
[margin_top] =>
[margin_unit] => px
[margin_top_large] =>
[margin_large_unit] => px
[margin_top_medium] =>
[margin_medium_unit] => px
[margin_top_responsive] =>
[margin_responsive_unit] => px
[margin_right] =>
[margin_right_large] =>
[margin_right_medium] =>
[margin_right_responsive] =>
[margin_bottom] =>
[margin_bottom_large] =>
[margin_bottom_medium] =>
[margin_bottom_responsive] =>
[margin_left] =>
[margin_left_large] =>
[margin_left_medium] =>
[margin_left_responsive] =>
[type] => interview-module
)

so I added:
<wpml-config>
<beaver-builder-widgets>
<widget name="interview-module">
<conditions>
<condition key="widgetType">interview-module</condition>
</conditions>
<fields>
<field type="Interview Header" editor_type="LINE">interview_header</field>
</fields>
</widget>
</beaver-builder-widgets>
</wpml-config>

to the WPML Settings Custom XML Configuration, but still when I am in edit page mode and click on the + for translate, I don't see the interview header field there

This is the documentation that I am following: https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/#registering-simple-widgets

hidden link

December 28, 2022 at 10:47 am #12722043

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Could you please log in to this sandbox site and upload Beaver builder? (hidden link)

After that, please create a test page, use this widget, and translate it to replicate the issue. If the issue is replicable, please let me know the steps to reproduce it.

Best regards,
Osama

December 28, 2022 at 11:18 am #12722179

roelV

Hi Osama,

I added the necessary plugins and created a test page with a title and a custom BB module with a text in the header hidden link

The custom XML configuration for the module I added as well but

when I try to translate the page with the + sign, I only see the title in the fields

Schermafbeelding 2022-12-28 121636.png
December 28, 2022 at 11:39 am #12722335

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for replicating the issue. I edited the XML code to be the following.

<wpml-config>
  <beaver-builder-widgets>
    <widget name="interview-module">
      <fields-in-item items_of="interview_fields">
        <field>interview_title</field>
        <field>interview_text</field>
      </fields-in-item>
      <fields>
        <field>interview_header</field>
      </fields>
    </widget>
  </beaver-builder-widgets>
</wpml-config>

Would you please check if the module is translated correctly on the sandbox?

Best regards,
Osama

December 28, 2022 at 12:00 pm #12722595

roelV

Hi Osama,

nice that seems to work. I have some other modules that need translation aswell; how did you come to this XML ; Which logic is behind it so I can use that to do the other modules

Best regards

December 28, 2022 at 12:07 pm #12722625

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

It depends on the JSON of the module. After checking the JSON, you need to follow the steps in the mentioned guide. (https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/)

Best regards,
Osama

December 28, 2022 at 12:19 pm #12722689

roelV

I tried to follow that but I never can see the userialsed JSON only from the data, can you tell me how you got the JSON of that module?

December 28, 2022 at 12:23 pm #12722693

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

You need to use a 3rd party service to unserialize JSON, for example, this site. (hidden link)

Best regards,
Osama

December 28, 2022 at 1:14 pm #12722913

roelV

Hi Osame,

Sorry to keep coming back to this, but I do not understand how you got the correct JSON.
Where did you grab the JSON, the only place I know is from the database; I never could see un unserialized data from the _fl_builder_data similar as in the example mentioned in the documentation https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/;

I never see something similar like in the attached image.

Schermafbeelding 2022-12-28 141123.jpg
December 28, 2022 at 1:26 pm #12722957

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

There are two approaches to getting the JSON. Please check the following steps.

1) From the DB:
1- Go to your database manager
2- Go to the wp_postsmeta table
3- Search for the post ID
4- Edit the "_fl_builder_data" record
5- Copy the JSON
6- Paste it into the unserialize service

2) From the classic editor:
1- Go to WPML-> Settings
2- Select the classic editor
3- Go to WPML-> Settings-> Custom fields Translation section
4- Click "Show system fields"
5- Search for "_fl_builder_data" and set it to translate
6- Make a minor edit to the page in the default language
7- Try to translate it
8- Copy the JSON
9- Paste it into the unserialize service

I hope this helps you. If you need further info, please let me know.

Best regards,
Osama