Jump to content

404 error


daniel-not-dan
 Share

Recommended Posts

Hi there - 

I just did some big changes to my site thesharktankproducts.com and re-uploaded it to my live server from my local server.

I just noticed that the 404 page no longer works. That was one of the pages I changed. I used the 404 page that comes with the Processwire install, but changed the title and the template. 

This is the error I get when I'm logged in:

Error: Exception: Table 'theshark_20130613.ProcessRedirects' doesn't exist (in /home/theshark/public_html/wire/core/Database.php line 118)

#0 /home/theshark/public_html/site/modules/ProcessRedirects/ProcessRedirects.module(261): Database->query('SELECT id, redi...')
#1 /home/theshark/public_html/wire/core/Wire.php(293): ProcessRedirects->checkRedirects(Object(HookEvent))
#2 /home/theshark/public_html/wire/core/Wire.php(229): Wire->runHooks('pageNotFound', Array)
#3 /home/theshark/public_html/wire/modules/Process/ProcessPageView.module(104): Wire->__call('pageNotFound', Array)
#4 /home/theshark/public_html/wire/modules/Process/ProcessPageView.module(104): ProcessPageView->pageNotFound(Object(NullPage), '/june/')
#5 [internal function]: ProcessPageView->___execute()
#6 /home/theshark/public_html/wire/core/Wire.php(271): call_user_func_array(Array, Array)
#7 /home/theshark/public_html/wire/core/Wire.php(229): Wire->runHooks('execute', Array)
#8 /home/theshark/public_html/index.php(192): Wire->__call('execute', Array)



This error message was shown because you are logged in as a Superuser. Error has been logged.
 

And when I'm not logged in, this is the error I get:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Error has been logged. 
 

Can anyone help me with how to get the 404 page working again? 

Thanks!

Link to comment
Share on other sites

Thanks, Sinnut. I just checked in my db and the table does exist.

I'm not at all confident in my abilities to figure out what I'm supposed to do with the code you sent me. (More of a design guy) 

It does look like that code is commented out - do I just uncomment it? Can you elaborate a little more if you have a few minutes?

What's weird is that the 404 page is working fine on my local server, so I can't figure out why it won't work on the live server.

Thanks!

Link to comment
Share on other sites

Glad you got it solved.

Is there any chance your local environment is Windows? Because i seem to recall that with MySQL on Windows by default table names are stored lowercase on disk and is case insensitive on name comparisons. That would explain why it did work for you locally but not on your live server, which most likely runs on some flavor of *nix.

Regarding apeisa's question; i would indeed opt for lowercasing db table names.

Link to comment
Share on other sites

  • 1 year later...

After importing my database to a staging server I get the same error message whenever trying to open the login screen at /processwire/admin/

2014-08-08 11:22:32    guest    http://staging.example.com/http404/%C2'>  Error:     Exception: Table 'xxx.ProcessRedirects' doesn't exist (in /is/htdocs/wp1119453_30NSVCRJY7/www/processwire/wire/core/Database.php line 114)

The table does exist, but its name is in lowercase: processredirects

As I can log in at localhost/processwire/admin/ on my Ubuntu machine, I am wondering where this problem is originating from. Also I am not quite sure where and how I should rename the table name.

I therefore would be grateful if someone could help me out.

Cheers,

Stefan

Link to comment
Share on other sites

The table name should be: ProcessRedirects - so you should be able to just rename it using PHPMyAdmin or via SQL command line.

It is created here: https://github.com/apeisa/ProcessRedirects/blob/master/ProcessRedirects.module#L326

Did you move from Windows to Linux? Names are not case sensitive on Windows, but they are on Linux? Still, not sure why it would have been created in lowercase in the first place, given the code that creates the table.

  • Like 1
Link to comment
Share on other sites

I am using Ubuntu locally. Also, on my computer everything is working without problems, although the table name is still in lowercase (as are all other table names as well).

Renaming processredirects to ProcessRedirects using PHPMyAdmin gets rid of the error but results in a 404 page not found when trying to access /processwire/admin on the server. But I guess that is an unrelated problem I will check out later.

So although I successfully renamed the table, I still don't know how I got this problem in the first place. Does anybody have any idea?

Cheers,

Stefan

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...