- Issue created by @BramDriesen
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
No activity over 2 days, un-assigning. Feel free to pick this up again.
- 🇮🇳India debrup
@bramdriesen I have replaced the $_SESSION super global with the recommended session handling in Drupal. While working I also found the issue of anonymous vote cancellation.
Steps to Reproduce
- Create a poll and make sure anonymous voting, cancellation and required permissions are given to anonymous user.
- Keep the poll open as admin view. Open a incognito tab(s) in multiple separate browsers.
- Access the poll here and cast the vote.
- Check the result back in the admin view. The voted choice should be incremented and updated.
- Now cancel the vote in the incognito tab.
- Check the result in the admin view. It remains unchanged. The cancelled vote is not deleted from the database!
Note:
This warning also occurs in the log when cancel button is pressed.
Warning: Trying to access array offset on false in Drupal\poll\PollVoteStorage->cancelVote() (line 131 of /app/web/modules/contrib/poll/src/PollVoteStorage.php)
- 🇮🇳India debrup
Apart from the above mentioned issue, the required issue of replacing the $_SESSION variable with Drupal recommended session handling has been done. @bramdriesen please review and let me know if any changes are required.