The alternative behaviors for when the user is denied access to the form (re: #2943879: How to display alternate text when the user is not allowed to create a Webform ?) still don't seem to be working.
I've updated to 8.x-5.0-rc21, run associated DB updates, cleared cache, and tried the new settings.
I have a webform that can only be submitted by Authenticated users. This is set in /admin/structure/webform/manage/MY_WEBFORM/access, in the Create Submissions section.
On /admin/structure/webform/manage/MY_WEBFORM/settings/form, in the Access Denied section, none of the options for When a user is denied access to this webform have any effect. When I visit the URL for the webform as an Anonymous user, I only see the node's body text. No additional inline text and no redirects. (When I visit as an authenticated user, the form displays and works property). My ideal functionality is the Inline text option, but, as I said, none of the choices have any effect.
I hope I'm understanding the intended behavior correctly.
Thank you!
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3001355-8.patch | 4.72 KB | jrockowitz |
| #5 | 3001355-5.patch | 4.72 KB | jrockowitz |
Comments
Comment #2
jrockowitz commented@jeffschuler Did you clear Drupal's cache? (possibly two times)
Comment #3
jeffschulerThanks for your quick response!
Yes, I've cleared cache many times. Tried this on both a local dev and production version of a site, and with a webform that has existed for awhile (pre-5.0-rc21) as well as with a newly created webform.
Comment #4
jrockowitz commentedI found this unrelated bug #3001446: Access denied message is not being displayed.
Access denied handling has not been properly set up for webform nodes. I need to look into this issue.
Conceptually, only the access denied message should be displayed. I am not sure we can or should redirect to the login page when a user can access a node but not the webform
Comment #5
jrockowitz commented@jeffschuler The attached patch is refactoring the webform field so that the access denied message is displayed on a webform node when any custom access denied behavior is defined.
Let's first see if any tests are going to break.
BTW, thanks for catching this issue.
Comment #6
jrockowitz commentedComment #8
jrockowitz commentedComment #10
jrockowitz commentedPatch is applying fine locally. I think there might be an issue on D.O.
When I have time I will run all the test locally.
Comment #11
jeffschulerPatch applied cleanly to 8.x-5.0-rc21 but would not apply to 8.x-5.x-dev.
In the patched 8.x-5.0-rc21, the access denied text showed properly.
Thanks a lot for your quick and expert help!
Comment #13
jrockowitz commentedI tested the patch locally and everything seems fine. I committed the patch. Please download the latest dev release to review.
Comment #14
jeffschulerWorking. Thanks again!