OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Upgrade fails 2.3.8 -> 2.4.2

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Upgrade fails 2.3.8 -> 2.4.2

Postby andjsmit » Wed Oct 23, 2013 9:05 am

While attempting to upgrade from 2.3.8 to 2.4.2, the upgrade script fails with the following error:

ERROR: Upgrade failed: DB: ERROR: invalid input syntax for type numeric: " "

Database Version: PostgreSQL 9.0.2

Recommended Bug Patches #8247, #8252, and #8338 have been applied

After turning on debug, the script ends with:
-----------------------------------------------------
(postgres7): INSERT INTO article_files (file_id, revision, source_file_id, source_revision, article_id, file_name, file_type, file_size, original_file_name, file_stage, viewable, date_uploaded, date_modified, round, assoc_id) SELECT file_id, revision, source_file_id, source_revision, article_id, file_name, file_type, file_size, original_file_name, to_number(file_stage,'S9999999999999D99'), viewable, date_uploaded, date_modified, round, assoc_id FROM article_files_tmp
-----
ojs2 has produced an error
Message: WARNING: pg_query(): Query failed: ERROR: invalid input syntax for type numeric: " "
In file: {removed}/lib/pkp/lib/adodb/drivers/adodb-postgres7.inc.php
At line: 123
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.3.3
Apache Version: N/A
DB Driver: postgres
DB server version: PostgreSQL 9.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 32-bit -1: ERROR: invalid input syntax for type numeric: " "

ADOConnection._Execute(INSERT INTO article_files (file_id, revision, source_file_id, source_revision, article_id, file_name, file_type, file_size, orig..., false)% line 864, file:{removed}/lib/pkp/lib/adodb/adodb.inc.php
ADOConnection.Execute(INSERT INTO article_files (file_id, revision, source_file_id, source_revision, article_id, file_name, file_type, file_size, orig...)% line 443, file: {removed}/lib/pkp/classes/install/Installer.inc.php
Installer.executeSQL(INSERT INTO article_files (file_id, revision, source_file_id, source_revision, article_id, file_name, file_type, file_size, orig...)% line 438, file: {removed}/lib/pkp/classes/install/Installer.inc.php
Installer.executeSQL(Array[401])% line 378, file: {removed}/lib/pkp/classes/install/Installer.inc.php
Installer.executeAction(Array[3])% line 268, file: {removed}/lib/pkp/classes/install/Installer.inc.php
ERROR: Upgrade failed: DB: ERROR: invalid input syntax for type numeric: " "

Any help would be greatly appreciated.
andjsmit
 
Posts: 8
Joined: Tue Apr 09, 2013 6:11 am

Re: Upgrade fails 2.3.8 -> 2.4.2

Postby asmecher » Wed Oct 23, 2013 9:18 am

Hi andjsmit,

I suspect this is bug #8264, also on the recommended patches list.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Re: Upgrade fails 2.3.8 -> 2.4.2

Postby andjsmit » Wed Oct 23, 2013 12:48 pm

Thanks. That worked and the upgrade script completed without error.

However, the system does not appear to recognize that it has been upgraded. In the HTML code and on the admin information page the system indicates it is still at 2.3.8.0. Checking the database, the last row of the versions table is :

2 | 3 | 8 | 0 | 2013-01-16 08:18:49 |1| core| ojs2| |0 |1

There is no row for 2.4.2.0

The first thing I did notice, though, is that the admin pages now have a message letting me know that an upgrade is available. This warning message is not present in the current live production site @ 2.3.8

I did clear out the data and template cache with no effect.
andjsmit
 
Posts: 8
Joined: Tue Apr 09, 2013 6:11 am

Re: Upgrade fails 2.3.8 -> 2.4.2

Postby andjsmit » Wed Oct 23, 2013 1:50 pm

Quick follow up:

The problem occurred again when running the update script with a fresh copy of our current database. No error were indicated during the update process. Both before and after the upgrade script was run an upgrade check showed the following:

$ sudo php tools/upgrade.php check
Code version: 2.4.2.0
Database version: 2.3.8.0
Latest version: 2.4.2.0
Database version is older than code version
Run "tools/upgrade.php upgrade" to update

Thanks,
Andy
andjsmit
 
Posts: 8
Joined: Tue Apr 09, 2013 6:11 am

Re: Upgrade fails 2.3.8 -> 2.4.2

Postby asmecher » Wed Oct 23, 2013 4:28 pm

Hi Andy,

If the upgrade completes successfully, you should receive an explicit message stating so; if your version is reported afterwards unchanged, something must have failed during the upgrade process. Generally an error is reported on the command line, but it's possible that your PHP installation is configured not to display errors there. Check your PHP configuration to make sure. (There may be a different configuration file for the CLI PHP client vs. the one attached to the web server; run "php -i" to view your CLI PHP configuration, including the location of the configuration file.) Off the top of my head, you may have run into a PHP out-of-memory problem; try patching https://github.com/pkp/pkp-lib/commit/cc4be218320d7cf4480a3dc1b15a54b29d3e5a6e.diff (ignoring the parts of the patch that pertain to files in test/, which are not shipped with the distribution.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Re: Upgrade fails 2.3.8 -> 2.4.2

Postby andjsmit » Thu Oct 24, 2013 6:10 am

Hi Alec,

Error reporting is on in my configuration and I checked the error log during an upgrade attempt this morning. Still nothing being reported. However, I am not receiving any message telling me the upgrade is completed either. Here is the full display:

[pre-install]
[load: upgrade.xml]
[version: 2.4.2.0]
[schema: lib/pkp/xml/schema/signoff.xml]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_article_files.xml]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_emaillog.xml]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_reviewrounds.xml]
[data: dbscripts/xml/upgrade/2.4.0_idupgrade_issues.xml]
[data: dbscripts/xml/upgrade/2.4.0_idupgrade_articles.xml]
[data: dbscripts/xml/upgrade/2.4.0_idupgrade_published_articles.xml]
[data: dbscripts/xml/upgrade/2.4.0_idupgrade_issue_galleys.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_idupgrade_article_galleys.xml]
[data: dbscripts/xml/upgrade/2.4.0_idupgrade_supp_files.xml]
[data: dbscripts/xml/upgrade/2.4.0_notifications.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/groups.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/comments.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::installEmailTemplate]
[data: dbscripts/xml/upgrade/2.4.0_idupgrade_article_galleys2.xml]
[data: lib/pkp/xml/mutexData.xml]
[data: dbscripts/xml/upgrade/2.4.0_update.xml]
[note: docs/release-notes/README-2.4.0]
[code: Installer Installer::migrateNotifications]

I am going to apply the patch you sent above and try again.

Thanks,
Andy
andjsmit
 
Posts: 8
Joined: Tue Apr 09, 2013 6:11 am

Re: Upgrade fails 2.3.8 -> 2.4.2

Postby andjsmit » Thu Oct 24, 2013 7:37 am

Alec,

Big Thanks!

After apply the patch, the upgrade completed.

Code: Select all
Successfully upgraded to version 2.4.2.0


One last question: With all the bug patches and this latest patch that have been applied to my application, how does this affect future upgrades? (ie 2.4.3) Should I expect a lot of failed chunks when appling the next version patch?

Thanks,
Andy
andjsmit
 
Posts: 8
Joined: Tue Apr 09, 2013 6:11 am

Re: Upgrade fails 2.3.8 -> 2.4.2

Postby asmecher » Thu Oct 24, 2013 9:02 am

Hi Andy,

OJS 2.4.3 will largely consist of OJS 2.4.2 plus the set of recommended patches, plus a few new pieces like a statistics rewrite and some improvements to searching, indexing, etc. If you haven't made modifications, you can follow the full package upgrade procedure outlined in docs/UPGRADE. If you want to use the patch upgrade method, and you've applied several patches that are already included in OJS 2.4.3, you'll be warned during patch application that a piece appears to have already been applied and asked if you want to ignore it.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests