• Resolved Julian

    (@juliangk)


    I have a problem, specifically using borlabs cookie plugin. On a specific page I have created a custom ACF block that outputs a leafeltmap that is conditionally wrapped in a shortcode provided by the borlabs content blocker, which is:

    echo do_shortcode( '[borlabs-cookie id="open-street-map-leaflet-map" type="content-blocker"] <div id="map-' . $id . '" style="height:' . $height . 'px;"></div>[/borlabs-cookie]');

    However, even if I exclude the selector or string in advanced options, the shortcode is output as text on the frontend in the translated language. I have not found a way to exclude the shortcode of being transformed into text.

    So instead of showing the content blocker the shortcode is dispalyed as text on the page.

    How can I work around this issue?

    Best regards
    Julian

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Julian

    (@juliangk)

    Wrapping the shortcode in a language shortcode does also not work:

    Neither:

    echo do_shortcode( '[trp_language language="en_GB"]' . do_shortcode( '[borlabs-cookie id="open-street-map-leaflet-map" type="content-blocker"] <div id="map-' . $id . '" style="height:' . $height . 'px;"></div>[/borlabs-cookie]') . '[/trp_language]');

    nor:

     echo do_shortcode( '[trp_language language="en_GB"][borlabs-cookie id="open-street-map-leaflet-map" type="content-blocker"] <div id="map-' . $id . '" style="height:' . $height . 'px;"></div>[/borlabs-cookie][/trp_language]');

    is working.

    • This reply was modified 3 months, 4 weeks ago by Julian.
    Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    Please, use the PHP variant for the conditional approach, not the shortcode one.

    • This reply was modified 3 months, 4 weeks ago by Alex.
    Thread Starter Julian

    (@juliangk)

    Hi Alex,

    I think you misunderstood my issue. It doesn’t matter what condition check I use. The function do_shortcode is not working on the translated page. The shortcode is rendered as text, not as a shortcode!

    This code:

    if( is_plugin_active('borlabs-cookie/borlabs-cookie.php') && $locale == 'en_gb' ){ 
    echo do_shortcode( '[borlabs-cookie id="open-street-map-leaflet-map" type="content-blocker"] <div id="map-' . $id . '" style="height:' . $height . 'px;"></div>[/borlabs-cookie]');
    }

    Renders this:
    [borlabs-cookie id=“open-street-map-leaflet-map“ type=“content-blocker“][/borlabs-cookie] as text on the frontend! But only on the translated page. It works in the original language.

    • This reply was modified 3 months, 3 weeks ago by Julian.
    • This reply was modified 3 months, 3 weeks ago by Julian.
    • This reply was modified 3 months, 3 weeks ago by Julian.
    Thread Starter Julian

    (@juliangk)

    Hello,

    can I kindly ask to get a response? I have to fix this issue, a customer is waiting for the translation to go online. I can not publish it until this problem is fixed.

    Best regards
    Julian

    Thread Starter Julian

    (@juliangk)

    Hello,

    this issue is not resolved. Please, I need a fix for this problem!

    Plugin Support Anca

    (@ancavictoria)

    Hello @juliangk

    We apologize for the delayed response, our support team has experienced a significant load recently.

    Thank you for all the details provided; they have been helpful in reproducing the issue and finding a solution.

    It appears that this plugin has integration for multilingual plugins, and to function correctly in the additional languages, it needs to be configured for these languages as well.

    In the dashboard, navigate to Borlabs Cookie – Settings. On the right side, you will see a language switcher; it is necessary to select each language in which you want the shortcode to function. Then, in the “General Settings” section, the “Borlabs Cookie Status” option needs to be activated, and the changes must be saved.

    Could you please confirm if everything works correctly for you after following these steps?

    Looking forward to your response.

    Kind Regards,

    Anca

    Thread Starter Julian

    (@juliangk)

    Hello Anca,

    thank you very much for getting back to me.

    It actually works now, I had no idea that the solution was this simple. I didn’t know I could switch languages without either polylang or WPML being installed.

    Thank you!

    Best regards
    Julian

    Plugin Support Anca

    (@ancavictoria)

    Hello @juliangk

    Happy to hear the proposed solution worked perfectly.

    As you noticed this wasn’t a bug in TranslatePress, it was related to how Borlabs Cookie integrates with multilingual solutions. Borlans Cookie doesn’t have a free version on?wp.org?so my colleagues went the extra mile to create the setup you described and figure out the issue.

    It would be highly appreciated if you would increase your review grade to reflect this. I fully understand that you want to get help as fast as possible and we do our best to offer that, but also please bare in mind that this is a free plugin and the support we provide is also free and our resources are limited.

    Thank you in advance and wishing you the best of luck with your project!

    Kind Regards,

    Anca

    Thread Starter Julian

    (@juliangk)

    Hello Anca,

    I have changed my review, but as I consider a quick support response, or acknowledgement of a problem as quite important, I can not give a five-star review. Even though I appreciate your effort very much, at least responding in a timely manner to a support ticket, even if it’s just a “we will look into it” response, is something I consider as essential for any WordPress plugin, no matter if free or not, as the free versions usually lead to paid version conversion and a good support in a free plugin also means good support for paid versions.

    Thank you and best regards
    Julian

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.