I am using a form in that form based on the registered user and anonymous user am sending a message to after submission of the form by using drupal_set_message . But its not working for anonymous but the form is submitting and data also updating the db

Comments

drumm’s picture

Status: Active » Postponed (maintainer needs more info)

Where specifically are you calling drupal_set_message()? Do you have a code sample?

What are the settings in Administer > Site configuration > Performance? Do you have any contributed cache modules installed? Is there anything else between you and the web server which might cache the page without the message?

jackbravo’s picture

Status: Postponed (maintainer needs more info) » Fixed

I was having this exact same problem.

This forum post had the solution:

http://drupal.org/node/264132

apparently the id of the anonymous user was changed when I moved the site from development to production or something similar. I issued an update statement on the user table and that was it (the first row was the anonymous user but with uid = 3).

Also this is somewhat old so I'm marking it fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xjessie007’s picture

Just cross-linking similar threads.

no message appear using drupal_set_message :-(
http://drupal.org/node/610400

drupal_set_message is not working for anonymous user
http://drupal.org/node/240726

Handling drupal_set_message for anonymous users
http://drupal.org/node/264132

Poll thank you message not working in Firefox
http://drupal.org/node/922558

LavR.’s picture

i got same problem and i got a solution...

in database user table content uid=0 is not there thats way it;s not working

solution is : INSERT INTO `users` (`uid`, `name`, `pass`, `mail`, `theme`, `signature`, `signature_format`, `created`, `access`, `login`, `status`, `timezone`, `language`, `picture`, `init`, `data`) VALUES
(0, '', '', '', '', '', NULL, 0, 0, 0, 0, NULL, '', 0, '', NULL);