Search Results for 'dequeue'

Home Forums Search Search Results for 'dequeue'

Viewing 15 results - 16 through 30 (of 274 total)
  • Author
    Search Results
  • #1605496
    Brendan
    Keymaster

    Hi there,

    Thanks for emailing support and sorry you are having issues. Sounds like there is a conflict. To get you started on troubleshooting: First, please make sure you are using the most current versions of all of our plugins. You can also try reinstalling them by following these instructions. If that doesn’t help, the next step in troubleshooting this is going to be testing for conflicts with your theme and other plugins (with WP_DEBUG enabled). If you need a testing environment, the free WP Staging plugin will let you create a quick copy of your live site that you can use for testing.

    Let me know what you find.

    You can also try installing this plugin to dequeue scripts from the calendar and see if that solves the issue.

    Thanks,
    Brendan

    #1601552
    Andras
    Keymaster

    Hi Eric,

    Thanks for reaching out to us!

    We are definitely planning to fix this. Until the fix is out, as a workaround you can copy this snippet into your (child) theme’s functions.php file:

    [code language=”php”]
    function tribe_events_map_apis() {
    if (tribe_is_event() || is_singular( ‘tribe_events’ ));
    wp_dequeue_script( ‘tribe-events-pro-geoloc’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘tribe_events_map_apis’ );
    [/code]

    Let me know if that helps.

    I am going to set the status of this ticket to “pending fix” and we will update it once the fix is released.
    If you have any new questions or issues please create a new ticket and we’ll help you out.
    Thanks and cheers,
    Andras

    #1593395
    Brendan
    Keymaster

    Hi there,

    Thanks for emailing support and sorry you are having issues. Sounds like there is a conflict. To get you started on troubleshooting: First, please make sure you are using the most current versions of all of our plugins. You can also try reinstalling them by following these instructions. If that doesn’t help, the next step in troubleshooting this is going to be testing for conflicts with your theme and other plugins (with WP_DEBUG enabled). If you need a testing environment, the free WP Staging plugin will let you create a quick copy of your live site that you can use for testing.

    Let me know what you find.

    You can also try installing this plugin to dequeue scripts from the calendar and see if that solves the issue.

    Thanks,
    Brendan

    #1593205
    Sky
    Keymaster

    Hi Ryan,

    I looked into this a bit more, and it seems that what may be happening is that the styles you are trying to remove are listed as dependencies of another asset. You would need to find out what is requiring those stylesheets and dequeue it as well.

    Or, re – enqueue the styles that are missing once you deregister.

    I just tried the dequeue assets extension, and it seems to be broken after these changes. Hopefully, we can get that working again, and you’ll be able to use it instead of having to do this manually.

    I’m going to create a bug ticket for the extension, and attach this thread to it. Someone will follow up here with you once this has been fixed to let you know.

    In the meantime, I’ll see if there is another way to dequeue the specific files you have in your snippet. Do you know if there are more styles you need besides the datepicker and jquery styles?

    Thanks,
    Sky

    #1592488
    Cliff
    Member

    Since it’s a new issue, I thought maybe you had custom code to dequeue our script and maybe that custom code didn’t work for the latest versions… just a thought why it might have worked before but not now.

    Please view the snippet at https://theeventscalendar.com/knowledgebase/troubleshooting-google-maps/#conflicts to dequeue ours and see if that resolves things for you.

    https://theeventscalendar.com/knowledgebase/implementing-custom-code-snippets/ can help you understand how to implement custom code snippets.

    Please let me know how this goes for you.

    #1592457
    Ryan
    Participant

    Hi Sky,

    Thank you for your response. That does remove the stylesheets, but has the unfortunate side effect of removing all of the stylesheet dependencies that I do need loading for the datepicker to function (tribe-events-bootstrap-datepicker-css, tribe-events-custom-jquery-styles).

    Is there no longer a way to use wp_dequeue_style to remove tribe-events-calendar-style after the latest release?

    Thanks,

    -Ryan

    #1591142
    Sky
    Keymaster

    Hi there,

    Thanks for reaching out. I will try to help with this issue.

    I tried this out, and was seeing the same results. I then changed wp_dequeue_style to wp_deregister_style in your code snippet, and it seems to be working.

    Give that a shot and let me know if that works for you!

    Thanks,
    Sky

    #1583433

    Hi Shay,

    Try adding the following code to your functions.php file to remove the map scripts from certain views, which may make the error go away:

    // Dequeues tribe-events-ajax-maps.min.js

    function dequeue_tribe_geoloc_scripts() {
    if ( function_exists( 'tribe_is_event') ) {

    if ( !is_singular( 'tribe_events' ) && tribe_is_view('month') || tribe_is_view('day') || tribe_is_view('week') ) {
    wp_dequeue_script( 'tribe-events-pro-geoloc' );
    }

    }
    }
    add_action('wp_enqueue_scripts', 'dequeue_tribe_geoloc_scripts', 100 );

    Let me know if that helps!

    Thanks,
    Jaime

    #1572346
    David Golden
    Participant

    Is there any update on this one? I’ve tried a few different methods and this script continues to load on my site.

    Both your dequeue extension and the following code, failed to deregister the script. I’ve tried both a lower and higher priority without any change.

    add_action( ‘wp_enqueue_scripts’, ‘en_remove_tribe_select2’, 20 );
    function en_remove_tribe_select2() {
    wp_deregister_script( ‘tribe-select2’ );
    }

    #1569380
    Sky
    Keymaster

    Hi there,

    I’m sorry to hear that you’re experiencing this issue. I will try to help you get this sorted.

    We are aware of this issue. It is a conflict with the version of the Select2 js library that our plugins use. It seems that a recent update to the Woo Membership plugin has triggered some problems.

    You might try reverting to an earlier version of that plugin if possible. Otherwise, I can provide a method of dequeueing the version that our plugin uses.

    You can add the following to your child theme functions.php or a functionality plugin:

    wp_deregister_script( 'tribe-select2' );

    Doing so may affect the plugin functionality of the events interface, but it will hopefully still be useable.

    I’m going to attach this thread to the bug ticket, and if and when we can provide a fix, someone will follow back up with you here to let you know.

    Please let me know if you have any other questions in the meantime.

    Thanks,
    Sky

    Brendan
    Keymaster

    Hi there,

    Thanks for emailing support and sorry you are having issues with select2 conflicts. You are correct to dequeue the tribe version. In regards to updating our version to the latest version or scoping it to work with EC only is a great suggestion and I will pass it along to the devs.

    If you would like you can fill out a feature request as well.

    Thanks,
    Brendan

    Cliff
    Member

    Understood, but please be aware of https://theeventscalendar.com/knowledgebase/what-browsers-do-you-support/

    You should be able to dequeue them using the admin_enqueue_scripts hook. Please look into /wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php

    Please let me know how this goes for you.

    Ryan
    Participant

    Hi Cliff,

    Thank you for the response. We have a significant number of users on browser versions that don’t support HTTP/2. We are a public agency, so we try to support as many users as possible.

    Is it possible to dequeue these stylesheets? The associated scripts for some of these stylesheets are not loading on event pages (bumpdown, buttonset), so I’d like to get them removed even for folks on HTTP/2 supporting browsers.

    Select2 stylesheet is still loading unminified. I’m not in debug mode and all plugins are up to date. Also tested with other plugins deactivated and 2017 theme.

    Thanks!

    #1535548

    In reply to: GDPR: Google Maps

    Andras
    Keymaster

    Hallo,

    It is easier for you to do the workaround, as if I do it ;).

    Might be, I’m not familiar with your development skills. 😉 However, our resources – just like everybody else’s – are limited, so even if this will be considered to be a feature of the plugin, it might take some time to get it developed.

    Cookie names

    I checked the borlabs website. There are 2 options to choose from (all cookies and some cookies). The cookie name that was set it ‘borlabsCookie’ with the following values respectively:

    You can figure out other cookie name by installing an add-on / plugin for your browser. This time I used ‘Cookie Manager’ for Firefox.

    You might need to adjust the code to look for the cookie value as well. This page can help you with that: https://cloudup.com/cKmMUPhrSQ8

    And yes, the code should go into the functions.php file.

    Can I alternatively switch all maps off?

    Yes, I believe if you just add the following 2 lines to your functions.php file, then the maps will be off.

    wp_dequeue_script( 'tribe_events_google_maps_api' );
    wp_dequeue_script( Tribe__Events__Embedded_Maps::MAP_HANDLE );

    You can also disable the ‘Map view’ under Events > Settings > Display tab, so users cannot access it.

    That should do it.

    Cheers,
    Andras

    #1533624

    In reply to: GDPR: Google Maps

    Andras
    Keymaster

    Hey Tilman,

    Thanks for the article, will check it out.

    user have to give their active consent to be tracked. As Google Maps tracks users, the consent is needed before the service is offered.

    Yes, we are aware of this part.

    As far as I know the site owner’s responsibility to point out to the users in their privacy policy what data is being collected, tracked, and used.

    One way of doing things is that if they do not consent, then they are taken away from the website. Currently I believe this is how it is done in majority of the cases.

    And of course the nicer way to do it is not loading the content that users don’t consent to. This is a bit trickier to implement obviously.

    A colleague offered a partial solution for this:

    If you have a cookie consent popup (or whatever), the user accepts it, then the cookie gets set. Then you could use this snippet for loading / not loading the map:

    function cookies_are_go() {
    return ! empty( $_COOKIE['cookies_are_go'] )
    && '1' === $_COOKIE['cookies_are_go'];
    }
    add_action( 'tribe_events_map_embedded', function() {
    if ( ! cookies_are_go() ) {
    wp_dequeue_script( 'tribe_events_google_maps_api' );
    wp_dequeue_script( Tribe__Events__Embedded_Maps::MAP_HANDLE );
    }
    } );

    You will need to check and change the cookie name in the first function.

    Two notes:

    The downside is that if they landed on a single event post and only then agreed to the use of cookies, the map would still be missing and they’d need to do a page reload. The JS handling the cookie permission could do that, though.

    This only covers maps on the single event page, but in principal could be extended to map view, too.

    Hope this helps.

    Cheers,
    Andras

Viewing 15 results - 16 through 30 (of 274 total)