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

xjessie007’s picture

Correction: 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.

xjessie007’s picture

Found 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:

INSERT INTO users (uid, name, mail) VALUES ('0','','');
INSERT INTO users_roles (uid, rid) VALUES (0, 1);

Cheerrs.

Maxi-Pedia

xjessie007’s picture

Status: Active » Closed (works as designed)