wp-ulike icon indicating copy to clipboard operation
wp-ulike copied to clipboard

Some Likes not saving for users

Open contemplate opened this issue 5 years ago • 3 comments

I love this plugin and we are about to deploy it on a large membership site for members to like certain custom post types. Everything was working smoothly until we began testing with some initial users.

Some have reported that the likes don’t save. As soon as the page is refreshed the likes are gone for them. Others are having no problems. The latest update did not fix the issue and there are no errors in the error logs.

It appears to be an IP related issue. All test users with an IPv6 it won't save the Likes.

We use the username method for logging. But every user who it doesn’t save the likes for has an IPv6 address while IPv4 users it works fine. It doesn’t appear that this should be an issue with username logging.

A few users have switched their phones to use cell data and the buttons work fine. Then when they switch back to wifi the buttons don’t work. I'm guessing this is b/c their cell data IPs are IPv4.

We are hosted on a dedicated server with WP Engine. We also use Cloudflare.

Has anyone come across something like this? I can’t even replicate it so have had to rely on video observation with some beta testers.

contemplate avatar Nov 27 '18 18:11 contemplate

Hey @Alimir I fixed this for you in this pull request: https://github.com/Alimir/wp-ulike/pull/41

The issue was varchar needed to be expanded to varchar(60) for the IP address column. IPv6 needs at least varchar(39) but I think other host like WP Engine might add more to it.

contemplate avatar Dec 04 '18 05:12 contemplate

@contemplate Thanks for fixup :) I'll merge this in the next release.

Alimir avatar Dec 05 '18 06:12 Alimir

@Alimir Just a heads up you never merged this, I applied the change myself just now. It's kinda a big issue as just a few of my website's users were able to do this so it makes sense this IP thing was the issue, though idk why it would still be affected if "log by username" was applied: https://www.youtube.com/watch?v=l4cC_1b8xU0

rdamiano avatar Dec 05 '19 12:12 rdamiano