I have set a message "Thank you" for Flagged message with AJAX link type. I set the permission for anonymous user can only flag the node but no permission for unflag.
After anonymous flag the node, it leaves a blank space there, no" Thank you" message showing on the place. please advise, thank you.
Issue fork flag-3295483
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ivnishI can confirm this
Comment #3
ivnishComment #6
deaom commentedThe issue happens as the JS code can't append the flagging message, in this case Thank you, to the flag link as there is none on the page. There is also a console error that shows that. As the permission to unflag is not there, the markup is not generated and therefore the message not appended. Updated the code so the markup is displayed without the unflag link and then removed in the JS. Not sure if the right approach, so needs review.
Comment #7
ivnish@deaom could you write a simple test ?
Comment #8
deaom commentedAdded a simple test that check if the anonymous user with only flag permission can see the flag message and not see unflag link. Ready for review.
Comment #9
ivnishComment #11
ivnish