Zen Cart Logo

Admin error

Locked

Views: 862

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
24 Aug 2007, 9:06 PM
#1
pinixdesign avatar

pinixdesign

New Zenner

Join Date:
Aug 2006
Posts:
30
Plugin Contributions:
0

Admin error

Yesterday I installed the Time Zone offset module. Everything worked great. Today I had to make a major database change, so I backed-up my database and then had to restore it (back to the backup I made today). During the restoring process an error came up and now I can not access the admin area at all! I just get a page with the following error.

 
1054 Unknown column 'TIME_ZONE_OFFSET' in 'field list'
in:
[select date_add(now(), INTERVAL TIME_ZONE_OFFSET HOUR) as date]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Please help! I was supposed to post this site tomorrow!

24 Aug 2007, 9:10 PM
#2
pinixdesign avatar

pinixdesign

New Zenner

Join Date:
Aug 2006
Posts:
30
Plugin Contributions:
0

Re: Admin error

Don't know if this would be helpful also...

The browser error that shows up is:
Line: 333
Char: 15
Error: Object required
Code: 0
URL: http://www.mysite.com/admin/

I just don't know what file to look in to make any code changes.

24 Aug 2007, 9:17 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Admin error

Your PHP code is expecting to have database fields related to the time-zone-offset module, but your database doesn't have them.
This would be typical of restoring from a backup made prior to the installation of that module, but using PHP files related to "after" installing the module.

you have things out of sync.

24 Aug 2007, 9:21 PM
#4
pinixdesign avatar

pinixdesign

New Zenner

Join Date:
Aug 2006
Posts:
30
Plugin Contributions:
0

Re: Admin error

But I restored to a backup just done today - after the install of the module.

How do I resolve it? Can I edit something in my database or do I need to go in and revert back the php files?

24 Aug 2007, 9:28 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Admin error

Well ... I have no way of knowing what the best way to fix it is ... either you intended to have the timezone-offset module installed, or you didn't.
If you expected it to be installed, then ... I guess I'd be planning to re-install it.

You might check to see whether you've edited your configure.php files to be pointing to a different database and/or using a different table-prefix vs what your backup contained.

Honestly, if you did the backup today, and you didn't change the PHP files, and you did a restore ... then either it wasn't working when you did your backup, or you've restored the wrong database ... or you've changed files that you don't remember changing. Or maybe your backup or restore wasn't complete.

The "answer" depends on answers to the issues of all the steps you've done today and what state you want the database/php files to be in when you're done.

25 Aug 2007, 3:34 PM
#6
pinixdesign avatar

pinixdesign

New Zenner

Join Date:
Aug 2006
Posts:
30
Plugin Contributions:
0

Re: Admin error

Thank you so much for your quick help. I was able to get the site back up and running. It turned out there was an error when I restored the database so it set up a blank one instead, which was missing the needed field. I was able to run the SQL query in phpMySQL to put the fields back into the database. That got rid of the error and let me back in admin. Then I was able to restore my database back without a problem when I retried.