Download & Extend

Vote link is executed by search engines

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

Issue Summary

Hi there,

I've activated anonymous voting. In the table votingapi_vote I've found at least 40 voting entries with nearly the same ip address: 66.249.71.xxx. I've looked it up at http://www.arin.net/whois/ and found out that this was the Google bot. We should add rel="nofollow" to the voting link or something like this.

Thanks, Bjoern

Comments

#1

That is a great idea. I will add the attribute now. Brb.

#2

Assigned to:Anonymous» Chill35

Actually this will not work.

From Wikipedia

The nofollow attribute value is not meant for blocking access to content or preventing content to be indexed by search engines. The proper methods for blocking search engine spiders to access content on a website or for preventing them to include the content of a page in their index are the Robots Exclusion Standard (robots.txt) for blocking access and on page Meta Elements that are designed to specify on an individual page level what a search engine spider should or should not do with the content of the crawled page.

So what you have to do is edit the robots.txt file that comes with Drupal.

Add these lines:

Disallow: /plus1/vote/
Disallow: /?q=plus1/vote/

Report back on this, please. If that works, I will add it to the module's documentation.

#3

This might be a long term check of course. Please try it and report back in 2-3 weeks. That would be awesome!

Not many people use anonymous voting.

#4

Any progress on this, I have been having the same problem on http://blog.to.it now that I have enabled anonymous voting.

#5

timmillwood, add the 2 lines to robots.txt. It really should fix the problem. And please report back if it does. I do not have a live site that uses plus 1. I cannot test this.

#6

I have added those to the robot.txt but guess it will take a while to filter through.

Will that stop the listings on http://www.google.co.uk/search?q=site%3Ablog.to.it ?

#7

Will that stop the listings on http://www.google.co.uk/search?q=site%3Ablog.to.it ?

Yes.

#8

Robots.txt and nofollow isn't the right solutions - the right solution is to not violate the HTTP-specification of the GET-method and submit votes through POST-request instead. A GET is not allowed to have any impact on the state of the data and letting a GET have that not only makes search engine robots trigger but can also have weird results with caches and similar.

#9

Any progress on this issue...?

#10

I have coded in solutions to this in the themes for the sites I'm using Plus1 on - should be fairly easy to make a patch out of it when I get time.

If any one else has a solution - please don't let that stop you from presenting it though.

#11

Title:Seams like vote link is executed by search engines» Vote link is executed by search engines
Version:6.x-2.4» 6.x-2.6
Category:task» bug report
Assigned to:Chill35» Anonymous
Status:active» needs review

Here's a patch that changes the theme function as well as make it more customizable.

The change to the theme layer is that the link is now a button instead and the form POST:s the votes to the backend - which means that no search engines will index it and no cache will stop it from being processed.

This patch is dependent on #696500: Variable misused used to store state.

AttachmentSize
plus1_theming_improvement.patch 9.79 KB

#12

voxpelli this patch didn't work for me. I have this error

patching file README.txt
patching file jquery.plus1.js
patching file plus1.css
patching file plus1.module
Hunk #1 succeeded at 83 (offset 7 lines).
Hunk #2 succeeded at 259 (offset 5 lines).
Hunk #3 succeeded at 284 (offset 5 lines).
Hunk #4 FAILED at 288.
1 out of 4 hunks FAILED -- saving rejects to file plus1.module.rej

How i can fix this?

#13

I 2nd #12 as I get the same error trying to apply the patch.

Opps, you have to apply the other patch first, as it says in the description.

#14

Status:needs review» needs work

I've applied the patch, but it breaks the current version of google chrome. The submit button is shown but not clickable. (had a caching issue)

Everything is working and tested

#15

Status:needs work» reviewed & tested by the community

#16

Status:reviewed & tested by the community» needs work

Coding standards: indentation, "elseif".

#17

This also seems to fix the problem in #581032: Not working on IE8.

#18

Do we need to reroll a patch for #16 or can we fix it once we commit?

#19

It is fixed in my copy. Just waiting on commit access.

#20

Status:needs work» patch (to be ported)

#21

Status:patch (to be ported)» fixed

Committed to 6.x-2.x-dev.

#22

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.