WPIntell

Source evidence

Can’t remove last item.

Wishlist for WooCommerce · support · 2019-08-02T23:28:00+00:00

mixedsentiment
mediumseverity
0.84relevance
8replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 31 rows with source links

9.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Joe resolved
On my website, when logged in to an account, I am unable to remove the last item from the wishlist, unless I remove it, go to the page again, and remove it again. Then it persists. My basic troubleshooting has involved ensuring the javascript event for removing a product from the list fires (it does) and checking the cookie. The product id remains in the cookie until the second time removing it from the wishlist. I’m at a loss here. Can you help me troubleshoot? I don’t know that there’s anything wrong with your plugin… could be caching, redis or fastcgi caching… but I just don’t know. It does not seem to happen to guest users without an account. Hi Joe, Currently I am on vacation, but I will look into this when I come back. That would be August 6th. Maybe there is some issue with the cookie path, but that’s just a wild guess. Kind regards, Joris No rush! Enjoy your vacation… I’ll try to troubleshoot and post some thoughts here in the meantime. It’s not a site-breaking bug, and I have so much going on on my store it could very well be an incompatibility with something else. Here’s the cookie info after adding one product: https://imgur.com/3YRijmj After adding two: https://imgur.com/UCIc9eD When removing a product, the cookie goes back to one id just fine, but when trying to remove the last product, it stays until the second time visiting the page and removing again. And in the user meta, the value goes from: a:1:{i:0;s:4:"5841";} to a:2:{i:0;s:4:"5841";i:1;s:4:"4915";} It is a cookie issue, although I’m not quite sure how yet. After removing the last item, the cookie still has the last product id in it, even though the user_meta wishlist key goes to value: a:0:{} Looking into it further. This reply was modified 6 years, 10 months ago by Joe . This reply was modified 6 years, 10 months ago by Joe . This reply was modified 6 years, 10 months ago by Joe . This reply was modified 6 years, 10 months ago by Joe . Hi Joe, I thought I had already replyed to this, but anyway. I had a look at the site parisbloom.com wich I see on your screenshots, but I can’t seem to find the wishlist functionality. If you want me to have a closer look, please email me at: joris@loft.nu and tell me where to look. I will see if I can help. Kind regards, Joris van Montfort Joris, the shop is currently behind a login only during pre-orders for our customers. If you don’t mind creating a login, you can see it at https://parisbloom.com/shop/ Hi Joe, I had a look a the site and I found the problem. Please update to version 1.2.8 as it contains a fix for this issue. Kind regards, Joris Great, thank you! Just curious, what was the issue? It was a common bug, not specific tou your website alone. I was setting the cookie in php also on page load if the user was logged in and had a wishlist stored. This way the cookie changed to a session cookie when the user was logged in. The session cookie would not be manipulated correctly by the JS code. The new situation is a JS cookie. When logged in the wish list is also stored as user meta so it can be called after user login. The user meta was already in the plugin. The main difference is that the user meta does not get witten to a session cookie. Awesome, thanks for tracking that down. I thought that was what was happening but am not experienced enough to find it myself!

Comments

8 shown
Joris van Montfort 2019-08-03T08:46:00+00:00

Hi Joe, Currently I am on vacation, but I will look into this when I come back. That would be August 6th. Maybe there is some issue with the cookie path, but that’s just a wild guess. Kind regards, Joris

Joe 2019-08-03T10:56:00+00:00

No rush! Enjoy your vacation… I’ll try to troubleshoot and post some thoughts here in the meantime. It’s not a site-breaking bug, and I have so much going on on my store it could very well be an incompatibility with something else. Here’s the cookie info after adding one product: https://imgur.com/3YRijmj After adding two: https://imgur.com/UCIc9eD When removing a product, the cookie goes back to one id just fine, but when trying to remove the last product, it stays until the second time visiting the page and removing again. And in the user meta, the value goes from: a:1:{i:0;s:4:"5841";} to a:2:{i:0;s:4:"5841";i:1;s:4:"4915";} It is a cookie issue, although I’m not quite sure how yet. After removing the last item, the cookie still has the last product id in it, even though the user_meta wishlist key goes to value: a:0:{} Looking into it further. This reply was modified 6 years, 10 months ago by Joe . This reply was modified 6 years, 10 months ago by Joe . This reply was modified 6 years, 10 months ago by Joe . This reply was modified 6 years, 10 months ago by Joe .

Joris van Montfort 2019-08-13T07:28:00+00:00

Hi Joe, I thought I had already replyed to this, but anyway. I had a look at the site parisbloom.com wich I see on your screenshots, but I can’t seem to find the wishlist functionality. If you want me to have a closer look, please email me at: joris@loft.nu and tell me where to look. I will see if I can help. Kind regards, Joris van Montfort

Joe 2019-08-13T11:58:00+00:00

Joris, the shop is currently behind a login only during pre-orders for our customers. If you don’t mind creating a login, you can see it at https://parisbloom.com/shop/

Joris van Montfort 2019-08-20T11:45:00+00:00

Hi Joe, I had a look a the site and I found the problem. Please update to version 1.2.8 as it contains a fix for this issue. Kind regards, Joris

Joe 2019-08-20T11:46:00+00:00

Great, thank you! Just curious, what was the issue?

Joris van Montfort 2019-08-20T12:02:00+00:00

It was a common bug, not specific tou your website alone. I was setting the cookie in php also on page load if the user was logged in and had a wishlist stored. This way the cookie changed to a session cookie when the user was logged in. The session cookie would not be manipulated correctly by the JS code. The new situation is a JS cookie. When logged in the wish list is also stored as user meta so it can be called after user login. The user meta was already in the plugin. The main difference is that the user meta does not get witten to a session cookie.

Joe 2019-08-20T12:05:00+00:00

Awesome, thanks for tracking that down. I thought that was what was happening but am not experienced enough to find it myself!