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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - -
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - -

Supporter timezone: Asia/Jerusalem (GMT+02:00)

This topic contains 4 replies, has 3 voices.

Last updated by Itamar 2 months, 3 weeks ago.

Assisted by: Itamar.

Author Posts
August 27, 2024 at 5:06 am #16107263

lucB

Background of the issue:
Hi,

We have a problem translating a button on our Avada website.
Our Avada button uses ACF data as a dynamic parameter for the url and content.
On the original language, everything works fine, but in the translated page, there is no href.

The ACF data is translated correctly, we can show that content using a text block with dynamic content, and it shows fine.

However, the "dynamic_params" attribute of the "fusion_button" doesn't seem to be translated correctly. The dynamic parameters are a base64-encoded: eg:
eyJsaW5rIjp7ImRhdGEiOiJhY2ZfdGV4dCIsImxpbmsiOiIiLCJmaWVsZCI6ImUtbWFpbF9hdXRldXIiLCJiZWZvcmUiOiJtYWlsdG86IiwiYWZ0ZXIiOiIiLCJmYWxsYmFjayI6IiMifSwiZWxlbWVudF9jb250ZW50Ijp7ImRhdGEiOiJhY2ZfdGV4dCIsImVsZW1lbnRfY29udGVudCI6IiIsImZpZWxkIjoidm9vcm5hYW1fYXV0ZXVyIiwiYmVmb3JlIjoiTWFpbCAiLCJhZnRlciI6IiIsImZhbGxiYWNrIjoiIn19
=>
{
"link":{"data":"acf_text","link":"","field":"e-mail_auteur","before":"mailto:","after":"","fallback":"#"},
"element_content":{"data":"acf_text","element_content":"","field":"voornaam_auteur","before":"Mail ","after":"","fallback":""}
}

But the advanced translation editor shows the element_content.before value of the decoded content, instead of the base64-encoded hash.
For the fusion_social_links shortcode, it shows the dynamic_params correctly as en encoded value.

The wpml-config.xml of Avada doesn't tell WPML to decode the attribute:

fusion_button

link
title
dynamic_params

I can't find any config that tells WPML to base64-decode the dynamic_params of the fusion_button shortcode.
Can you help us fix this problem?

Symptoms:

Questions:

August 27, 2024 at 5:59 am #16107359

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

Can you please try to add a new custom XML configuration for this button but also add encoding part to that attribute

encoding="base64"

?

- https://wpml.org/documentation/support/language-configuration-files/register-page-builder-content-for-translation/#:~:text=You%20can%20use%20the%C2%A0encoding%C2%A0attribute%20with%20this%20one.%20It%20handles%20special%20encoding%20that%20various%20page%20builders%20use.%20The%20encoding%20attribute%20is%20usually%20specific%20to%20the%20page%20builder%20you%20use.%20It%20accepts%20the%20following%20values%3A

You will need to add it to WPML > Settings > Custom XML. Change your title a bit resave your page in the default language and then re-translate.

Let us know how it goes.

Regards,
Drazen

September 4, 2024 at 9:06 am #16139244

lucB

Hi Drazen,

We've added the following to our XML config, but it doesn't work.

<wpml-config>
<shortcodes>
<shortcode>
<tag>fusion_button</tag>
<attributes>
<attribute type="link">url</attribute>
<attribute>title</attribute>
<attribute encoding="base64">dynamic_params</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

And we've tried it with 'encoding="base64,json"', but this doesn't seem to work either.
It only shows "fusion_button dynamic_params before" and no other fusion_button parameters.

When we use the following, it does work because the dynamic_params attribute is not translated at all.

<wpml-config>
<shortcodes>
<shortcode>
<tag>fusion_button</tag>
<attributes>
<attribute type="link">url</attribute>
<attribute>title</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

Is there another possibility to do this because the dynamic_params cannot be translated on any button now.

Kind regards

September 4, 2024 at 3:17 pm #16141688

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

I'll continue to help you with this issue.

If you are using an off-canvas element, please check the following known issue and try to apply the suggested workaround.

https://wpml.org/errata/avada-new-off-canvas-elements-not-appearing-as-translated-in-the-front-end/

Thanks,
Itamar.

September 4, 2024 at 3:22 pm #16141708

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

In addition to the above, please also check the following errata.

https://wpml.org/errata/avada-cart-count-widget-dynamic-parameters-not-fully-available-for-translation/

If you need further help, please share your site's Debug information. You can read about it here.

http://wpml.org/faq/provide-debug-information-faster-support/

Regards,
Itamar.

The topic ‘[Closed] Translating buttons with ACF parameters using Avada’ is closed to new replies.