Title basically says it all:

I have a webform that only authenticated users are supposed to see and submit. Earlier on (say until 2 months ago), anonymous users would get to see a "You need to log in" page when trying to access the webform, which would even send them back there upon completing their sign-up; I liked that functionality very much! Now anonymous users only see the name of the webform and an empty page. Unfortunately I cannot say with any amount of certainty when this happened.

Inspecting Roles, Permissions, user settings etc. does not yield any clues.
Any hints?

Cheers,
Dennis

Comments

subadmin’s picture

Change permission for that purpose i used himself in a web site but it work well
you should be set the permission of web form module i am assure its work.

dlw’s picture

subadmin, thank you for your answer, but I cannot make much sense of it, and it is pretty unspecific.
Which permission should I change, where should I change it?

Also note this does not address the issue that it used to work, but stopped working some time ago.

quicksketch’s picture

Category: bug » support

This behavior always happens automatically. The logged out users should see a message at the top of the page and the description of the form (they body field and any CCK fields you've added). The form itself is not shown unless they have logged in. It may be that messages aren't being printed out at all in your theme. Do you get messages after you have logged in or saved a new node?

dlw’s picture

The logged out users should see a message at the top of the page and the description of the form (they body field and any CCK fields you've added).
Logged out users used to see the message ("bla you have to log in bla"). I am not sure what you mean by "body field", and I have not knowingly added any CCK fields (the form is pretty simple - some textfields, some radio buttons and the like).
With current versions though, logged out users only see the form title and a (themed) blank page. If you wish, you can take a look yourself.

It may be that messages aren't being printed out at all in your theme.
No, they work fine (see below). Our site is using the slightly modified "swirlylensflare" VenturaCottage theme.

Do you get messages after you have logged in or saved a new node?
Yes: logged in users get to see the whole form, they can submit it, and they get our "thank yor for submitting" message. Works just fine, like it used to.

quicksketch’s picture

Hm, I'm pretty sure this would be a theme problem. Try switching to Garland and see if the messages show up there.

dlw’s picture

Try switching to Garland and see if the messages show up there.
I did, but it still does not show up.

To re-iterate: It used to work before, with the current theme and the current settings. Apparently one of the recent updates broke it.

quicksketch’s picture

Apparently one of the recent updates broke it.

Perhaps, but I cannot reproduce this problem on a clean installation. The problem very well could be caused by another module on your site. I need to be able to reproduce this problem in order to fix it.

dlw’s picture

Perhaps, but I cannot reproduce this problem on a clean installation.
Bummer!
Any ideas on what else I could try?

zbricoleur’s picture

For the record, I am running into exactly the same behavior since upgrading from 2.9 to 2.10 yesterday.

The problem is at line 1145 in webform.module:

In 2.9, it's

if (!$preview && !$logging_in) {

In 2.10, it's been changed to

if ($node->build_mode != NODE_BUILD_PREVIEW && !$logging_in && ($user->uid != 0 || !variable_get('cache', CACHE_DISABLED))) {

I can't figure out why you would want to prevent messages from being shown except when the user was logged in and/or caching was enabled?

quicksketch’s picture

I can't figure out why you would want to prevent messages from being shown except when the user was logged in and/or caching was enabled?

It's actually that messages are shown only if:
A) The user is logged in.
B) The user is anonymous and caching is disabled.

If the user is both anonymous and caching is enabled, then messages can't accurately be displayed (things like the submission limit being set to "1 ever" for example). Otherwise users might end up seeing each others messages.

In the case of anonymous users not having access at all, this might make sense to show the message at all times.

quicksketch’s picture

Status: Active » Closed (duplicate)