sproctor / php-calendar

PHP-Calendar
http://www.php-calendar.org/
Apache License 2.0
140 stars 67 forks source link

Problem importing old calendar #160

Closed schneidr closed 2 years ago

schneidr commented 5 years ago

I'm trying to upgrade an existing installation of php-calendar. The calendar does not show any version, but it has been installed in 2010, so I guess it is version 1.1.

I installed the current version (2.0.12) as instructed, but on running the import from the old database I get this error message:

Error selecting events in import

SQL query: SELECT YEAR(`startdate`) as `year`, MONTH(`startdate`) as `month`, DAY(`startdate`) as `day`, YEAR(`enddate`) as `endyear`,MONTH(`enddate`) as `endmonth`, DAY(`enddate`) as `endday`,HOUR(`starttime`) as `hour`, MINUTE(`starttime`) as `minute`,`duration`, `eventtype`, `subject`, `description`,`username`, `password`
FROM `cal_events`
LEFT JOIN `cal_users` USING (`uid`)

Backtrace

#0 /mnt/web120/e2/56/51008256/htdocs/WordPress-WH3/kalender2/includes/import.php(73): PhpcDatabase->db_error('Error selecting...', 'SELECT YEAR(`st...')
#1 /mnt/web120/e2/56/51008256/htdocs/WordPress-WH3/kalender2/includes/calendar.php(847): import()
#2 /mnt/web120/e2/56/51008256/htdocs/WordPress-WH3/kalender2/includes/calendar.php(778): do_action()
#3 /mnt/web120/e2/56/51008256/htdocs/WordPress-WH3/kalender2/index.php(73): display_phpc()
#4 {main}

The prefix cal_ and the table names are correct.

Running the SQL query manually in PHPmyAdmin yields this error message:

unknown column 'uid' in from clause

MySQL server version is 5.6.42, if that's relevant.

sproctor commented 2 years ago

Sorry for the slow response here. It's been a really long time since I've worked with 2.x branch, and way too long since I worked with the 1.x branch. I hope you've figured out the issue. My guess is that you were on an older version than 1.1. Good luck.