primary links
buntstich - February 13, 2009 - 09:01
| Project: | 404 Blocks |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | buntstich |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
do not display on error pages

#1
I'm also not getting the primary_links or secondary_links block but I do get an "advert" user block now appearing in the rh column that wasn't before enabling block404 module.
#2
Just noticed that I'm getting the primary and secondary links and admin and devel menus on the 403 error page but none of them on the 404 error page. Doesn't matter whether I'm logged in or not (except I don't get the admin and devel menus when logged out of course)
I'm using CustomError 6.x-1.0 on Drupla 6.6 btw
#3
Just found the explanation of 404 and 403 errors at http://drupal.org/node/116895#comment-1186204 so I now realise you can forget my last post :D
#4
OK more info - I had a look through the Blocks404 code and noticed the blocks404 menu hook so I tried going to mysite.com/blocks404 and that shows me the blocks 404 page "not found" page with the links so the module is working on it's own.
The problem (for me at least) then, is to do with using the CustomError module. I'd followed this how to at http://www.kinetasystems.com/blog/creating-custom-error-pages-in-drupal which includes the following comment
Which is what led me to Blocks404 in the first place.
#5
I've been doing some more testing and I managed to get the menus working on my local test site but on the porduction site I still get no menus.
During testing I tried copying some of the blocks404 code into customerror and suddenly the menu's appeared - and they stayed even after I took the code back out of customerror (I copied blocks404_preprocess_page, calling it customerror_preprocess_page)
But the same didn't happen when I put the modified customerror code onto my production site.
After more testing (using the great FirePHP) I've noticed that blocks404_init isn't being called on the production site but is on the test site. The comment in blocks404_init states that "If site_404 is not set, all menu-related items disappear on 404." so I next thought that that was the problem, however since I am using customerror I have site_404 set to customerror/404 so surely the menu's should appear without blocks404 help anyway?
I'm now at a complete loss as to what in Drupal is causing the menu's to not appear.
#6
I've fixed my issue and it wasn't anything to do with blocks404.
As I said in my last message I figured out that the menus should be rendered on any custom 404 page and so blocks404 is only fixing the case when you have no custom 404 page.
Since I had a custom 404 page it had to be that and after looking at the php code I'd put into the customerror 404 section I noticed a difference between my test and my live site - on the live I had:
menu_set_active_item($path);Which I'd got from a comment in the how to I mentioned in #4 above.
Having just revisited to leave feedback I notice that that comment was talking about adding it to the 403 page not the 404 page so my mistake entirely.
This issue is now fixed for me.
#7
ok then. :-)
Leaving at "maintiner needs more info" because I don't have enough info about buntstich's issue.