WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Title Toggle
[resolved] Metabox script conflicting with other plugin (2 posts)

  1. ryanbednar
    Member
    Posted 2 years ago #

    First off Bill, thanks for the handy plugin... it has worked great for me on many genesis websites.

    That said, I recently ran into an issue where this plugin conflicts with another great plugin... in this case, the Types plugin.

    The problem appears when I try to add a new custom field (with a date-picker) via the Types plugin... the Types date-picker becomes non-functional. After disabling all my plugins, I was isolate the problem to the Genesis Title Toggle (GTT) plugin, and more specifically the problem lies within this file: /lib/metabox/jquery.cmbScripts.js included with the GTT plugin. It appears as though the both plugins are trying to load similar/conflicting datepicker scripts, thus preventing the Types datepicker from working.

    To test my theory, I commented out this piece of code (line 381) in the init.php file of the GTT plugin to prevent the troublesome javascript file from loading:

    wp_register_script( 'cmb-scripts', CMB_META_BOX_URL.'jquery.cmbScripts.js', array( 'jquery','media-upload','thickbox' ) );

    Afterwards, both plugins seem to work properly... but I'm sure there's a better method. Obviously I could leave this commented out, but it would be great to find a solution that won't re-appear when I upgrade the GTT plugin.

    Any suggestions? Thanks in advance!
    ~Ryan

    http://wordpress.org/extend/plugins/genesis-title-toggle/

  2. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for posting this! As you said, it's actually a conflict with the metabox script, not the plugin itself.

    I'm posting this as a bug over on Github where we maintain the metabox library. We're in the process of refactoring that code and this should definitely be on the list of fixes.

    https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress/issues/144

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic