I updated drupal 5 from rc1 to rc2. On rc1 the errorsite-forwarding worked fine, but now the "Welcome to your new Drupal website!"-site comes up where the errorpage should be. In other words, if I click on a link that has no target the browser doesn't show the configured errorpage but the mentioned welcome-page.

CommentFileSizeAuthor
#6 node_40x_0.patch1.1 KBchx
#5 node_40x.patch1.05 KBchx
#3 node.module_50.patch1.13 KBRobRoy
#2 node_404.patch847 byteschx

Comments

chx’s picture

Status: Active » Postponed (maintainer needs more info)

This is very likely a won't fix. Is your errorpage a node/1234? If yes, then alas this is not possible in Drupal 5 without coding a few lines -- you need a menu entry pointing to that page.

chx’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new847 bytes

Let's see what can be done. This is not a 100% for the real issue http://drupal.org/node/88707 but this is a lot better than getting a barrage of questions (which already startedstarted just today we got more than one on channel).

RobRoy’s picture

Version: 5.0-rc2 » 5.x-dev
StatusFileSize
new1.13 KB

Improved the docs and added an isset().

Tested this with custom 403/404 pages and it works. It's a bit of a hack, but this absolutely needs to be fixed before release or else we'll be flooded with bug reports / support requests on this.

chx’s picture

This is a hack. No need to tell me. But this can not be fixed with the confines of Drupal 5. Again, this is not a real fix because if you direct 403/404 to a page which is defined in hook_menu !$may_cache then you will get a problem. However, I suspect 99% of these are nodes and those are fixed. This monster will be nicely removed from Drupal 6 as !$may_cache will not even exist. And it's only a two line monster.

chx’s picture

StatusFileSize
new1.05 KB

Drumm asked me to solve this in menu. Sure. As I think more, the 403/404 pages never worked in !$may_cache just it bites now that node_page is gone -- in the past node/58945 falled back to 'node' and that called node_page which happily displayed node/58945. Neat spaghetti code that function was.

Also, so few people tried to set 403/404 to non-node, non-cached paths that they have not reported to us since Drupal 4.5...

I can't say this is a nicer solution than the one above but without a doubt, more correct. It requires PHP 4.3 but heck, even the mysql connect string requires one, so I do not care.

chx’s picture

StatusFileSize
new1.1 KB

Let it be commented. Gerhard likes this hack better because it's still a hack but at least it's at the correct place.

Steven’s picture

Status: Needs review » Fixed

A hack, but a good fix until we get Drupal 6's menu system into core. Then all this will be gone :). And yes, the menu cache is already being cleared when saving the settings.

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)