1

My site access is only for registred users, then when you try to access drupal returns the "access denied" page. I want to customize my "access denied" page but the anonymous user doesn't have the "View published content" permission. Then they can't see a basic page node with my access node page customization.

How can I resolve this ? -It can be a static html (but I don't know how to redirect when this error is raised). But drupal throws an error when I put in /admin/config/system/site-information because isn't a drupal path -If is a node (my access denied page) how can I grant the anonymous users to view ?

I'm using Drupal 8

  • You need to create one node page for access denied and set anonymous permission through module content access to access particular page. – vgoradiya Jan 17 '17 at 9:53
1

You can try Custom error module, It allows the site admin to create custom error pages for HTTP status codes 403 (access denied) and 404 (not found), without the need to create nodes for each of them.

  • At this moment, 17 Jan 2017 there is no stable release for Drupal 8 of Custom error module – ferriol Jan 17 '17 at 12:42
  • You can try the latest release(If your drupal is of d7 then go for the latest d7 release or if d8 then go for the d8 dev version). – Rahul Mishra Jan 17 '17 at 12:48
  • Thanks @Rahul Mishra, this for a client in a production site, I prefer to not use dev versions. – ferriol Jan 17 '17 at 13:11
  • You can also create custom code that provides hardcoded controllers that display a 404 page, but it might be easier to review a dev module and make sure it works than writing it yourself. And custom code tends to be more unstable than many contrib modules that don't have a release – Berdir Jan 17 '17 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.