Jump to content

404 Page not displaying


kriegar
 Share

Recommended Posts

Hi there,

Bit of a strange one here, usually the 404 pages just go to the default 404 page setup in processwire however the website im working on at the moment doesnt seem to do that and they go to the homepage which is frustrating our SEO guy!.

Does anyone have any idea why that could be. I have checked the config and its pointing to the correct page ID and as far as I can tell the .htaccess is stock.

Any help would be appreciated guys.

Thanks

Link to comment
Share on other sites

Please enable debug mode and in the backend's footer you'll find the debug tools. Could you take a look at the "Hooks" if there's anything hooking into ProcessPageView especially pageNotFound().

Thanks for getting back to me, I checked the hooks and I do have an entry for ProcessPageView that looks like this, it doesnt seem to give me much information though, 

after ProcessPageView::pageNotFound() PagePathHistory::hookPageNotFound() class method 100

This doesnt mean anything to me though, I tried to find a class for processPageView in the wire but didnt find one. Does this help at all?

Link to comment
Share on other sites

So you've installed the PagePathHistory module, does disabling the module (maybe on a local enviroment first) change anything in the 404 behavior?

That didn't seem to do it, it was also a core module so im assuming it comes with processwire already.

What I have noticed is that some url's will go to a 404 and others don't.

For example:

This doesnt 404 with gobldeygook in the url http://www.best-of-scotland.co.uk/waosdihoasidh12

This doesnt work either: http://www.best-of-scotland.co.uk/ireland/mystical-ireland/asdasd

However this does http://www.best-of-scotland.co.uk/golf/scotland/st-andrews-the-east-coast-nw/asdasd

This one has me a bit stumped.

Link to comment
Share on other sites

What I have noticed is that if you go to a page that exists that isnt the homepage then add crap to the url then it 404's however if you do anything at all from the root url that doesnt include the url to an existing page then it will just go to the homepage.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...