I have tried 7.x-2.0-beta6 and the 7.x-2.0-dev and in both of them anonymous users get the error "You are not allowed to flag, or unflag, this content.'
It works correctly for the admin user.
I have ticked all the permission boxes in the flag edit screen and carefully checked the other permissions on the page. It looks right to me. No errors are showing up in the Drupal logs and I'm not sure how else to check what's happening. I have session_api installed and have tried the most recent stable and dev versions of that too.
Is this a bug? Or is it possibly something I've missed during configuration?
Does anonymous flagging work in D7 for others?
I've attached a screenshot of my permissions page and I can PM a link to a test site if that will help.
| Comment | File | Size | Author |
|---|---|---|---|
| flag-permissions_1329873214104.png | 46.48 KB | JmsCrk |
Comments
Comment #1
JmsCrk commentedCan anyone help even by letting me know if they have Anonymous flagging working in D7??
Comment #2
JmsCrk commentedWe managed to fix this problem by editing flag/flag.module
Replaced:
if (module_exists('session_api') && session_api_available() && $uid == 0) {With:
if (module_exists('session_api') && $uid == 0) {The problem actually seems to be session_api_available() in session_api.module which determines if cookies are enabled was returning FALSE
To check if the cookies are enabled, the code should be something along these lines?
Comment #3
coloryan commentedThanks, the solution in #2 worked for me.
Comment #4
polSolution is on #1619114: After cleaning cookies, flagging content as an anonymous user causes a PDO exception., #48.
Comment #5
joachim commentedThanks for the info. I assume that makes this issue a duplicate of that one.
*sigh at people hacking modules*