Support

Account

Home Forums Backend Issues (wp-admin) Conflict with Fresh Custom Code – CSS/JS/PHP plugin

Solving

Conflict with Fresh Custom Code – CSS/JS/PHP plugin

  • Hi,

    I’m not sure when this conflict started as I have had both ACF Pro (via Intense shortcodes) and Fresh Custom Code plugins working together for some time (2years+).

    An ACF Pro update has triggered a script name conflict within Fresh Custom Code which prevents the admin user from accessing the FCC script setting page “run on page url” drop-down field. Thereby preventing us from choosing “which page” the Fresh Custom Code script should run on.

    When the FCC admin form loads you quickly see the “Page name” menu field element appear and then its gone at end “on-load”. The select menu flashes at super wide width (which isn’t normal) and then vanishes, so you cannot choose a page or change any existing URL set.

    The browser developer console points to:

    ’…/advanced-custom-fields-pro/assets/inc/select2/4/select2.full.min.js?ver=4.0’.

    Error showing as “The select2(‘destroy’) method was called on an element that is not using Select2.”

    So my guess is a conflict in an ACF function name and order of JS file inheritance.

    I have lodged the issue with Freshface (developer) who is unresponsive. The plugin operates okay but administering and adding new scripts is hampered by this conflict.

    Turning off ACF Pro restores FCC plugin to normal operation.

    Any ideas on how to stop this?

    FCC link: Fresh Custom code plugin

  • This issue could be due to a conflict in the Select2 versions. You should look into what version of Select2 the other plugin is using.

    ACF has a setting that you can use that might let you force it to use the same version. https://www.advancedcustomfields.com/resources/acf-settings/

    Alternately, if there are no ACF fields on the page in question you might be able to unqueue the Select2 script enqueued by ACF so that the other plugin can properly enqueue its version. I’m not 100% sure of the details for doing this. Here are a couple of previous support topics that might help you https://support.advancedcustomfields.com/forums/topic/select2-conflict-with-awesome-support/ and https://support.advancedcustomfields.com/forums/topic/select2-version/

  • I will run some experiments. Thanks for the great suggestions.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Conflict with Fresh Custom Code – CSS/JS/PHP plugin’ is closed to new replies.