Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch allows a 404 (not found) page to be configured to theme with blocks if the site_404 page is supplied.
Comment | File | Size | Author |
---|---|---|---|
#16 | 221399-404-block.patch | 2.67 KB | smk-ka |
#12 | error_reporting-8.patch | 2.54 KB | jeffschuler |
#10 | error_reporting-7.patch | 2.48 KB | jeffschuler |
#6 | 404-block-checkbox.png | 51.54 KB | lilou |
#6 | error_reporting-6.patch | 1.76 KB | lilou |
Comments
Comment #1
lilou CreditAttribution: lilou commentedStill appllied.
+1 for this patch.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commented@lilou: Are your ready to RTBC the Status?
Comment #3
lilou CreditAttribution: lilou commentedWork great ...
Comment #4
lilou CreditAttribution: lilou commentedComment #5
dmitrig01 CreditAttribution: dmitrig01 commentedI would use a checkbox personally for binary settings.
Comment #6
lilou CreditAttribution: lilou commented@dimitrig01 : you're right.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedYes, I think so to.
Comment #8
Dries CreditAttribution: Dries commentedInterestingly, the 404 and 403 field descriptions don't describe what happens when you leave those fields blank. I think we should describe what happens, as we hint at it in the description of the checkbox. If you wipe your memory and context, it is hard to make sense of the different form elements. I recommend that we massage the form descriptions some more.
Comment #9
webchickGuess that makes it CNW then.
Comment #10
jeffschulerRe-rolled to apply against current D7 HEAD.
Incorporated very brief but more descriptive text for default 403/404 page fields:
Changed: If unsure, specify nothing.
To: Leave blank to display a generic "access denied" page.
And: Leave blank to display a generic "page not found" page.
Also attempted to simplify the checkbox description text and added "default" to the checkbox title to make it more clear this applies to the default 404 page.
Comment #11
tstoeckler// To conserve CPU and bandwidth, omit the blocks.
This needs to be changed to something like:
// To conserve CPU and bandwidth, allow the user to omit the blocks.
Comment #12
jeffschulerHow about:
// Optionally omit the blocks to conserve CPU and bandwidth.
Comment #13
tstoecklerSure.
Comment #14
smk-ka CreditAttribution: smk-ka commentedNice. I'd even RTBC it, but what about the next developer who requires to display a fully themed "click here to signup" page for visitors hitting the access denied page?
Comment #15
jeffschulerBlocks are always displayed on 403 pages.
Comment #16
smk-ka CreditAttribution: smk-ka commentedOh, cool :)
Rerolled with whitespace issues fixed.
Comment #17
catchLooks good to me, was RTBC before and those points are covered. I don't really like that we're cluttering the performance page with this, but it is a performance setting, so not much to be done about that.
Comment #18
catchumm, I read back after readding the text and it's been reviewed by a few people, de-tagging.
Comment #20
lilou CreditAttribution: lilou commentedSetting to previous status - testbot was broken (failed to install).
Comment #21
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #22
moshe weitzman CreditAttribution: moshe weitzman commentedTo me, this is pref bloat. It is a 5 line contrib module to implement this in hook_page_alter(). We need less special cases, not more. I think the whole #show_blocks should go away now. Just show them all and let contrib or site builder decide rules otherwise. #show_blocks is absurd since it only works for the left and right regions.
Comment #23
PasqualleI think the "show them all" is not good enough for Drupal core #232037: block_list() renders all blocks, even on 404
but Moshe is right, there could be a better solution..
Comment #24
tstoecklerMarked #116895: Show regions at 404 page as duplicate.
Comment #25
JohnAlbin@moshe I really agree with you on #show_blocks.
@Pasqualle: The default should be to show them all.
How could Drupal core possibly know which regions of a given theme should be shown/hidden on a 404 page. Is it going to inspect the region first to make sure there isn't a critical navigation menu block? There should be a toggle next to each theme region on whether it should be rendered on 404 pages.
And, given the lateness of the D7 cycle, that is why it should be a contrib module. Hell, its the inverse of my 404 blocks module; I'd be happy to write it after code freeze. Or before, if that's what's required to get #show_blocks removed from core.
Comment #26
JohnAlbinAlternatively, you could have a per-block setting for “hide on 404” (while still killing #show_blocks); I'm less certain about the performance savings on that option, though.
Comment #27
davyvdb CreditAttribution: davyvdb commentedRendered obsolete by #423992
Comment #28
davyvdb CreditAttribution: davyvdb commented