Download & Extend

Voting Form Error from crawlers

Project:Plus 1
Version:6.x-2.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

Shortly after upgrading to the most recent version of the the module last night I noticed the following message showing up in my logs whenever someone voted.

"Voting form error: Invalid token."

The severity of the message is "notice". Voting seems to be working properly. So for the moment the only impact I can see is that this message is showing up in the log.

Rob Safuto
Learn By The Drop | http://learnbythedrop.com

Comments

#1

Hi Rob, are you still experiencing the problem?

I tested with anonymous voting enabled and was unable to reproduce the problem. I checked my logs and there was no notice.

Have you read the advisory: http://drupal.org/node/406314 ?

Have you cleared your cache? Chances are the problem was that your pages were cached then. The href attribute has changed.

Let me know,

Thanks!

Caroline

#2

The notice has persisted since I first posted but I had not cleared the cache out. I just did that and will have a look back in a little while and report the log results.

And thanks for a very nice module.

Rob

#3

As I noted in post #2 I cleared the cache last night and checked the logs again this morning. The "voting form error: invalid token" message is still appearing in the log. There doesn't appear to be any other effect on the site. The votes are going through and being logged properly as far as I can see. So right now this amounts to a minor annoyance.

Rob Safuto
Learn By The Drop | http://learnbythedrop.com

#4

Title:Voting Form Error» Voting Form Error from crawlers
Component:Miscellaneous» Code

The problem is bots follow links, and plus1 uses links rather than form elements. A good temporary solution is to add the following to your robots.txt file

Disallow: /plus1/

A good long term solution would be converting plus1 from links to form buttons.

#5

Status:active» closed (duplicate)

Marking this as a duplicate of #322735: Vote link is executed by search engines then.