After updating our independently hosted WP site to wpDiscuz version 7.6.48, none of our users, either registered users or guests, with any level of permissions, including admin, were able to add likes to any comments. The message (red dialog) was “you are not allowed to vote for this comment."
Rolling back to 7.6.47 fixed the problem for all registered users. We had previously noticed that guests were unable to like comments after a major WordPress update, possibly in 2025 - this was despite the setting allowing guests to rate comments being turned on. We chose not to submit a report on this feature breakage for guests until now, since it was more of a WP core issue at that time.
Please note that we do not have JetPack installed, but we did add your suggested code snippet to disregard nonces for guests, since some users and especially guests seemed to experience the red nonce warnings. With 7.6.48, the red message dialog was the same for both registered users and guests, that they were not allowed to vote.
Thank you in advance for looking at this.
Hi @wolf,
Please follow this topic, this is the same issue under the hood:
https://wpdiscuz.com/community/postid/29939/
@tomson Thanks!
I've done the addition of the WPCode plugin, added the code snippet running everywhere, updated the plugin to 7.6.49, purged caches, rebooted, etc., and have gotten the result that we can like comments older than 5 June 2025, but none more recent than that. The warning about liking one's own comments is not visible in that state, being overridden by the general "can't vote for that comment" red warning, applied to all comments. Rolling back to .47 didn't work this time to restore likes - I ultimately had to revert to .46 and then update back up to .47, purge, reboot the server, and stay there.
We're functional at .47, so I'll just stay there until there is more clarity on this whole nonce problem, and hopefully a fix that catches us in a future version.
OK, I have some good news, and some explanation of the cause that may help.
Our problem with "likes" is gone, and we even have guest likes working again, so thank you. That basically resolves this issue.
Allow me to explain how it got solved.
Contemporary to the reported problem above with "likes", we had a simultaneous problem of WordPress user IP addresses being reported as the server instead of their actual (or VPN) origin. This affected some people at first, and then everybody. This IP address problem seems to have been doing a dance with both WordPress developers doing their "nonce" thing, and wpDiscuz development reacting to the nonce solution. The problems didn't necessarily seem connected - but in retrospect, we can see they were. Indeed, when I updated to the latest wpDiscuz version, after the WordPress user IP address fix, I saw some brief nonce messages as the fix began to propagate, and after briefly showing, those messages went away.
Our hosting provider said they found the following as the cause of the IP address problems.
"The culprit has been found, a cPanel update must have changed the Apache config at some point, removing one include on Home / Service Config / Apache Config / Include Editor, and under Pre VirtualHost Include > Global, the flag RemoteIPHeader X-Forwarded, which was responsible for handling the IP forwarding to logs."
Thus, commenter IP addresses seem critical for the whole nonce concept to work, and if IP addresses are not being reported both individually and correctly, then nonce troubles are happening.
Thank you for your work on these problems.
-Wolf
OK, I have some good news, and some explanation of the cause that may help.
Our problem with "likes" is gone, and we even have guest likes working again, so thank you. That basically resolves this issue.
Allow me to explain how it got solved.
Contemporary to the reported problem above with "likes", we had a simultaneous problem of WordPress user IP addresses being reported as the server instead of their actual (or VPN) origin. This affected some people at first, and then everybody. This IP address problem seems to have been doing a dance with both WordPress developers doing their "nonce" thing, and wpDiscuz development reacting to the nonce solution. The problems didn't necessarily seem connected - but in retrospect, we can see they were. Indeed, when I updated to the latest wpDiscuz version, after the WordPress user IP address fix, I saw some brief nonce messages as the fix began to propagate, and after briefly showing, those messages went away.
Our hosting provider said they found the following as the cause of the IP address problems.
"The culprit has been found, a cPanel update must have changed the Apache config at some point, removing one include on Home / Service Config / Apache Config / Include Editor, and under Pre VirtualHost Include > Global, the flag RemoteIPHeader X-Forwarded, which was responsible for handling the IP forwarding to logs."
Thus, commenter IP addresses seem critical for the whole nonce concept to work, and if IP addresses are not being reported both individually and correctly, then nonce troubles are happening.
Thank you for your work on these problems.
-Wolf

