I just installed today's (April 23) devs of Date and Calendar (on a test site that had already been upgraded from D6 to D7 and had latest CTools, Views devs also), emptied cache, and ran update. Update found one pending update:
date_api module
7000 - Move old date format data to new date format tables.
I tried to run this update twice and both times it failed with this error messages:
The following updates returned messages
date_api module
Update #7000
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'time' for key 'PRIMARY': INSERT INTO {date_format_type} (type, title, locked) SELECT old.type AS type, old.title AS title, old.locked AS locked FROM {date_format_types} old WHERE (locked = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 0 ) in date_api_update_7000() (line 89 of /Users/cpelham/Dropbox/Sites/acquia-drupal/sites/all/modules/date/date_api/date_api.install).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 353 of /Users/cpelham/Dropbox/Sites/acquia-drupal/modules/field/field.info.inc).
Notice: Undefined index: content_profile_rel in view->fix_missing_relationships() (line 382 of /Users/cpelham/Dropbox/Sites/acquia-drupal/sites/all/modules/views/includes/view.inc).
Notice: Undefined index: comments in views_handler_field_field->access() (line 73 of /Users/cpelham/Dropbox/Sites/acquia-drupal/sites/all/modules/views/modules/field/views_handler_field_field.inc).
Notice: Object of class stdClass could not be converted to int in _menu_router_build() (line 3464 of /Users/cpelham/Dropbox/Sites/acquia-drupal/includes/menu.inc).
Comments
Comment #1
karens commentedThat says those values already existed. Had you already added custom values to your formats before you ran the update?
The update ran fine for me, I didn't get any errors at all.
Comment #2
karens commentedComment #3
cpelham commentedI already had made a format to show the time only (without the date). Is that what you mean? Should I just delete that and try running the update again? Would deleting the format delete the associated table, or would I also need to delete a table from the database?
Can the update not be written such that it checks to see if new formats already exist? Surely, I'm not the only one who might have created a format?
Comment #4
cpelham commentedI found that if I delete my time format from the database table, then the update succeeds, but that is not a very elegant solution.
Comment #5
karens commentedI guess the update will have to be rewritten, but this makes it messy and I don't have time right now.
Comment #6
Jerome F commentedWhitin the 4 notices pasted here, I've experienced the 3rd:
Notice: Undefined index: users in views_handler_field_field->access() (line 73 of sites/all/modules/views/modules/field/views_handler_field_field.inc).It's not a date module issue. This notice happens when you have 2 views sharing the same page (URL), apparently. Personally, I had to delete a view to get rid of this notice.
The 4th notice is an issue with nodequeue module discussed here: http://drupal.org/node/972536
Comment #7
karens commentedI've rewritten this to iterate over each old value and only create a new entry if something with that name doesn't already exist. It works for me, would be nice to have others test it.
The SQL error is what this is fixing. The notices have nothing to do with the Date module.