date browser broken with latest update
anthonym - May 10, 2008 - 18:43
| Project: | Date |
| Version: | 5.x-2.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Just updated to latest dev release, and my date browser block & page now no longer display any nodes. I received this error when running the database upgrade script which may or may not be relevant.
Unknown column 'timezone_name' in 'field list' query: SELECT DISTINCT timezone_name FROM users ORDER BY timezone_name in ...includes/database.mysql.inc on line 172.Thanks,
Anthony

#1
Just realized that that error got converted by the Drupal filter. Just in case it's relevant, here is another try. I'll insert spaces after &s so they don't get converted.
Unknown column & #039;timezone_name& #039; in & #039;field list& #039; query: SELECT DISTINCT timezone_name FROM users ORDER BY timezone_name in ...includes/database.mysql.inc on line 172.
#2
If you don't have a timezone_name column in your users table you have a very messed up situation. That column was added when you first installed the date API and there should be no way you can get to the timezone update without that column already being there.
Can you inspect your database to see if such a column exists in that table. If not I need more info about exactly how you installed and/or updated your site to figure out how you could not have that column in your database.
#3
I checked, and I have a timezone column, but not timezone_name. I should add that I've gone back to version 5.x-2.0-rc for the time being and everything seems to be functioning fine with the date module other than (obviously) the situation I described back in this other thread: #232820: date browser block display bug. I'm not sure if I should try updating again or not. Should I have timezone_name in version 5.x-2.0-rc as well? If so, then something is wrong, but I can't tell what.
#4
You should have had that column in every version of the Date module, going all the way back to its very beginning. I have no idea how you could have the Date API installed and not have that column and this is the first time I've ever heard of this problem. Did you update your database manually or do something else other than the usual method of installing it on the Modules page?
Any way, you cannot use the Date API or any module that depends on the Date API without that column. It can be empty (and often is if the user hasn't set it) but the column must be there.
If you have access to your database, you can add it manually with something like:
<?phpdb_query("ALTER TABLE {users} ADD timezone_name varchar(50) NOT NULL");
?>
#5
Thanks. I did the manual database fix and re-updated. Everything seems to be fine so far.
#6
OK, good.
#7
Automatically closed -- issue fixed for two weeks with no activity.