Support » Plugin: Easy Forms for Mailchimp » Preventing YARPP settings from saving

  • Resolved Michael Nelson

    (@mnelson4)


    Hi I help develop the YARPP plugin.

    We’ve tracked down a bug that results from a conflict between our two plugins.

    The Javascript from your code that’s at play in the conflict is this:

    
    e('body').on('click', '.disabled', function () {
          return !1
        })
    

    (where e is jQuery renamed).

    That is preventing our settings page from saving because we have code that adds a cute spinner gif and *disables the submit button* (to prevent the user from clicking it over and over again if it’s slow). Like this:

    
    $('.yarpp_spin_on_click').on('click', function() {
        $button = $(this);
        $spinner = $button.siblings('.spinner');
    
        $button.addClass( 'disabled' );
        $spinner.addClass( 'is-active' );
      });
    

    We can workaround by using a different CSS class (eg we could make one called yarpp-disabled and copy all of disabled‘s style information over to it). But I think your current code has a high likelyhood to conflict with other plugins, so it might be good to change the code on your end. Eg maybe your selector could be more specific, so you know it only applies to your inputs.
    Eg you could change your code to

    
    e('body').on('click', '.yikes-easy-mc-wrap .disabled', function () {
          return !1
        })
    

    and then on all your admin pages, in the div that wraps all your content, add the CSS class yikes-easy-mc-wrap. Eg <div class="wrap yikes-easy-mc-wrap">...

    What do you think? Or is there a better solution?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor yikesinc

    (@yikesinc)

    Hi @mnelson4

    Thank you for the heads up! I recently used YARPP for a project and it worked great!

    Jon will get back to you about this issue.

    -Tracy

    jpowersdev

    (@jpowersdev)

    Hi @mnelson4,

    Thank you for bringing this to our attention! I agree, that selector is much too broad. I’ll work on a resolution, and I think your suggestion will do the job.

    Thanks,
    Jon

    YARPP

    (@jeffparker)

    Hi @jpowersdev + would you also consider loading your JS only on WP Admin pages it needs to be loaded, if possible?

    Hi @mnelson4 & @jeffparker,

    We’ve just released version 6.8.4 to address these concerns. Please let us know if you find any further compatibility issues with our plugin.

    Thanks again for reaching out!

    Thanks,
    Jon

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Preventing YARPP settings from saving’ is closed to new replies.