WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Event Organiser] Date/Time/Venue picker disabled by Facebook AWD plugin (7 posts)

  1. ghostfruit
    Member
    Posted 2 years ago #

    I noticed that the date picker, time picker, and venue dropdown were no longer working when adding a new event. I disabled Facebook AWD and they worked again.

    I'd really like to use both and I'm hoping I can just change a line somewhere so they're not trying to use the same resources (or whatever the problem is).

    Edit: Should this be directed towards Facebook AWD? Sorry if I aimed this comment at the wrong plugin...

  2. Stephen Harris
    Member
    Posted 2 years ago #

    Yup - this was reported by someone else too.

    The problem is with the Facebook AWD. See above link for a fix - but this should be reported to Facebook AWD as well, since an update will over-ride your changes.

  3. Stephen Harris
    Member
    Posted 2 years ago #

    I've just realised this has been tagged with facebook-awd :), so I'll post the patch here too.

    Currently the plug-in is loading its own jQuery UI scripts from its assets folder: ( AWD_facebook.php, line 596)

    wp_enqueue_script($this->plugin_slug.'-jquery-ui');

    WordPress provides jQuery UI script, and loading a second copy will break plug-ins that use it. Changing the above to:

    //wp_enqueue_script($this->plugin_slug.'-jquery-ui');
         wp_enqueue_script('jquery-ui-core');
         wp_enqueue_script('jquery-ui-accordion');
         wp_enqueue_script('jquery-ui-tabs');

    It would be great if you could fix this to prevent breaking other plug-ins.

  4. ghostfruit
    Member
    Posted 2 years ago #

    Yes! That did the trick. I spent a lot of time searching before I posted, but nothing came up under "date picker".

    Thank you for supporting your plugin so actively! We're in the process of converting our website over to WordPress and it has been a HUGE boon for us (we're a non-profit art gallery).

  5. AHWEBDEV
    Member
    Posted 2 years ago #

    As the plugin have is own register script for jquery ui, you can disable it without edit facebook AWD file.

    <?php
    //put that somewhere in a 'mini plugin'
    global $AWD_facebook;
    wp_deregister_script($AWD_facebook->plugin_slug.'-jquery-ui');
    ?>
  6. Stephen Harris
    Member
    Posted 2 years ago #

    But won't that break the facebook AWD plug-in, since it will no longer enqueue the necessary jQuery UI?

    Really, you shouldn't be registering your own jQuery UI script - but using WordPress's stored jQuery UI. Otherwise, it will break other plug-ins.

  7. AHWEBDEV
    Member
    Posted 2 years ago #

    Yes, i know that, but WP jquery source for UI is not complete.
    I will try to call what i only really need for the next release

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic