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

bulk action in legacy give-payment-history page broken #7158

Closed
1 task
pulsovi opened this issue Dec 26, 2023 · 6 comments
Closed
1 task

bulk action in legacy give-payment-history page broken #7158

pulsovi opened this issue Dec 26, 2023 · 6 comments
Labels
keep-fresh "Keep Fresh" issues should not be marked as stale. type: bug Existing functionality is broken

Comments

@pulsovi
Copy link
Contributor

pulsovi commented Dec 26, 2023

User Story

As an admin, I want resend receipt for some donations.

Details

nonce checking fail with message "We are unable to recognize your session. Please refresh the screen to try again; otherwise contact your website administrator for assistance" (wp_die)

Expected Behavior

The receipts must be resend and I to go back on the payments history list table

Steps to Reproduce

  1. add some translation for the "Forms" string in the give plugin (I use locotranslate)
  2. go to the back-office, and in the menu go to the payment history page.
  3. Click on "Switch to legacy view"
  4. Select some donations
  5. choose "resend receipt" in the bulk action list.
  6. Click on the submit button

=> get error page with the message :

"We are unable to recognize your session. Please refresh the screen to try again; otherwise contact your website administrator for assistance"

Acceptance Criteria

  • The above steps result in the successful sending of receipts

Suggested resolution

The bug seems to come from the fact that the $action passed to the nonce check in the next two calls is assumed to be "bulk-forms".

wp_verify_nonce($_GET['_wpnonce'], 'bulk-forms') &&

And
give_validate_nonce($_GET['_wpnonce'] ?? '', 'bulk-forms');

While its true value is 'bulk-' . sanitize_key(give_get_forms_label_plural())

Which is defined as follows:

@pulsovi pulsovi added the type: bug Existing functionality is broken label Dec 26, 2023
Copy link

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.

@github-actions github-actions bot added the Stale label Feb 10, 2024
@pulsovi
Copy link
Contributor Author

pulsovi commented Feb 19, 2024

want a PR ?

@github-actions github-actions bot removed the Stale label Feb 20, 2024
Copy link

github-actions bot commented Apr 5, 2024

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.

@github-actions github-actions bot added the Stale label Apr 5, 2024
@pulsovi
Copy link
Contributor Author

pulsovi commented Apr 10, 2024

I have little time at the moment, but I plan to do a PR within 4 weeks. Please don't close the conversation.

@github-actions github-actions bot removed the Stale label Apr 11, 2024
Copy link

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.

@github-actions github-actions bot added the Stale label May 26, 2024
@JoshuaHungDinh JoshuaHungDinh added keep-fresh "Keep Fresh" issues should not be marked as stale. and removed Stale labels May 26, 2024
@pulsovi
Copy link
Contributor Author

pulsovi commented May 26, 2024

I see that the bug has already been fixed by someone else.
So much the better.

#7204

@pulsovi pulsovi closed this as completed May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-fresh "Keep Fresh" issues should not be marked as stale. type: bug Existing functionality is broken
Projects
None yet
Development

No branches or pull requests

2 participants