Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Anonymous users are getting 403 error when voting or undoing voting, even when they have permission to do it.
It's because using drupal_get_token and drupal_is_valid_token with anonymous users. Drupal 7 doesn't save user session for anonymous users, so session_id is different on every page load, and tokens doesn't fit from one page to another.
Comment | File | Size | Author |
---|---|---|---|
#1 | plus1_anonymous_cant_vote-1886114.patch | 600 bytes | grisendo |
Comments
Comment #1
grisendo CreditAttribution: grisendo commentedI attach a patch.
Comment #2
grisendo CreditAttribution: grisendo commentedComment #3
grisendo CreditAttribution: grisendo commentedSorry, 403, not 301 :P
Comment #4
rogical CreditAttribution: rogical commentedPlease try the dev version, the dev seems working.
Comment #5
grisendo CreditAttribution: grisendo commentedOk, now I can see that this should be fixed because of #1217670: Guest unable to vote
Comment #6
grisendo CreditAttribution: grisendo commentedComment #6.0
grisendo CreditAttribution: grisendo commented403, not 301 :P