At /admin/config/system/site-information I have defined the error pages as below image:
where the /node/59 page is a custom design for an "access denied" page.
Now, for the contact webform, set the access only for "Administrator" role.
When a normal user will log in as a normal authenticated (not Administrator) user, and try to visit the webform from /form/contact, the user will be redirected to the default "access denied" page (see below image) instead of being redirected to the new /node/59 custom access denied page.
Note: any denied page (not a webform one) is indeed being redirected to the "custom" access denied page and not to the default one.
The above is happening only with webform URLs.
Thank you,
| Comment | File | Size | Author |
|---|---|---|---|
| Access denied.PNG | 4.01 KB | c.e.a | |
| Error pages.PNG | 15.6 KB | c.e.a |
Comments
Comment #2
jrockowitz commentedI can't replicate this issue.
Below are my steps
Comment #3
c.e.a commentedThat's really weird!
I used the same configuration as yours but still the same problem!
On my test website, I have created a test webform: Record a transaction with access permission only to "administrator".
The alias of all my webform is:
taskNow, as anonymous user (not logged in):
Visit: http://testdrupal.ml/task/record-a-transaction and you will see the default access denied page...
However, if you visit: http://testdrupal.ml/admin/structure/views, you will see a custom access denied page.
Below is my exported webform:
Thank you,
Comment #4
c.e.a commentedComment #5
jrockowitz commentedAre you using the latest dev release of the webform module?
Comment #6
c.e.a commentedI just updated the module to the latest dev release from 8.x-5.1 version... and now the issue is gone!
Thank you for your time and effort
Comment #7
jrockowitz commented