• 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)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Preventing YARPP settings from saving’ is closed to new replies.