Closed (fixed)
Project:
Webform
Version:
7.x-3.15
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2010 at 20:37 UTC
Updated:
22 Jan 2012 at 15:47 UTC
Jump to comment: Most recent
Comments
Comment #1
quicksketchYou may not see this message if you have the page cache enabled (admin/settings/performance). I believe this has been fixed in 3.x because we actually allow anonymous users to edit their own submissions, meaning that Webform may disable the page cache temporarily and make these messages visible. I'd suggest entering a confirmation message for the Webform so that Webform will display the confirmation message on a separate page (node/x/done usually).
Comment #2
phdenis63 commentedThanks for your help. You're right. Confirmation message on a separate page has no problem for anonymous users.
Comment #3
quicksketchI've confirmed this problem does still exist in the 3.x version unfortunately.
- Turn on page caching at admin/settings/performance.
- Create a new Webform, add a component.
- Under "Form settings", add both a confirmation message and a redirect URL.
- Submit the form as a registered user, you are redirected and shown a message.
- Submit the form as an anonymous user, you a redirect but the message is not shown.
Now that Webform tacks on a
?sid=xidentifier on all redirects, we could simply check if $_GET['sid'] is set and disable the page cache if that occurs.Comment #4
quicksketchI just spent a good long time trying to figure out the cause of this bug, as it turns out, I had a bad problem with my sandbox where UID 0 had been deleted from the "users" database table. This had the effect of making ALL anonymous messages not work. After re-inserting the UID 0 row into the users table, I couldn't reproduce this problem any more, in either 2.x or 3.x. A clean install of Drupal reveals this problem does not exist in either version of Webform. My guess is you might have a similar problem, or another module is somehow clearing the messages.
Comment #5
Anonymous (not verified) commentedIn my case this problem occurs on one site but not in one other ! Same configuration Drupal 6.16 and Webform 3.2.
This is weird. Furthermore warning messages for empty fields are correctly displayed in the same time...
I had no UID 0 : seems it was changed to another number... I set it back to 0 and message confirmation works ! Thanks to you quicksketch !
Well, I've done some investigations. I am currently working on a draft site which is in fact a perfect clone of the production one. The clone is a brand new one, no more than a few days old and there are not a lot of changes from the production to it.
Maybe the problem arrived during the database cloning...
On cloned database it seems UID 0 has been changed to UID 9 : the greater UID of the table.
Comment #6
quicksketchYeah I think there's some module out there that's likely calling the
user_delete()function with a NULL value. It's supposed to take a UID, so you usually see things likeuser_delete(NULL, $account->uid). However, I found that passing NULL as the UID will delete UID 0! That's pretty dangerous since 1) There's no indication that user ID 0 would be deleted and 2) It causes all kinds of very obscure problems (like this one). It also has some bad effects on Views when dealing with anonymous content.However I checked Drupal 7 and tried to do the same thing there, fortunately it throws a PDO exception and UID 0 is kept in-tact. I'm not sure this will get fixed in Drupal 6 though, since it's only apparent if some other module is mistakenly passing in a NULL uid. However I have no idea which module did this to me, it could have been any number of modules that delete users, or even core itself.
Ah well. As far as Webform is concerned, this problem is fixed. I'll keep an eye out for modules that might be causing this behavior, but in the mean time there's no module to point at.
Comment #7
phdenis63 commentedSql command to recreate missing anonymous user:
INSERT INTO users SET uid = 0, name = 'anonymous'; INSERT INTO users_roles VALUES(0,1); DELETE FROM cache;
(Information from http://agaric.com/note/drupal-deleting-user-uid-0)
Do not forget to add the table prefix if needed
Comment #9
oxford-dev commentedI'm having the same problem but I DO have user 0 in the database.
It could possibly be due to my site using Boost module, I will try and dig deeper and report back.
Comment #10
oxford-dev commentedI can now confirm this erroneous behaviour is due the Boost module being enabled.
Comment #11
sinini commentedi don't have the boost module installed, but neither with a logged in user nore with an anonymious user, i get a confirmation message. The user with UID 0 was missing, but after creating him, it still doesn't work...
Redirecting to a confirmation page works, but is not, what i want wo display...