In node http://drupal.org/node/105708#comment-196214, a user points out that error pages must be internal drupal nodes, even though the on-screen text and base URL path shown indicate otherwise. Since I myself was just bitten by this lack of descriptive text, I propose that we add a short sentence to each 403 and 404 field on the Administer > Site Configuration > Error Reporting page.

"This page is displayed when the requested document is denied to the current user. If unsure, specify nothing."

Could be changed to:

"This page is displayed when the requested document is denied to the current user. It must be a drupal node. If unsure, specify nothing."

or even shorter:

"This node is displayed when the requested document is denied to the current user. If unsure, specify nothing."

Comments

senpai’s picture

Assigned: Unassigned » senpai
Status: Active » Needs review

The attached patch changes the #description text on the /admin/settings/error-reporting page so that people don't think they can use a path to a static HTML page instead of a Drupal node.

senpai’s picture

Trying to upload the patch again, cause the first time didn't take.
****
______________________________
Senpai (also see my Drupal Dojo account)
I work for Achieve Internet.

senpai’s picture

Version: 5.1 » 7.x-dev
Component: file system » system.module
Priority: Normal » Minor
StatusFileSize
new1.61 KB

Cool! It works if you don't click the 'Attach' button, but instead just do a 'Post Comment'.
****
______________________________
Senpai (also see my Drupal Dojo account)
I work for Achieve Internet.

obsidiandesign’s picture

StatusFileSize
new1.59 KB

Rerolled to clear the offset to HEAD. Patch applies & System simpletests run successfully. I agree that the description text is more clear/helpful. +1 for RTBC.

gpk’s picture

Does it have to be a node? Presumably it usually will be, but in principle could be any path on the site?

kscheirer’s picture

thats a good point, it looks like any path that drupal can handle is valid here.

obsidiandesign’s picture

I do have a question about setting it to any path (I can see that it's valid to do so) - how do we/should we validate that the path exists? The case I'm thinking of would be: Admin sets path to /some_module_provided_path. Admin later disables/uninstalls 'some_module'. Now, /some_module_provided_path no longer exists. Should this be brought to their attention at the time?

I guess the same goes for a node (maybe this is a totally separate issue really). Would "this page" be better than "this node", for starters, covering #5-6?

christefano’s picture

Status: Needs review » Needs work

The expression "specify nothing" is an oxymoron. I realize that it's been in core for a long time, but I suggest taking this opportunity to change the text to "leave blank to use the default error page."

kscheirer’s picture

Status: Needs work » Closed (duplicate)

Bad "specify nothing" text fixed in #221399: Allow administrator to decide if blocks should be displayed for site_404 pages, marking this issue as a duplicate.