Support » Plugins and Hacks » [Plugin: Event Organiser] Date/Time/Venue picker disabled by Facebook AWD plugin

  • Resolved ghostfruit

    (@ghostfruit)


    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…

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    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.

    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).

    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');
    ?>

    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.

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Event Organiser] Date/Time/Venue picker disabled by Facebook AWD plugin’ is closed to new replies.