strangerstudios / pmpro-reason-for-cancelling

Adds a field to specify a reason for cancelling to the cancel page.
https://www.paidmembershipspro.com/add-ons/pmpro-reason-cancelling/
13 stars 10 forks source link

WP block search widget prevents form submit #21

Open ipokkel opened 2 years ago

ipokkel commented 2 years ago

Describe the bug Cannot submit the reason for cancelling on the PMPro Cancel Page when the WordPress Block Search Widget is present on the page.

To Reproduce Steps to reproduce the behavior:

  1. Go to Membership Account Page
  2. Click on Cancel for membership level
  3. Fill in reason for cancelling and submit.
  4. See error

Screenshots 220107-1641531033

Isolating the problem (mark completed items with an [x]):

ipokkel commented 2 years ago

Possible temporary workarounds

  1. Remove the block search widgets (Appearance > Widgets), or
  2. Remove the required attribute from the block search widget's input field.
function remove_wp_block_search_required_attribute() {
    global $pmpro_pages;

    if ( is_page( $pmpro_pages['cancel'] ) ) {
        ?>
        <script>document.querySelector('.widget .wp-block-search__input').required = false;</script>
        <?php
    }
}
add_action( 'wp_footer', 'remove_wp_block_search_required_attribute', 15 );
ipokkel commented 2 years ago

This seems to arise whenever a search form is present on the PMPro Cancel Page. On submit of the reason for cancelling the submit for the search form is triggered and takes precedence.

Moderators Only: https://www.paidmembershipspro.com/forums/topic/cancellation-page-not-working/

michaelbeil commented 2 years ago

As reported in ticket 402748 (moderators only).

After typing a reason for cancelling and clicking on Yes, the cursor moves to the web site footer to a sign up form and a popup box appears stating “Please fill out this form”. See screenshot attached. Problem still occurs after deleting and loading updated Add On plugin. When I deactivate Add On plugin, cancellation works as expected. when I fill in the form with my email address the Cancellation is processed as expected.

andrewlimaza commented 1 year ago

The general report here sounds like if any other form is on the page it doesn't work. We are looking into this and I've marked this as blocking Next Release.

michaelbeil commented 1 year ago

This came up in another ticket 440616 (moderators only).

michaelbeil commented 1 year ago

Reported for a newsletter sign up in ticket 461703 (moderators only).

... the membership cancelation button also no longer functions. Instead it requires a member to input their e-mail address into the newsletter signup.