Skip to content Skip to sidebar

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

Problem:
If you're using WPML with Bold Builder and encountering issues where custom element translations made directly on Pages are erased when using the WPML translation editor, this might be due to the elements not being registered as translatable.
Solution:
First, ensure that the custom elements are registered in WPML to be translatable. You can do this by adding the necessary XML configuration in WPML-> Settings-> XML Configuration. Here is an example of how to register a custom element:

<wpml-config><br />    <shortcodes><br />        <shortcode><br />            <tag>bt_bb_headline</tag><br />            <attributes><br />                <attribute encoding="allow_html_tags">headline</attribute><br />                <attribute encoding="allow_html_tags">subheadline</attribute><br />            </attributes><br />        </shortcode><br />    </shortcodes><br /></wpml-config>

For more details on registering page builder elements, check this guide: https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/
Additionally, if you notice that certain elements like button texts disappear from the editor, it might be due to incorrect tags in the plugin's XML configuration. For instance, replacing

<tag>bt_text</tag>

with

<tag>bt_bb_text</tag>

in the plugin's XML file can resolve this issue.

If this solution does not apply to your case, or if it 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 issues persist, please open a new support ticket at https://wpml.org/forums/forum/english-support/.

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

Last updated by adrienM-10 4 years ago.

Assisted by: Osama Mersal.

Author Posts
September 18, 2021 at 3:51 pm

adrienM-10

I'm trying to use WPML with Bold Builder, they say it's compatible with WPML (i'm using this theme hidden link).

It works just fine for most Pages strings, apart for some custom elements that they created.

I managed to translate from WPML then from Pages for custom elements, but if I go to the translation editor, it erases translations made directly on Pages.

How can I import custom element translations to WPML translation editor to keep it in sync?

September 19, 2021 at 1:32 pm #9615011

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.

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

After that, please install only WPML plugins, and create a page to replicate the issue.

Would you please let me know the steps to reproduce the issue on the sandbox site?

2) It's not related to the issue, but according to your Debug.info, the WP memory limit needs to be increased. PHP memory is fine, but WordPress uses 40Mb as default. Minimum requirements for WPML are 128Mb. (Kindly check this page https://wpml.org/home/minimum-requirements/)

Add this to the top of wp-config.php to increase WP memory:

/** Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Thanks for your cooperation

Regards,
Osama

September 20, 2021 at 3:53 pm #9622209

adrienM-10

Hello, thank you for supporting us.

Here are the steps I produced: I have installed and activated the theme, started installing the demo but didn't complete, went to activate WPML plugins, and went to create a new "Test Page i18n" with 2 elements - one "classic" element, and one "Bold" element. Only the classic element is accessible in the translation table after creating a translation job from the translation manager: hidden link

Any idea on how to catch these "Bold" elements within the translation tool?

Regarding memory, I checked with Bluehost they said it was on 256M and been upgraded to 2560M.

September 20, 2021 at 4:20 pm #9622485

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

Thanks for replicating the issue. I've checked the page and found that the element is not registered to be translatable, so after adding the XML for registering it in WPML-> Settings-> XML Configuration, the element appeared correctly in the translation editor.

<wpml-config>
    <shortcodes>
        <shortcode>
            <tag>bt_bb_headline</tag>
            <attributes>
                <attribute encoding="allow_html_tags">headline</attribute>
                <attribute encoding="allow_html_tags">subheadline</attribute>
            </attributes>
        </shortcode>
    </shortcodes>
</wpml-config>

Kindly check this guide to know more about registering page builders elements. (https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/)

Strangely, the button text disappeared from the editor, so I'll consult our 2nd tier supporters regarding this issue.

It would be great if you consulted the theme support regarding the disappearance issue as well.

Thanks,
Osama

September 21, 2021 at 4:54 pm #9630719

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

Thanks for your patience. I've just received our 2nd tier supporters' and they found that the (wp-content/pluginsbold-page-builder/wpml-config.xml) file needs to be updated because the plugin authors use the following code.

<shortcode>
			<tag>bt_text</tag>
		</shortcode>

While it should be the following one

<shortcode>
            <tag>bt_bb_text</tag>
        </shortcode>

The difference is the tag name.

We have added the correct code to the sandbox site. Could you please test it and let us know if it works correctly?

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

Best regards,
Osama

September 22, 2021 at 6:07 pm #9640305

adrienM-10

Thank you very much for debugging this! Yes it looks like it's working in the demo. I submitted a ticket to the Bold Themes team too as you suggested.

I was going to test on blue-bond.com but can't see translation tables anymore, it just shows the whole page html in fields. Can you have a look at it if you still have access to our backoffice? I found some WPML tickets about these but I don't really understand the solutions :/

Right now it shows something like the image in attached files.

html-wpml.JPG
September 22, 2021 at 7:14 pm #9640677

Osama Mersal
WPML Supporter since 02/2020

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

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

Hi,

It's great that's the solution fixed the issue on the sandbox site. On your site, kindly go to WPML-> Settings and select the Advanced Translation Editor. (Kindly check the attached screenshot)

❌ Please backup your database first ❌

Would you please let me know if that fixed the issue?

Thanks,
Osama

1.jpg
September 24, 2021 at 6:45 am #9651961

adrienM-10

Ok thank you very much, with the new update it looks like Bold elements are properly scanned on a test page. For older pages it doesn't show Bold elements.

Any idea how I can scan older pages to trigger Bold elements into the translation tool?
Without having to duplicate and retranslate existing pages?

September 24, 2021 at 6:49 am #9651973

adrienM-10

Ah posted too fast, your support is too good too tempting 😉

It worked rescanning pages in WPML > Support > Troubleshooting page and then click "Remove ghost entries from the translation tables" (or "Clear the cache in WPML" maybe, not sure which one worked)