Forum Replies Created

Viewing 15 replies - 1 through 15 (of 185 total)
  • Thread Starter KS

    (@karl19)

    Hello @bcworkz many thanks for your very useful reply! I hadn’t come across that filter before, very interesting.

    Yes, the number slug restriction is due to pagination and in our case, it’s very unlikely to have pagination for 2024 pages, so that shouldn’t be an issue. I’m still in two minds about whether to disable the filter or not, it is useful to stop duplicates, especially if other people are working on the site and forgetting to be careful.

    Either way, thanks a lot for pointing me in the direction of this filter!

    Thread Starter KS

    (@karl19)

    Hello Tom, ah many thanks! I didn’t know about this dynamic caching of CSS function, even though I have built a whole bunch of sites with GP. Thanks for pointing this out!

    Thread Starter KS

    (@karl19)

    Hi David, many thanks for the quick reply! I tried this, unfortunately it didn’t help solve the issue.

    It’s a bit odd, if I remove the actual filter in /inc/css-output.php (lines 550-553) just to test, still nothing happens and the CSS code still gets output into the inline CSS “generate-style-inline-css”. Only if I remove:

    wp_add_inline_style( 'generate-style', wp_strip_all_tags( $css ) );

    in the generate_enqueue_dynamic_css function, does I get rid of the CSS for that bottom margin. But then of course, I lose all other GP inline styling.

    Thread Starter KS

    (@karl19)

    I can only concur with @fruchtfliege. It used to work, Borlabs hasn’t changed their setup and I find it a bit disappointing that you get hung up on me saying “Borlabs’ guess is .. ” – they just gave their opinion on why the combination of the two plugins doesn’t work any longer. It doesn’t mean that their plugins breaks the functionality and they have something to fix or that somehow you need to debug their plugin.

    This functionality used to work, for both me and @fruchtfliege , later versions of gTranslate seem to have changed how it gets initialised and this causes issues in relation to cookie control and the GDPR.

    Thread Starter KS

    (@karl19)

    Hi @edo888 thanks for the reply, but please see above https://www.ads-software.com/support/topic/widget-code-replacement/#post-16839734.

    Borlabs did look into it and said their shortcode doesn’t block anything.

    Their guess was that gTranslate loads the relevant classes on page load and when it’s delayed through a cookie function, it doesn’t load the correct classes as the page has already loaded. So it seems like gTranslate is causing the issue here, not Borlabs, as they just provide a standard cookie functionality.

    Thread Starter KS

    (@karl19)

    Hi @fruchtfliege , did you ever manage to figure this out? There hasn’t been any more input from gTranslate.

    Thread Starter KS

    (@karl19)

    I figured out how to get the data I needed. In the main repeater field, I changed to “save in meta”, then I could use this:

    <ul>
      <?php $repeater = get_lzb_meta( 'toc' );
      foreach ( $repeater as $inner ) { ?>
        <li><a href="#<?php echo $inner['toc_id']; ?>"><?php echo $inner['toc_title']; ?></a></li>
      <?php } ?>
    </ul>
    Thread Starter KS

    (@karl19)

    Hello @edo888, would be great with some input on whether GTranslate sets the above classes on page load and if so, if there is a way to delay this process until cookies are confirmed, or a way to reset them. Thanks!

    Thread Starter KS

    (@karl19)

    Hi @edo888 many thanks for the reply!

    I was in contact with Borlabs, they said their shortcode doesn’t modify anything that their shortcode blocks. So it’s not their plugin that actively strips out the glink nturl notranslate gt_raw_link-xxjexk classes.

    Their guess was that gTranslate sets these classes with JavaScript on page load, and while in our case the flags only show after cookies are confirmed, this doesn’t happen.

    Could that be the reason? Is there anyway to delay the gTranslate function, until after cookies are confirmed?

    Thread Starter KS

    (@karl19)

    Just as a bit of additional info: since I updated both the Borlabs Cookie and gTranslate plugins, I wasn’t sure which plugin caused issues. Keeping Borlabs updated to latest version, but rolling gTranslate back to 2.9.13 and then running:

    <?php echo do_shortcode('[borlabs-cookie id="google-translate" type="cookie"][gtranslate][/borlabs-cookie]'); ?>

    works fine. Running the same code on gTranslate 3.0.3 (or 3.0.1 which I also tried), nothing is output. So it does seem like gTranslate doesn’t cope well being loaded inside another shortcode. And as mentioned above, if running:

    <?php echo do_shortcode('[borlabs-cookie id="google-translate" type="cookie"][gt-link lang="en" label="" widget_look="flags_name"][/borlabs-cookie]'); ?>

    the flags show, but nothing happens if they get clicked. I don’t know what technically is causing this, but it seems like gTranslate doesn’t fully load all its code, when getting loaded inside another shortcode.

    Thread Starter KS

    (@karl19)

    I do still have one problem. Previously I could wrap the gTranslate inside another shortcode – for Borlabs Cookies – like this:

    <?php echo do_shortcode('[borlabs-cookie id="google-translate" type="cookie"][gtranslate][/borlabs-cookie]'); ?>

    and it was possible to show or hide flags, depending on whether cookies were accepted. If I run this now, with gt-link:

    <?php echo do_shortcode('[borlabs-cookie id="google-translate" type="cookie"][gt-link lang="en" label="" widget_look="flags_name"][/borlabs-cookie]'); ?>

    the flags show if I allow cookies, but nothing happens if I click on them. If I look at the HTML, it looks like this:

    <a href="#" data-gt-lang="en" class="gt-current-lang"><img src="/wp-content/plugins/gtranslate/flags/24/en.png" width="24" height="24" alt="en" loading="lazy"> <span></span></a>

    If I don’t wrap the gTranslate shortcode in the Borlabs shortcode, instead it outputs this:

    <a href="#" data-gt-lang="en" class="glink nturl notranslate gt_raw_link-xxjexk gt-current-lang" title="English"><img src="/wp-content/plugins/gtranslate/flags/24/en.png" width="24" height="24" alt="en" loading="lazy"> <span></span></a>

    which works fine. I don’t know if it’s Borlabs or gTranslate that doesn’t play nice with the other plugin?

    Thread Starter KS

    (@karl19)

    I could get it to work with:

    <?php echo do_shortcode('[gt-link lang="en" label="" widget_look="flags_name"]'); ?>
    <a href="#" onclick="doGTranslate('en|en');location.;return false;" class="glink nturl notranslate"><img src="/wp-content/plugins/gtranslate/flags/24/fr.png" height="24" width="24" alt="Fran?ais"></a>
    <?php echo do_shortcode('[gt-link lang="de" label="" widget_look="flags_name"]'); ?>
    <?php echo do_shortcode('[gt-link lang="it" label="" widget_look="flags_name"]'); ?>
    <?php echo do_shortcode('[gt-link lang="sv" label="" widget_look="flags_name"]'); ?>

    but it doesn’t look very clean. But perhaps this is the only way to do it, if Widget Code is gone?

    Thread Starter KS

    (@karl19)

    Hi Jory, yes that’s what I was a bit unsure about. I presumed the standard media modal instance included the filtration by type (including uploaded-by-post) as it shows in the media gallery or when adding a featured image. I thought maybe Pods had specifically limited the selection, but perhaps I was wrong and only a date filter is standard in the media function.

    Thread Starter KS

    (@karl19)

    As a temporary solution to get my posts updated, I installed this plugin https://www.ads-software.com/plugins/enhanced-media-library/, which added the “uploaded to this post” dropdown (as well as a lot of other filters).

    Thread Starter KS

    (@karl19)

    Hi Paul, many thanks for the reply, I have created a feature request here https://github.com/pods-framework/pods/issues/7092

    Personally, I don’t really need a setting, I just need it temporarily as I’m manually updating a lot of posts after moving to Pods. Since the media popup normally seems to include the ability to filter on type (uploaded to post, file type etc), I figured this dropdown was blocked when Pods Gallery loads the WP media popup function, but unfortunately I can’t figure out where in the code this is defined.

Viewing 15 replies - 1 through 15 (of 185 total)