Closed (works as designed)
Project:
Drupal core
Version:
6.19
Component:
poll.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2010 at 15:55 UTC
Updated:
25 Sep 2010 at 17:23 UTC
I just discovered that when I submit a vote for a poll, the thank you message is not displayed in Firefox. It gets displayed in MSIE, but it is missing in Firefox. The strangest thing is that the thank you message is not even in the page HTML source in FF.
I also have one suggestion for improvement. The thank you message is hardcoded into the poll.module poll_vote() function.
function poll_vote($form, &$form_state) {
...
drupal_set_message(t('Your vote was recorded.'));
It would be nice if it was possible to enable customization of this message in the admin interface. I wish I knew how to code this, unfortunately I do not know, so I am posting it here for others.
Comments
Comment #1
xjessie007 commentedCorrection: It is not related to FF versus MSIE. Thank you messages are not displayed when voting as an anonymous user. I was not logged in in my FF instance, so it was not working. I was logged in as admin in MSIE instance, and it was working. So, it is a permissions issue.
Comment #2
xjessie007 commentedFound the solution. This relates to output of the drupal_set_message() function being displayed for anonymous users. He is an explanation that I found at one site:
Drupal sessions are linked by ID number to the user. Drupal also has it's own session handling functions, and one of those is a check to see if the current session is associated with a valid user account - and for anonymous users, that is the user 0 - (it doesn't matter if multiple sessions are open per user - which is certainly what happens when so many anonymous users visit a site).
If Drupal does not find a valid user for the current session, then the session is regenerated anew - meaning the previous information is lost.
Here is how to fix it:
Cheerrs.
Maxi-Pedia
Comment #3
xjessie007 commented