Closed (duplicate)
Project:
Drupal core
Version:
5.1
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2006 at 18:02 UTC
Updated:
12 Jan 2008 at 16:25 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedSame concept here on 4.7.2.
Comment #2
Anonymous (not verified) commentedIt corrects if you add the correct alias, content (should exist) and access permissions for that item.
Comment #3
magico commentednot a bug.
Comment #4
(not verified) commentedComment #5
jonathan_hunt commentedI get the same behaviour on 4.7.4. Anon users have no access to the site (access content perm is not granted for anon users). A custom 403 page exists (node/499). So I can't see how the solution proposed by 3dguru applies. A mysterious character '3' appears in the content instead of the content of node/499.
Comment #6
jonathan_hunt commentedOk, I've looked at the code and I understand why this occurs, but I don't yet have a solution.
In the case where anon users have no access content perm, and a custom 403 page is defined, drupal_access_denied() in common.inc is executed. It gets the 'site_403' variable, and then calls menu_execute_active_handler() in menu.inc.
menu_execute_active_handler does a series of tests. The one we run into is
The value of MENU_ACCESS_DENIED is '3'.
This gets passed back to drupal_access_denied() and output to the page.
It seems to me that the 403 page should always be available to users, so either menu_execute_active_handler() should return the 403 page contents, or drupal_access_denied() should ignore the return value of 3...
Comment #7
RobRoy commentedI believe 4.7.5 has a fix for this, can you test this on 4.7.5?
Comment #8
jonathan_hunt commentedI get the same behaviour on 4.7.5 as 4.7.4 (i.e. '3' appears)
Comment #9
jonathan_hunt commentedComment #10
catchWas going to open a new issue but found this.
This seems to happen if you have a typo in the alias for your node - because it's not showing the node itself, but your 403 page, drupal doesn't show a page not found, but returns the "2".
I put the node/[nid] in - it worked fine.
I put the correct path for the node in - also fine.
Wondering if maybe a check for the alias could be done on the custom error handling page? Or maybe document this behaviour on that screen somewhere?
Something like "Drupal will return no content at all on 403 pages if you enter an invalid path for you custom page, so please double check".
Comment #11
mlncn commentedSame issue here-- getting the numeral 2 instead of an access denied page (due to improperly removed login toboggan).
Administer » Site configuration » Error reporting
admin/settings/error-reporting
is where this can be changed to working paths.
Comment #12
bart jansens commentedDuplicate: http://drupal.org/node/84754
The other issue has a patch waiting to be ported, setting this one as dup.