Open fagiani opened 3 years ago
Thanks for pointing this out @fagiani We've already pushed a fix and an official WP upfate will be released shortly.
Great @bartoszarendt! I saw the fix here: https://github.com/dfactoryplugins/post-views-counter/commit/e6a620d2aa7d0e0cec9a457b013e11ddcd58b2d9 by @psielicki
I should have sent a PR with that but I was unsure uncommenting it would be enough.
I'd appreciate if you could ping here when you release it to WP.
Thanks again!
@psielicki @bartoszarendt
I've recently updated from
1.3.1
to1.3.4
and after a while noticed all page views have been lost in the mean time. I didn't change any settings or behaviors after the update. After a closer look on the source code, it looks like some refactor was being conducted and as far as I could understand it wasn't completed but actually released.This commit looks like where it all changed as you can see it will call a
db_prepare_insert
and thendb_commit_insert
instead of the formerdb_insert
.Below you can check the actual method code with the important
INSERT
query commented: https://github.com/dfactoryplugins/post-views-counter/blob/b2059150ec6accb83a39123b3af5c51e41bc109f/includes/counter.php#L671-L686I'm not sure why it is commented or how did this get to a release without working and specially because it has been a long while it has happened and no one eventually noticed I am curious if there is actually a different way to do it after that release that I didn't catch.
P.S. Reverting to
PVC 1.3.1
got it back working.For the record, I am using
WP 5.7
withnginx 1.18.0
andPHP 7.4.16
.Below a screenshot of relevant configuration screen:
Please let me know if I can provide any further information and be helpful on improving this great plugin!
Keep Rocking!