-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Defer nonce creation until displayed by WC Admin closes #27424 #28500
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
Conversation
|
I tried the test steps but when I click the "Update WooCommerce database" button I get a "The link you followed has expired" error... am I doing something wrong? |
|
@Konamiman - are you triggering a new notice? As in this is not a notice that was already in the database unactioned before this PR? |
|
@roykho Yes, I'm following the testing steps from the PR description: manually modify the db version in the options table, then load the admin page in the site and click "Update database", that's all. |
|
@Konamiman - I know you're following the steps however since I can't see, I have to make sure on a few keys steps. Have you have WC Admin activated as separate plugin and checked out this PR woocommerce/woocommerce-admin#5827 ? |
|
Sorry, totally my fault, I hadn't seen that prerrequisite line 🤦🏻♂️ I've now been able to trigger the db update, however after it finishes and I click "Thanks" I get the "expired link" error again. Same if I retry, and the third time the banner has disappeared (including the banner in the other session). |
|
Hmmm I've not seen the "expired link" error in my testing. Only that sometimes the banner doesn't disappear right away on first click and that is normal. But it should definitely disappear after second click after a page refresh. |
|
Hey @jonathansadowski - sorry to wrangle you in here but I need a second tester to see if y'all are both having the issues testing this PR as described by @Konamiman Thanks! |
|
@roykho I'm having the same issue as @Konamiman When I try and dismiss this notice: I see this error: Clicking on "please try again" displays the notice again. Clicking on the notice dismissal shows "please try again" again. Clicking on it the last time does dismiss the notice. |
|
@jonathansadowski - Thanks for testing. Would you happen to know the URL link to the dismissal button? I want to see if it is formatted correctly. |
@roykho, sorry for the delay in responding. After I load the dashboard in the incognito window, the link in the main window is to: The error message's try again link is: When I see the dialog again after the try again link fails, that button's nonce is again The error message that the link has expired again links to: Finally, the link in the incognito window (which I didn't click) is: |
|
Ok I think I found the culprit. The query arg Could y'all please give this another go? @Konamiman @jonathansadowski |
|
I ran into an interesting issue while testing this. I'm a bit puzzled as to how it could be related to this PR, but let me describe how I've been able to reproduce it:
Switching from this branch to master (and reloading the Dashboard), back to this branch seemed to resolve the issue for me. I repeated the above steps, again starting on a brand new site, except on the Not sure of this is some symptom of how I'm testing this, or some weird obscure thing, so I figure I'd drop it here with the steps I used to recreate it. @Konamiman, could you see if you're able to reproduce the issue I ran into? |
|
Hi @roykho, after your update it seems to work as expected for me (I had to reload a couple of times for the notice to disappear but that's expected according to your description). I'll now check what @jonathansadowski has found. |
|
Hi @jonathansadowski, I haven't been able to reproduce the hundreds of network requests issue locally. |
Konamiman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving since the main issue addressed by the PR seems to be fixed. If what @jonathansadowski found rutns out to be a real issue I think it could be addressed in a separate PR.
|
Hi @Konamiman - thanks for testing and approving. Could you please also approve this one here that is linked woocommerce/woocommerce-admin#5827 |
|
I'm a little concerned because of the nature of the issue I ran into, but if it doesn't worry you, and nobody else can reproduce it, I'm happy to create a new issue if I still run into it after this is merged. |
|
Hi @jonathansadowski @Konamiman - sorry to rope y'all in on this again. So after speaking with Isotope, we found a suitable hook to use from WC Admin to achieve the same results. This means we don't need to make any changes over on WC Admin side. So basically I just ported the code I've added from there to here. It works the same way as before. Could y'all please review again? |
jonathansadowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working for me... plus, the issue that I was experiencing before with the repeating requests isn't happening with this update. Nice work. 👍
xknown
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the feedback. The changes look fine, although I didn't really test the whole workflow.
claudiosanches
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great!



All Submissions:
Changes proposed in this Pull Request:
Ref: p7bje6-2HA-p2
Closes #27424
How to test the changes in this Pull Request:
UPDATE:
This PR no longer requires anything from WC Admin.
wp_optionstable search forwoocommerce_db_versionand set it to4.4.0.Update WooCommerce databasebutton without errors and you're able to see the process started to run.WooCommerce database update done. When you see this open another browser or incognito mode and login as the same admin user so you have two concurrent sessions going.WooCommerce database update done.Thanks!dismissal button.Other information:
Changelog entry