By g10tto on
What's the safest way to change the Access Denied header and subsequent message that will allow for core updates?
What's the safest way to change the Access Denied header and subsequent message that will allow for core updates?
Comments
Probably
Probably http://drupal.org/project/stringoverrides
Any idea where "Access
Any idea where "Access Denied" is stored...?
Sure. The "Access denied"
Sure. The "Access denied" string is in includes/common.inc.
I originally asked because it
I originally asked because it wasn't working for me, but little did I know in February, that it's necessary to flush caches from time to time if your page is mostly compressed.
String Override works perfectly.
subscribing
subscribing
You can specify a different
You can specify a different default page for Access Denied (403) at admin/settings/error-reporting. I don't know if it actually sends a 403 header or not; I don't know where to change that if it does.
What I usually do is redirect
What I usually do is redirect Access Denied under Error reporting tooooo.... user/login
However, it would be nice to be able to do something like add a message:
user/login?msg=Sorry, this page requires logging in.
Anyone know if this is possible or if theres a module for this?
Logintoboggan will do that.
http://drupal.org/project/logintoboggan
how?
Where in login toboggin can i change the access denied message?
Sorry, that was misleading.
Sorry, that was misleading. What I meant was that Logintoboggan provides a message to that effect on the login page. Actually, it says "Access denied. You may need to login below or register to access this page." There is no setting that allows you to change the wording, though the message is wrapped in the t function so you could use a translation or, better, cog.rusty's suggestion (above) of the string overrides module.