v5.5.1 Page Not Found is leading to baldness
Permalink
Because I've spent the better part of the past 2 hours trying to get it to work right... and I'm not any better off. Just balder!
I had it all working in 5.4.2.2. I'd created a page_type in my theme called "page_not_found.php" and added content to it that I wanted displayed. Worked a treat!
Upgraded the site to v5.5.1 and KABLOOEY! Page Not Found is throwing all sorts of weird errors. Sometimes it claims a "MySQL error: [1048: Column 'cID' cannot be null] in EXECUTE("INSERT INTO Areas (cID,arHandle,arIsGlobal) VALUES (NULL,'Header Navigation','1')")".
Other times it says I don't have permission to view the page!
And now, while attempting to get back to square one by removing the line from /config/site_theme_paths.php so that it's not trying to load my theme... I get the default "Page Not Found" page that has an "Add to Main" editable block showing... even though I'm not logged in! (See attached).
Is it just me? Am I doing something wrong?
HEEEEEEEEEEEEELLLLLLLPPPPPPPPPP!!!! My follicles implore you! ;D
- John
I had it all working in 5.4.2.2. I'd created a page_type in my theme called "page_not_found.php" and added content to it that I wanted displayed. Worked a treat!
Upgraded the site to v5.5.1 and KABLOOEY! Page Not Found is throwing all sorts of weird errors. Sometimes it claims a "MySQL error: [1048: Column 'cID' cannot be null] in EXECUTE("INSERT INTO Areas (cID,arHandle,arIsGlobal) VALUES (NULL,'Header Navigation','1')")".
Other times it says I don't have permission to view the page!
And now, while attempting to get back to square one by removing the line from /config/site_theme_paths.php so that it's not trying to load my theme... I get the default "Page Not Found" page that has an "Add to Main" editable block showing... even though I'm not logged in! (See attached).
Is it just me? Am I doing something wrong?
HEEEEEEEEEEEEELLLLLLLPPPPPPPPPP!!!! My follicles implore you! ;D
- John
Anyone have any thoughts? At the moment, I've got the custom 404 page turned off completely and had to disable the application of the custom theme in the site_theme_paths.php file. So, right now, I've got the default C5 page_not_found page showing.
Appreciate any help/pointers!
Thanks,
- John
Appreciate any help/pointers!
Thanks,
- John
id reinstall. seems like things have gotten pretty screwed up by you trying to fix it.
@12345j,
Yeah... that was the feeling I was beginning to get... which is a big factor in the hair-pulling. The pain was helping to squelch the sick feeling in the pit of my stomach. ;D
Thanks,
- John
Yeah... that was the feeling I was beginning to get... which is a big factor in the hair-pulling. The pain was helping to squelch the sick feeling in the pit of my stomach. ;D
Thanks,
- John
This is a bug in the core, basically, when it renders the 404, its trying to get the cID, but since the page doesn't exist, it just throws an error because its null, this has been a bug for quite a while, it just hasn't presented itself this way until 5.5.
Ill take a look on how to fix this.
Mike
Ill take a look on how to fix this.
Mike
Mike,
NOT that I'm glad that there's a bug in the core... but what a relief it's a bug in the core! ;D Thanks for posting. I couldn't figure out, for the life of my, what cID was at issue... I thought it was with the stack for the auto-nav or something like that, but removing that from the page_not_found.php template wasn't fixing it.
I'll (happily) live with the default, C5 page until a workaround, patch, or new release.
Thanks so much for saving my remaining (few) follicles from an untimely demise. LOL!
- John
NOT that I'm glad that there's a bug in the core... but what a relief it's a bug in the core! ;D Thanks for posting. I couldn't figure out, for the life of my, what cID was at issue... I thought it was with the stack for the auto-nav or something like that, but removing that from the page_not_found.php template wasn't fixing it.
I'll (happily) live with the default, C5 page until a workaround, patch, or new release.
Thanks so much for saving my remaining (few) follicles from an untimely demise. LOL!
- John
I'd like to know if you find a fix for this, even if it's a core modification. We are currently not using global areas on any of our sites and use named blocks instead because of this very problem.
Not that I'm keen on the idea of re-architecting my site... but is the page_not_found problem specific to having Global Areas / Stacks on a page? i.e. does using named blocks circumvent the issue altogether?
- John
- John
It is specific to global areas, if you use named blocks there is no error and page not found can be skinned normally. That's what we are doing now.
I think Andrew has made some changes to resolve this in github but there a sort of workaround here
http://www.concrete5.org/community/forums/customizing_c5/mysql-erro...
http://www.concrete5.org/community/forums/customizing_c5/mysql-erro...
I've tried removing the page_type from the theme and copying the "page_not_found.php" single page from /concrete/single_pages to /single_pages... logging into C5, going to Dashboard/Single Pages and editing the content. Everything appears normally while editing the page_not_found page... but when you navigate to an invalid URL in the site, blam-o... it looks all weird and has the following error:
My theme is using several Global Areas... the Header Navigation being one of them. I created a Stack that has the auto-nav placed in it... and I added that Stack to the "Header_Navigation" Global Area.
There are several other Global Areas in the Footer, too. But I can't figure out why the page is displaying correctly in Edit mode but not when viewed on the site.
Can anyone help me?!?!
Thanks!
- John