Forum Replies Created

Viewing 15 replies - 1 through 15 (of 112 total)
  • Thread Starter troyw2015

    (@troyw2015)

    The team at Siteground provided this code which appears to have fixed the issue by excluding all dFlip files.

    add_filter( 'sgo_javascript_combine_excluded_inline_content', 'js_combine_exclude_inline_script' );
    function js_combine_exclude_inline_script( $exclude_list ) {
    $exclude_list[] = 'df';
    return $exclude_list;
    }

    Thread Starter troyw2015

    (@troyw2015)

    They have come back with the following, which I implemented but it did not work;

    Hello,

    You can exclude inline scripts from being combined using the following filter. Here’s a code snippet, you can add to your functions.php file to do so:

    add_filter( 'sgo_javascript_combine_excluded_inline_content', 'js_combine_exclude_inline_script' );
    function js_combine_exclude_inline_script( $exclude_list ) {
      $exclude_list[] = 'first few symbols of inline content script';
    
      return $exclude_list;
    }

    Looking at the code, I think I need to add the ‘first few symbols of inline content script’. I tried df-shortcode-script but no good, so what are they?

    Thanks

    Thread Starter troyw2015

    (@troyw2015)

    Hey Simeon,

    I added that code to the ‘Code Snippets’ function PHP section and it did not work. I then tried adding it directly to the function.php file and it still did not work. Obviously I need the first few symbols of inline content script and tried df-shortcode-script without success, so I will pass this on to the dFlip developer and get their feedback.

    Thanks

    • This reply was modified 1 month, 2 weeks ago by troyw2015.
    Thread Starter troyw2015

    (@troyw2015)

    I have just asked how to exclude inline scripts and am waiting response. Here is the thread;

    https://www.ads-software.com/support/topic/dflip-caching-issues/#post-18271007

    Thanks

    Thread Starter troyw2015

    (@troyw2015)

    Hi Georgi,

    I excluded the /plugins/termageddon-usercentrics/public/js/termageddon-usercentrics-ajax.min.js but it did not fix the issue. I have passed this thread on to the dFlip developer, who has asked how to exclude inline scripts? Please advise.

    Thanks

    Thread Starter troyw2015

    (@troyw2015)

    OK, so SiteGround are insisting there must be a Handle. I have followed their instructions to display the Handles in the HTML Inspector and tried excluding them all, but it has not worked. I really thought this Handle would do it, but it did not dflip-script

    The SiteGround Speed Optimiser Plugin does have a Manage General window, which has a fields labeled ‘Exclude from HTML Minification’. You suggested that WP Rocket has something similar, so I have added both DFlip_ShortCode and df-shortcode-script to Exclude from HTML Minification. But of course, this does not work either!

    I am at complete loss here. I have inherited your plugin that seemingly doesn’t use handles and a caching plugin that doesn’t support whatever it is you do use (which I can’t quite understand either to be honest). Surely I can exclude your plugin from caching somehow?

    Thread Starter troyw2015

    (@troyw2015)

    Hey Georgi,

    As mentioned in my previous message, I have discussed with the actual plugin developer and this is what they have said. I have followed your directions and even excluded the dflip-script but it isn’t working. As I am a developer, I am certainly not paying another one to do exactly what I have been doing.

    I will go back to Dearhive Plugin developers, but like myself, they appear to be at a loss as to why your plugin doesn’t have proper exclusion options. Since SiteGround use this particular Caching system, its not ideal that the associated plugin is so restrictive.

    They have also reported this error from your plugin, which may be related? siteground-optimizer…bc13ffa2574afb.js:2 Uncaught Error: No Usercentrics script ID "usercentrics-cmp" found

    • This reply was modified 1 month, 2 weeks ago by troyw2015.
    Thread Starter troyw2015

    (@troyw2015)

    I have asked the developer for dFlip and this is the resoponse;

    The shortcode is handled by a function shortcode in Class DFlip_ShortCode . This is in file inc/shortcodde.php

        add_shortcode( 'dflip', array( $this, 'shortcode' ) );

    Not sure how are going to exclude php functions in cache.

    For HTML cache, in other cache plugins like wp-rocket, excluding the script class df-shortcode-script works

    <script class="df-shortcode-script" type="application/javascript">window.df_option_5413 = .................
    Thread Starter troyw2015

    (@troyw2015)

    Hi,

    Are you able to tell me the handle for this Shortcode, so that I can exclude it from caching?

    Thanks

    Thread Starter troyw2015

    (@troyw2015)

    Also tried these;

    $exclude_list[] = 'wp-i18n';
    $exclude_list[] = 'dflip-script-js';

    Still doesn’t work?

    Thread Starter troyw2015

    (@troyw2015)

    OK, so I searched the HTML and found 22 data-handles. I can’t find any clues as to which is the right one, som tried these ones as they are in the area of the block. Still it doesn’t work!

    add_filter( 'sgo_js_minify_exclude', 'js_minify_exclude' );
    function js_minify_exclude( $exclude_list ) {
    $exclude_list[] = 'dflip-script';
    $exclude_list[] = 'wp-polyfill';
    $exclude_list[] = 'wp-url';
    $exclude_list[] = 'wp-api-fetch';

    return $exclude_list;

    }

    • This reply was modified 1 month, 2 weeks ago by troyw2015.
    Thread Starter troyw2015

    (@troyw2015)

    Hey Simeon,

    Yes, I have read the section you pasted above and it does not work.

    I installed ‘Code Snippet’ Plugin as instructed and added the following to the Functions PHP;

    add_filter( 'script_loader_tag', 'cameronjonesweb_add_script_handle', 10, 3 );
    function cameronjonesweb_add_script_handle( $tag, $handle, $src ) {
    return str_replace( '<script', sprintf(
    '<script data-handle="%1$s"',
    esc_attr( $handle )
    ), $tag );
    }

    I can see the code is there, but when I go into the Inspect and Styles, I search for Handle and get no results?

    The code is there now, so please check it in inspector yourself and you’ll see.

    I am a bit confused about these handles. Am I missing a step? Do I need to name something somewhere?

    Thanks

    • This reply was modified 1 month, 2 weeks ago by troyw2015.
    Thread Starter troyw2015

    (@troyw2015)

    Hi and thanks for your prompt response.

    I followed your link ‘How to Follow SG Optimizers Filters’ but the code does not generate anything when I select “Inspect Element.” Under “Styles,” and search for “handle” or “data-handle.” I get no results?

    The dFlip developer has suggested that I try to exclude df-shortcode-script but this does not appear in the list of exclusions. How can I add this or how can I find this Handle you speak of?

    Thread Starter troyw2015

    (@troyw2015)

    I have figured out how to change the Listings fields now, but how can I remove the ‘Locations’ field for specific categories? I’m also struggling to understand how to order the fields in the Vendor Submit Listing and how to add a field for the vendor to add their logo?

    Thread Starter troyw2015

    (@troyw2015)

    Thanks Jonayed,

    Where I am still confused is while I understand that adding the GTIN to the new plugin syncs to Google, what happens when the GTIN in the old ‘Google for Woocommerce’ Tab displays a different GTIN?

    Also, what is this ‘Migration Tool’ you keep mentioning?

    Again, my issue stems from my client duplicating products to create variations of similar products (such as colour). When they duplicate the product, they can change the GTIN in the Inventory, but not the old ‘Google for Woocommerce’ tab, which retains the old GTIN from the original product.

    So my questions are;

    A. Is this a problem for any Google services that utilise this data (such as Google Merchant Centre)

    B. Is the old Google for Woocommerce GTIN field completely redundant and no longer accessed by Google Services?

    C. If there is a problem with having a different GTIN in the Google for Woocommerce GTIN field, how do I remove it?

    Thanks

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