Closed NateWr closed 10 years ago
Thanks, we'll get it fixed.
Hey nate! Can you provide a bit more detail? Does this ALWAYS happen on save/restore or only in situations where you quickly save then hit restore? I've never seen it happen, but it sounds a bit like a race condition.
@ghost1227 Can you replicate?
I'm able to reliably replicate this when I am not logged in to the website. Also, the link above works fine. The error only occurs when clicking the Restore Previous Cart button next to the Save Cart button in the image below:
When I was logged in as admin I was unable to reproduce this problem. Furthermore, when I was logged in, the Restore Previous Cart button did not appear -- only the link at the top appeared.
Also, I tried waiting a while before restoring to see if it was a race condition, but even waiting a minute or two (on a localhost server) didn't help.
@pippinsplugins Haven't been able to yet @NateWr What operating system are your testing on?
Win7 using a local WAMP server. I'm booted into Ubuntu at the moment so can't check the PHP versions and other details of that server, but can come back with it later if you need.
I cannot replicate this in the release/1.9
branch. @NateWr Could you test with that branch?
@pippinsplugins Sure, but it may take me a few days before I get the time to do so.
I got a chance to check this out with the release/1.9 branch today, but the notice is still appearing. You're probably already on to this, but I noticed that the URL to restore the cart doesn't contain the token that is displayed above.
The token is missing because you are logged in, so it's not needed for the restore button. We show the token in the URL so that users can copy it to their clipboard for later.
@NateWr I still haven't replicated this. Could you list the exact steps you're following to make it happen?
@pippinsplugins Click EDD's buy button so it changes to checkout button > Click checkout button > View checkout page > Click Save Cart > Click Restore Previous Cart
You can see the problem live at themeofthecrop.com. The PHP Notice does not appear (WP_DEBUG is off), but the Restore Previous Cart button still fails, with the message "Error: Cart restoration failed. Invalid token." Note that this is NOT the release/1.9 branch on the live site.
I tried briefly to turn on WP_DEBUG on the live site, but I'm getting Strict Standards notices with the Affiliates Pro plugin, and these are causing can't modify header errors with EDD which makes the site unusable. So I can't reproduce it there.
The only other plugins on the site are Affiliates Pro, EDD/Affiliates Pro and EDD/Stripe. I've deactivated all but the core EDD and still getting the notice.
Thanks. I will try again to replicate it.
Ok replicated. It only happens to logged-out users.
Fixed!
Just reporting back. Tested the fix on my end and it's working. No "Restore Cart" button appears when not logged in. Thanks!
Great! On Dec 9, 2013 8:23 PM, "Ghost1227" notifications@github.com wrote:
Hey nate! Can you provide a bit more detail? Does this ALWAYS happen on save/restore or only in situations where you quickly save then hit restore? I've never seen it happen, but it sounds a bit like a race condition.
— Reply to this email directly or view it on GitHubhttps://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues/1793#issuecomment-30194243 .
I received this notice on a localhost installation when trying to restore a saved cart. I clicked save cart then immediately clicked restore cart. Let me know if I can provide any more useful info.