Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve error on pagination of Donor back end pages #3719

Closed
Benunc opened this issue Oct 1, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@Benunc
Copy link
Member

commented Oct 1, 2018

Bug Report

User Story

As a site admin, I want to be able to navigate to a certain page of the Donors table from the UI so that I don't have to manually type in the query string to the URL.

Current Behavior

When Navigating to Donations > Donors on the back end of the site, I should be able to manually type in a number to this box and press "return" on my keyboard to go to the selected page.

screen shot 2018-10-01 at 10 59 32 am

Instead, I am taken to the same page, with an error:

screen shot 2018-10-01 at 10 58 18 am

The URL on the error page ends in wp-admin/edit.php?post_type=give_forms&page=give-donors&order=DESC&orderby=ID&s&give-messages%5B0%5D=invalid-donor-id when it should read wp-admin/edit.php?post_type=give_forms&page=give-donors&paged=2

Expected Behavior

I expect to not get an error, and for the URL to change correctly.

Bug Type

  • This bug describes functionality that once worked as expected in version X.X.X.
  • This bug describes functionality that never worked as expected.
  • I am not sure whether this functionality ever worked as expected.

Steps to Reproduce

  1. Navigate to Donations > Donors on a page with more than 30 donors
  2. Enter the number 2 into the page box, and press return.
  3. See the error.

Related

https://secure.helpscout.net/conversation/674590613/26494/

Acceptance Criteria

  • entering a number manually into the box does not produce an error
  • pressing return takes the user to the selected page of donors
  • pagination continues to work correctly for other methods of pagination.

Environment

Operating System
  • Platform: Mac OS X
  • Version: 10.11.6
Browser
  • Name: Chrome
  • Version: 69.0.3497.100 (Official Build) (64-bit)
WordPress System Info ### WordPress Environment ###

Home URL: https://livegive.wpsteward.com
Site URL: https://livegive.wpsteward.com
WP Version: 4.9.8
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Show on Front: posts
Table Prefix Length: wp_8138bfdc07_
Table Prefix Length: 14
Table Prefix Status: Acceptable
Admin AJAX: Accessible
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, give_subscription

Server Environment

Hosting Provider: DBH: localhost, SRV: livegive.wpsteward.com
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: Apache/2.4.34 (Unix) OpenSSL/1.0.1f
PHP Version: 7.0.32
PHP Post Max Size: 1 GB
PHP Time Limit: 30
PHP Max Input Vars: 5000
PHP Max Upload Size: 512 MB
cURL Version: 7.35.0, OpenSSL/1.0.1f - We recommend a minimum cURL version of 7.40.
SUHOSIN Installed: –
MySQL Version: 5.5.61 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.2.5
Give Cache: Enabled
Database Updates: All DB Updates Completed.
Give Cache: Enabled
Give Cache: ✔New Donation✔Donation ReceiptNew Offline DonationOffline Donation Instructions✔New User Registration✔User Registration InformationEmail accessRenewal Receipt EmailSubscription Cancelled EmailSubscription Completed Email✔Subscription Reminder EmailSubscriptions Email Access
Upgraded From: 2.2.1
Test Mode: Enabled
Currency Code: USD
Currency Position: After
Decimal Separator: .
Thousands Separator: ,
Success Page: https://livegive.wpsteward.com/donation-confirmation/
Failure Page: –
Donation History Page: https://livegive.wpsteward.com/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Test Donation, Stripe - Credit Card, PayPal Payments Pro, Authorize.net, PayPal Standard
Default Payment Gateway: Stripe - Credit Card
PayPal IPN Verification: Disabled
PayPal IPN Notifications: IPN received for #1084 ( 8H4629943X7440214 ) on 09/04/2018 at 15:46. Status VERIFIED
Donor Email Access: Disabled

Active Give Add-ons

Give - Authorize.net Gateway: ✔ Licensed – by WordImpress – 1.4.3
Give - Form Field Manager: ✔ Licensed – by WordImpress – 1.3
Give - Manual Donations: ✔ Licensed – by WordImpress – 1.4.1
Give - PDF Receipts: ✔ Licensed – by WordImpress – 2.3
Give - Recurring Donations: ✔ Licensed – by WordImpress – 1.8.0
Give - Tributes: ✔ Licensed – by WordImpress – 1.5.0
Give - Zapier: ✔ Licensed – by WordImpress – 1.2.1

Other Active Plugins

Ben's Helper Functions: by BenUNC –
Give - Fee Recovery: by GiveWP – 1.7.2
Give - Google Analytics Donation Tracking: by GiveWP – 1.2.1
Give - PayPal Pro Gateway: by GiveWP – 1.2.0
Give - Stripe Gateway: by GiveWP – 2.1.1
Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 7.1.0
User Switching: by John Blackbourn & contributors – 1.3.1

Inactive Plugins

Akismet Anti-Spam: by Automattic – 4.0.8
Email Cop: by Ashfame – 0.1.1
Give - Database HealthCheck: by WordImpress – 0.0.2
Give - Mollie Gateway: by WordImpress – 1.1.1
Hello Dolly: by Matt Mullenweg – 1.6
Page Builder by SiteOrigin: by SiteOrigin – 2.8.2
RegistrationMagic Premium: by Registrationmagic – 3.8.1.7
Restrict Content Pro: by Restrict Content Pro Team – 2.9.10
Series Engine: by Eric Murrell (Volacious) – 2.6.1
SiteOrigin Widgets Bundle: by SiteOrigin – 1.12.1
The GDPR Framework: by Codelight – 1.0.11
WonderPlugin Tabs: by Magic Hills Pty Ltd – 5.8

Active MU Plugins

api-hacks.php: by –

Theme

Name: Twenty Seventeen
Version: 1.7
Author URL: https://wordpress.org/
Child Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme

@nishitlangaliya

This comment has been minimized.

Copy link
Member

commented Oct 4, 2018

@kevinwhoffman , While reproduce the issue I found undefined index donor_id notice . So I have prepared one video what I found. So first of all I am looking into that and will move forward with acceptance full fill.

https://www.useloom.com/share/4179f15258cf4753be7e1124c8541392

Thanks

@nishitlangaliya

This comment has been minimized.

Copy link
Member

commented Oct 4, 2018

Slack Call Summary

Participants: @mehul0810 , @nishitlangaliya
Topic: Discussion about donor_id undefined notice while reproduce case
Result: as per discussion this notice comes because entering the number in input and press enter key triggers delete_bulk_donor action which should not trigger when pressing enter key after add number in pagination input

@mehul0810

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2018

Re-opening this issue as I can see a PHP notice for ID when jumping to a specific page for the first time.

Steps to reproduce

  1. Go to donors page
  2. Jump to any page
  3. After fixing, follow from step (1)

Possible Solution

https://github.com/impress-org/give/blob/release/2.3.0/includes/admin/donors/class-donor-table.php#L434

Acceptance Criteria

  • Ensure that ID for orderby changed to id at mentioned in the possible solution
  • Ensure that testing is performed considering first time changing pagination and repetitive changing pagination doesn't reproduce the issue.

Debug Info

[05-Oct-2018 10:44:04 UTC] PHP Notice: Undefined index: ID in /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php on line 457 [05-Oct-2018 10:44:04 UTC] PHP Stack trace: [05-Oct-2018 10:44:04 UTC] PHP 1. {main}() /app/public/wp-admin/edit.php:0 [05-Oct-2018 10:44:04 UTC] PHP 2. require_once() /app/public/wp-admin/edit.php:10 [05-Oct-2018 10:44:04 UTC] PHP 3. do_action() /app/public/wp-admin/admin.php:224 [05-Oct-2018 10:44:04 UTC] PHP 4. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453 [05-Oct-2018 10:44:04 UTC] PHP 5. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310 [05-Oct-2018 10:44:04 UTC] PHP 6. call_user_func_array:{/app/public/wp-includes/class-wp-hook.php:286}() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 7. give_donors_page() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 8. give_donors_list() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:119 [05-Oct-2018 10:44:04 UTC] PHP 9. Give_Donor_List_Table->prepare_items() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:162 [05-Oct-2018 10:44:04 UTC] PHP 10. Give_Donor_List_Table->donor_data() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:515 [05-Oct-2018 10:44:04 UTC] PHP 11. Give_DB_Donors->get_donors() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:324 [05-Oct-2018 10:44:04 UTC] PHP 12. Give_Donors_Query->get_donors() /app/public/wp-content/plugins/Give/includes/class-give-db-donors.php:506 [05-Oct-2018 10:44:04 UTC] PHP 13. Give_Donors_Query->get_sql() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:163 [05-Oct-2018 10:44:04 UTC] PHP 14. Give_Donors_Query->get_order_query() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:230 [05-Oct-2018 10:44:04 UTC] PHP Notice: Undefined index: ID in /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php on line 457 [05-Oct-2018 10:44:04 UTC] PHP Stack trace: [05-Oct-2018 10:44:04 UTC] PHP 1. {main}() /app/public/wp-admin/edit.php:0 [05-Oct-2018 10:44:04 UTC] PHP 2. require_once() /app/public/wp-admin/edit.php:10 [05-Oct-2018 10:44:04 UTC] PHP 3. do_action() /app/public/wp-admin/admin.php:224 [05-Oct-2018 10:44:04 UTC] PHP 4. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453 [05-Oct-2018 10:44:04 UTC] PHP 5. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310 [05-Oct-2018 10:44:04 UTC] PHP 6. call_user_func_array:{/app/public/wp-includes/class-wp-hook.php:286}() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 7. give_donors_page() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 8. give_donors_list() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:119 [05-Oct-2018 10:44:04 UTC] PHP 9. Give_Donor_List_Table->prepare_items() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:162 [05-Oct-2018 10:44:04 UTC] PHP 10. Give_Donor_List_Table->donor_data() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:515 [05-Oct-2018 10:44:04 UTC] PHP 11. Give_DB_Donors->get_donors() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:324 [05-Oct-2018 10:44:04 UTC] PHP 12. Give_Donors_Query->get_donors() /app/public/wp-content/plugins/Give/includes/class-give-db-donors.php:506 [05-Oct-2018 10:44:04 UTC] PHP 13. Give_Donors_Query->get_sql() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:170 [05-Oct-2018 10:44:04 UTC] PHP 14. Give_Donors_Query->get_order_query() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:230 [05-Oct-2018 10:44:04 UTC] PHP Notice: Undefined index: ID in /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php on line 457 [05-Oct-2018 10:44:04 UTC] PHP Stack trace: [05-Oct-2018 10:44:04 UTC] PHP 1. {main}() /app/public/wp-admin/edit.php:0 [05-Oct-2018 10:44:04 UTC] PHP 2. require_once() /app/public/wp-admin/edit.php:10 [05-Oct-2018 10:44:04 UTC] PHP 3. do_action() /app/public/wp-admin/admin.php:224 [05-Oct-2018 10:44:04 UTC] PHP 4. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453 [05-Oct-2018 10:44:04 UTC] PHP 5. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310 [05-Oct-2018 10:44:04 UTC] PHP 6. call_user_func_array:{/app/public/wp-includes/class-wp-hook.php:286}() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 7. give_donors_page() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 8. give_donors_list() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:119 [05-Oct-2018 10:44:04 UTC] PHP 9. Give_Donor_List_Table->prepare_items() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:162 [05-Oct-2018 10:44:04 UTC] PHP 10. Give_Donor_List_Table->get_donor_count() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:517 [05-Oct-2018 10:44:04 UTC] PHP 11. Give_DB_Donors->get_donors() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:363 [05-Oct-2018 10:44:04 UTC] PHP 12. Give_Donors_Query->get_donors() /app/public/wp-content/plugins/Give/includes/class-give-db-donors.php:506 [05-Oct-2018 10:44:04 UTC] PHP 13. Give_Donors_Query->get_sql() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:163 [05-Oct-2018 10:44:04 UTC] PHP 14. Give_Donors_Query->get_order_query() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:230 [05-Oct-2018 10:44:04 UTC] PHP Notice: Undefined index: ID in /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php on line 457 [05-Oct-2018 10:44:04 UTC] PHP Stack trace: [05-Oct-2018 10:44:04 UTC] PHP 1. {main}() /app/public/wp-admin/edit.php:0 [05-Oct-2018 10:44:04 UTC] PHP 2. require_once() /app/public/wp-admin/edit.php:10 [05-Oct-2018 10:44:04 UTC] PHP 3. do_action() /app/public/wp-admin/admin.php:224 [05-Oct-2018 10:44:04 UTC] PHP 4. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453 [05-Oct-2018 10:44:04 UTC] PHP 5. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310 [05-Oct-2018 10:44:04 UTC] PHP 6. call_user_func_array:{/app/public/wp-includes/class-wp-hook.php:286}() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 7. give_donors_page() /app/public/wp-includes/class-wp-hook.php:286 [05-Oct-2018 10:44:04 UTC] PHP 8. give_donors_list() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:119 [05-Oct-2018 10:44:04 UTC] PHP 9. Give_Donor_List_Table->prepare_items() /app/public/wp-content/plugins/Give/includes/admin/donors/donors.php:162 [05-Oct-2018 10:44:04 UTC] PHP 10. Give_Donor_List_Table->get_donor_count() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:517 [05-Oct-2018 10:44:04 UTC] PHP 11. Give_DB_Donors->get_donors() /app/public/wp-content/plugins/Give/includes/admin/donors/class-donor-table.php:363 [05-Oct-2018 10:44:04 UTC] PHP 12. Give_Donors_Query->get_donors() /app/public/wp-content/plugins/Give/includes/class-give-db-donors.php:506 [05-Oct-2018 10:44:04 UTC] PHP 13. Give_Donors_Query->get_sql() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:170 [05-Oct-2018 10:44:04 UTC] PHP 14. Give_Donors_Query->get_order_query() /app/public/wp-content/plugins/Give/includes/donors/class-give-donors-query.php:230

@mehul0810 mehul0810 reopened this Oct 5, 2018

@ravinderk

This comment has been minimized.

Copy link
Collaborator

commented Oct 5, 2018

@mehul0810 Did you check latest release/2.3. @nishitlangaliya already fixed this bug in #3733

ravinderk added a commit that referenced this issue Oct 5, 2018

@mehul0810

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2018

Closing this issue as a part of commit 206723f by @ravinderk which fixes the issue which I found while testing in the above comment.

@mehul0810 mehul0810 closed this Oct 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.