Skip Navigation

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

Problem:
The client was unable to send a Global Header with base64 encoded fields for translation using WPML. Attempts to configure custom XML to handle the encoding were unsuccessful, resulting in errors and the removal of content from the translation job.
Solution:
We recommended updating the XML configuration in WPML settings to properly handle base64 encoded fields. Here is the correct XML configuration:

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

This configuration should be added under WPML->Settings->Custom XML Configuration. Additionally, we provided links to relevant documentation and known issues:

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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.

Our next available supporter will start replying to tickets in about 4.63 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Bobby 3 weeks, 6 days ago.

Assisted by: Bobby.

Author Posts
October 15, 2024 at 7:29 pm #16292419

jesus-pabloE

Background of the issue:
I am trying to send a Section (Global Header) to Translation on my site hidden link using WPML.

Global Header: There are base64 encoded fields in this document
Image: Dynamic Params: eyJhbHQiOnsiZGF0YSI6InNpdGVfdGl0bGUiLCJhbHQiOiIiLCJiZWZvcmUiOiIiLCJhZnRlciI6IiIsImZhbGxiYWNrIjoiIn0sImxpbmsiOnsiZGF0YSI6InNpdGVfdXJsIiwibGluayI6IiIsImNvbG9yIjoidmFyKC0tYXdiLWNvbG9yMSkiLCJodWUiOiIiLCJzYXR1cmF0aW9uIjoiIiwibGlnaHRuZXNzIjoiIiwiYWxwaGEiOiIiLCJiZWZvcmUiOiIiLCJhZnRlciI6IiIsImZhbGxiYWNrIjoiIn19
To fix this problem, you need to tell WPML how these fields are encoded, so that WPML can decode them before sending for translation.

Custom XML configuration didn-t work

Symptoms:
Some of the content that I selected for translation includes fields that are encoded. Translators will not be able to work on this kind of content, so it was removed from the job.

Questions:
Why is some of the content encoded and removed from the translation job?
How can I ensure all content is sent for translation without being removed?

October 15, 2024 at 10:23 pm #16292759

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi there,

Please share with me the XML you are using already to resolve this as there might be a slight change required to make this work as expected.

October 16, 2024 at 2:09 am #16292932

jesus-pabloE

Yes, i first tried:

<wpml-config>
<shortcodes>
<shortcode>
<tag>vc_raw_html</tag>
<attributes>
<attribute raw-html="1" encoding="base64">content</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

Error line 6

Then:

<shortcode>
<tag raw-html="1" encoding="base64">vc_raw_html</tag>
</shortcode>

Error line 1

Lastly:

<wpml-config>
<shortcode>
<tag raw-html="1" encoding="base64">vc_raw_html</tag>
</shortcode>
</wpml-config>

Error line 2

October 17, 2024 at 10:02 pm #16302245

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you!

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

October 21, 2024 at 8:18 pm #16314368

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the access details!

I was able to resolve this with the following XML:

Go to WPML->Settings->Custom XML Configuration (tab at the top)

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

The first XML is added due to a known issue with Avada just in case it's needed, and the second is the one that is directly related to the Image element.

Here is also a link to our documentation on how to create XML configurations for Avada

I have tested this and was able to add the job to the basket.

October 21, 2024 at 10:08 pm #16314553

jesus-pabloE

THANK YOU BOBBY!!

Nice solution