Skip Navigation

[Resolved] Help with WPML compatibility

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

Problem:
The customer is using the WPML plugin to translate their website and encountering two major issues:

1- Images are not being displayed on some pages.
2- URLs are automatically adding a "." at the end, leading to 404 errors.

Solution:
1- URL Issue:

I identified and removed the extra character causing the URL issue by editing the view translation.
This resolved the broken links.

2- Image Display Issue:

The issue was caused by malformed HTML, specifically the custom HTML used to insert left and right arrow buttons in the sliders.
The Advanced Translation Editor was encoding the HTML tags, breaking the display.
Two possible workarounds were suggested: using actual Toolset components or registering the arrows as shortcodes.

I implemented the second workaround with the help of our 2nd tier support:

- Added a shortcode to functions.php to register the custom widget:

add_shortcode('glide_arrows', function () {
    return '<div class="glide__arrows" data-glide-el="controls">
                <button data-glide-dir="<" class="glide__arrow glide__arrow--left"><span class="tb-slider-left-arrow"></span></button>
                <button data-glide-dir=">" class="glide__arrow glide__arrow--right"><span class="tb-slider-right-arrow"></span></button>
            </div>';
});

- Registered the glide_arrows shortcode in Toolset settings.
- Edited the template containing the sliders and replaced the div with the arrow buttons with the [glide_arrows] shortcode.
This resolved the issue with the images.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

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

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 15 replies, has 2 voices.

Last updated by Mateus Getulio 5 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2702411

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Talatcan,

I'm glad to know that the original issue is fixed.

Regarding the filter section not translating, I was able to fix one of the controls: 'Meal type' by deleting, re-adding and translating that string by following the steps:

- Go to WPML -> String Translation and search for the text that is not translated, eg.: Meal type
- Select all strings that are an exact match to the text you searched and delete the strings
- Enable the option 'Look for strings while pages are rendered' at the bottom of the String Translation screen
- Visit that page on the front end so WPML adds the string again hidden link
- Go back to WPML -> String Translation, uncheck the option 'Look for strings while pages are rendered' and search for the string again, eg.: Meals type
- Translate the string and check the results

I tested it for the string Meals type and it fixed the translation issue for me.

Thank you, please let us know.
Mateus

#2702448

Thank you so much for all your help Mateus! Where have you been before!?

This was the best support I have ever had from Toolset! Even though it was a very complicated issue, you helped me a lot.

I wish all the support team could help as you did!