Timeline for Show block only on "Page Not Found"?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 30, 2017 at 19:14 | comment | added | rjl | I am wondering if those gremlins may have been a caching issue, anyway I am glad it worked! | |
Jun 30, 2017 at 17:33 | vote | accept | Sam | ||
Jun 30, 2017 at 17:33 | comment | added | Sam | @rjl Well, you seemed pretty confident that this should work, so I double-checked the path option by adding both the aliased path and the node path to the Only listed pages box… and IT WORKED! I'm at a loss though; I literally spent an hour on this earlier trying every possible way to make this work using the path, and got nowhere. The only thing I did differently this time is use both path options at the same time… which I don't think has anything to do with it. Sigh… must be the Drupal gremlins hard at work again. Anyway, thanks for prompting me to try again! | |
Jun 30, 2017 at 15:18 | comment | added | rjl |
Well, I am surprised by that, as drupal_deliver_html_page() api.drupal.org/api/drupal/includes%21common.inc/function/… is called and it sets/executes menu_set_active_item($path); and $return = menu_execute_active_handler($path, FALSE); using the 404 path you have set in config - and I thought blocks are also invoked from this. So with your 404 page set, your should be able to do compare your 404 path with menu_get_active_trail(); with php
|
|
Jun 30, 2017 at 14:47 | comment | added | Ismini | Instead of adding new node create a panel page. It works! I tried it a month ago! | |
Jun 30, 2017 at 14:43 | comment | added | Sam | That was my first try! Seems simple, right? Doesn't work. When you hit an incorrect URL the Page Not Found page is shown, BUT it doesn't redirect. It retains the incorrect URL. So using its path in the block setup doesn't work… nor does using its node path ("/node/123"). | |
Jun 30, 2017 at 14:39 | history | answered | rjl | CC BY-SA 3.0 |