Skip Navigation

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

Problem:
If you're using WoodMart with WPML Sticky Links and notice that links within WoodMart WPBakery widgets are not being transformed into PageIDs like they do with the default WordPress editor, you're encountering a known limitation.

Solution:
We have investigated this issue and found that WPML Sticky Links is designed to search for href attributes within the content. However, with page builders like WoodMart's WPBakery widgets, links are part of the shortcode content and not standard href attributes. To handle translation for these links, you need to register them with the wpml-config.xml file. Fortunately, WoodMart's links are already registered in the XML configuration.

Here are the steps to ensure your links translate correctly:
1. Translate the target page (e.g., the 'Cart' page).
2. Update the original page that contains the WoodMart widget link to point to the target page.
3. Translate the page containing the widget.
4. Check the translated page on the front-end to confirm that it links to the translated target page.

For more detailed instructions on registering page builder content for translation, please refer to our documentation on registering page builder content for translation.

If this solution doesn't seem relevant to your situation, please open a new support ticket with us, and we'll be happy to assist you further.

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

Last updated by Lauren 2 months, 2 weeks ago.

Assisted by: Lauren.

Author Posts
November 28, 2023 at 1:35 pm #14940269

jerisscloudcenter

hidden link

I’m using WoodMart with WPML Sticky Links, which is transforming all URL links into PageIDs links, so that links never get broken.

However, I noticed that WPML Sticky Links never works with WoodMart widgets. It works fine with default WordPress editor, but not when using the WoodMart WPBakery widgets.

Here is a staging with no customizations, no plugins, no cache, and parent theme.

Reproduce the case of WPML Sticky Links working fine with default WordPress editor :
1) Create a new page
2) Enter any random text like “ABC”
3) Select this text and add a link pointing to the page “Changelog” for instance.
4) Save and check the link after saving, you’ll see it transformed into PageID.

Reproduce the case of WPML Sticky Links not working with WoodMart WPBakery widgets :
1) Create a new page
2) Add any WoodMart widget like “Information Box”
4) Add a link pointing to the page “Changelog” for instance.
5) Save and check the link after saving, you’ll see that it is NOT transformed into PageID.

November 28, 2023 at 8:05 pm #14944205

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I have created a test site with Woodmart theme uploaded. Please create a test page with the Woodmart element that you are seeing this problem on so that we can recreate the issue here. Once that is done, I can escalate to our Compatibility team for further investigation. HEre's the link to log in to the test site:
hidden link

November 30, 2023 at 8:28 am #14959333

jerisscloudcenter

Check now the Sandbox.

hidden link

hidden link

November 30, 2023 at 9:06 pm #14967715

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thanks so much for creating the examples. I have escalated this to our compatibility team and I will update here once I have more information.

December 5, 2023 at 7:26 pm #15002425

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Our developers looked into this issue and found that this is expected. Like the author said, sticky links searches for href attributes, and in this case, the links are as content from page builders/shortcodes:

[vc_row][vc_column][woodmart_info_box woodmart_css_id="656f6ae61491a" woodmart_empty_space="" svg_animation="no" info_box_inline="no" link="url:http%3A%2F%2Fcompsupp-7078.local%2Fcart%2F|title:Checkout" title="Test title" subtitle="Test sub-title"][/woodmart_info_box][/vc_column][/vc_row]

In order to translate links from page builders, we need to register links with the wpml-config.xml file: https://wpml.org/documentation/support/language-configuration-files/register-page-builder-content-for-translation/

I checked the Woodmart XML code and found that it's already registered:

<shortcode>
    <tag>woodmart_info_box</tag>
    <attributes>
        <attribute>icon_text</attribute>
        <attribute type="link" encoding="vc_link">link</attribute>
        <attribute>btn_text</attribute>
        <attribute>title</attribute>
        <attribute>subtitle</attribute>
        <attribute>content</attribute>
    </attributes>
</shortcode>

After that, I did a quick test:

Translated the cart page
Updated the original "a" page, to link to the cart page
Translated the page
Checked the translated page on front-end. It correctly links to the translated cart page.

So these are the steps to use in order to translate these parts of the Woodmart page builder content. Please let me know if you have any questions.

December 6, 2023 at 2:46 pm #15008891

jerisscloudcenter

Hello, it's not very clear. You say that we need to add XML configuration, then you say that the XML configuration is already in your plugin. Is that right?

I tried adding your code but WPML says it's error code. Please clarify.

Also you still misunderstood my initial explanations. I am not talking about TRANSLATIONS. I am talking about STICKY LINKS, all in the original language. Read again precisely my initial thread. You even asked me to reproduce it on your own Sandbox, which I did, and still you're not understanding my problem.

Please read carefully

1.jpg
December 6, 2023 at 3:53 pm #15009693

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Sorry if my response was not clear, let me clarify. I do understand your initial explanation. However, as both the Woodmart and developers and now WPML developers are explaining, those Woodmart elements will not work with sticky links.

The workaround here since they won't work with sticky links is to make sure the elements are registered for translation via WPML XML Configuration. in MOST cases, the theme will have its own WPML XML config file in the theme folder. You can check for that and if for some reason it's not there, you can add the code that I provided in WPML -> Settings -> Custom XML Configuration. Then, you should be able to follow the rest of the steps to translate the page and the Woodmart elements. I reiterate that this is a workaround because these Woodmart elements will not work with sticky links due to the way those links are set up. Sticky Links searches for href attributes, and in this case, the Woodmart links are as content from page builders/shortcodes which is why they must be registered using xml config and translated per my instructions in the previous reply.

I hope this helps to clarify. Please let me know if you are not having the same results after following the steps.

December 9, 2023 at 7:57 am #15028577

jerisscloudcenter

Please read the last feedback from WoodMart support after they read your last replies.

hidden link

December 11, 2023 at 3:44 pm #15039093

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I have reviewed their latest reply but it doesn't change anything about the functionality, so my previous reply is the same. As of now, Sticky Links will not work with those Woodmart widgets and those will need to be translated via the Advaneced Translation Editor. Our developers are aware of this now, and it will be up to the development team to decide to update Sticky Links in the future. If it gets added, it will be in the changelog notes if/when an update for Sticky Links is released.

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