Upgrade failed 2.4.7-1/2.4.8-1 --> 3.0.0

PHP 5.6 + MySQL 5.7

Running the upgrade script “php tools/upgrade.php upgrade”, got this error,
[pre-install]
[load: upgrade.xml]
[version: 3.0.0.0]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type_metrics.xml]
[data: dbscripts/xml/upgrade/3.0.0_settings.xml]

[code: Installer Installer::migrateArticleMetadata]
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs3/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs3/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
[data: dbscripts/xml/upgrade/3.0.0_update.xml]
ERROR: Upgrade failed: DB: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_published’ at row 1

Hi @anuchit,

I see that this issue has also recently been filed at Incorrect datetime value · Issue #1788 · pkp/pkp-lib · GitHub – could you follow up there?

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher,

Thank you. Incorrect datetime value · Issue #1788 · pkp/pkp-lib · GitHub, fixed this case.

Here is log of upgrading from 2.4.7-1

[code]
php tools/upgrade.php upgrade
[pre-install]
[load: upgrade.xml]
[version: 3.0.0.0]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type_metrics.xml]
[data: dbscripts/xml/upgrade/3.0.0_settings.xml]

[code: Installer Installer::migrateArticleMetadata]
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
[data: dbscripts/xml/upgrade/3.0.0_update.xml]

[code: Installer Installer::clearDataCache]

[code: Installer Installer::migrateUserRoles]
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::installDefaultGenres]
[data: dbscripts/xml/upgrade/remove_timed_views_bots.xml (skipped)]

[code: Installer Installer::migrateCounterPluginUsageStatistics (skipped)]

[code: Installer Installer::migrateTimedViewsUsageStatistics (skipped)]

[code: Installer Installer::migrateDefaultUsageStatistics (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration2.xml]
[data: dbscripts/xml/upgrade/2.4.0_postCounterMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postTimedViewsMigration.xml (skipped)]

[code: Installer Installer::fixReviewForms]

[code: Installer Installer::htmlifyEmailTemplates]
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
[note: docs/release-notes/README-BEACON]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]
[data: dbscripts/xml/upgrade/3.0.0_scheduledTasks.xml]

[code: Installer Installer::localizeCustomBlockSettings]
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::convertEditorDecisionNotes]

[code: Installer Installer::convertQueries]

[code: Installer Installer::migrateFiles]
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::convertSupplementaryFiles]
PHP Warning: Cannot use a scalar value as an array in /srv/www/html/ojs-3.0.0/lib/pkp/classes/core/DataObject.inc.php on line 133
[data: dbscripts/xml/upgrade/3.0.0_postupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_pubId_settings.xml]

[post-install]

Release Notes
----------------------------------------
This software will optionally provide PKP with a unique identifier for the
installation and the OAI base URL. These are to be used for statistics and
security alert purposes only.

This feature is optional. If you do not wish to participate, you may either
uncheck the "beacon" option in the installation form, or for existing installs,
edit your config.inc.php configuration file and set "enable_beacon" to Off.


Successfully upgraded to version 3.0.0.0

Hi @anuchit,

Can you describe what you changed in order to get the upgrade working?

Regards,
Alec Smecher
Public Knowledge Project Team

As @klausru suggested in Incorrect datetime value · Issue #1788 · pkp/pkp-lib · GitHub,
I changed the date format to 2001-01-01.

Hi @anuchit,

I don’t think he was suggesting that as a concrete solution – but in any case, there’s a patch to resolve the issue as mentioned in this comment. Unless you actually had content published at 2001-01-01, you’re likely OK to go ahead as you are.

Regards,
Alec Smecher
Public Knowledge Project Team