OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



failed upgrade 2.0.1 to 2.1.1

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.

failed upgrade 2.0.1 to 2.1.1

Postby rthomas » Mon Oct 02, 2006 3:32 pm

Environment: OS X 10.3 (php5, mysql 4.13, apache 1.3.3)

I upgraded from 201 to 211 today and ran into some trouble. The upgrade script returned errors on the database upgrade so I had v211 code & v201 dbase. So I ran the manual upgrade SQL and received only the "duplicate record" errors below. My site seems to be running fine. But I'm a little nervous.

I'm thinking the records were updated from an earlier, failed upgrade attempt, and that's why I'm getting these errors...but I'm looking for confirmation from someone who can tell me with some authority...or how to verify. Is my site upgraded, or do I need to address these errors?

[MySQL 17:12:23] INSERT INTO email_templates_default (email_key, can_edit, can_disable, to_role_id) VALUES ('OPEN_ACCESS_NOTIFY', 1, 0, 1048576)
[ERROR 17:12:23] Duplicate entry 'OPEN_ACCESS_NOTIFY' for key 2
[MySQL 17:12:23] INSERT INTO email_templates_default (email_key, can_edit, can_disable, to_role_id) VALUES ('SUBSCRIPTION_BEFORE_EXPIRY', 1, 0, 1048576)
[ERROR 17:12:23] Duplicate entry 'SUBSCRIPTION_BEFORE_EXPIRY' for key 2
[MySQL 17:12:23] INSERT INTO email_templates_default (email_key, can_edit, can_disable, to_role_id) VALUES ('SUBSCRIPTION_AFTER_EXPIRY', 1, 0, 1048576)
[ERROR 17:12:23] Duplicate entry 'SUBSCRIPTION_AFTER_EXPIRY' for key 2
[MySQL 17:12:23] INSERT INTO email_templates_default (email_key, can_edit, can_disable, to_role_id) VALUES ('SUBSCRIPTION_AFTER_EXPIRY_LAST', 1, 0, 1048576)
[ERROR 17:12:23] Duplicate entry 'SUBSCRIPTION_AFTER_EXPIRY_LAST' for key 2
[MySQL 17:12:23] INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'OPEN_ACCESS_NOTIFY', 'Issue Now Open Access', 'Readers:

{$journalName} has just made available in an open access format the following issue. We invite you to review the Table of Contents here and then visit our web site ({$journalUrl}) to review articles and items of interest.

Thanks for the continuing interest in our work,
{$editorialContactSignature}', 'This email is sent to registered readers who have requested to receive a notification email when an issue becomes open access.')
[ERROR 17:12:23] Duplicate entry 'OPEN_ACCESS_NOTIFY-en_US' for key 1
[MySQL 17:12:23] INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'SUBSCRIPTION_BEFORE_EXPIRY', 'Notice of Subscription Expiry', '{$subscriberName}:

Your {$journalName} subscription is about to expire.

{$subscriptionType}
Expiry date: {$expiryDate}

To ensure the continuity of your access to this journal, please go to the journal website and renew your subscription. You are able to log in to the system with your username, "{$username}".

If you have any questions, please feel free to contact me.

{$subscriptionContactSignature}', 'This email notifies a subscriber that their subscription will soon expire. It provides the journal\'s URL along with instructions for access.')
[ERROR 17:12:23] Duplicate entry 'SUBSCRIPTION_BEFORE_EXPIRY-en_US' for key 1
[MySQL 17:12:23] INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'SUBSCRIPTION_AFTER_EXPIRY', 'Subscription Expired', '{$subscriberName}:

Your {$journalName} subscription has expired.

{$subscriptionType}
Expiry date: {$expiryDate}

To renew your subscription, please go to the journal website. You are able to log in to the system with your username, "{$username}".

If you have any questions, please feel free to contact me.

{$subscriptionContactSignature}', 'This email notifies a subscriber that their subscription has expired. It provides the journal\'s URL along with instructions for access.')
[ERROR 17:12:23] Duplicate entry 'SUBSCRIPTION_AFTER_EXPIRY-en_US' for key 1
[MySQL 17:12:23] INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'SUBSCRIPTION_AFTER_EXPIRY_LAST', 'Subscription Expired - Final Reminder', '{$subscriberName}:

Your {$journalName} subscription has expired.
Please note that this is the final reminder that will be emailed to you.

{$subscriptionType}
Expiry date: {$expiryDate}

To renew your subscription, please go to the journal website. You are able to log in to the system with your username, "{$username}".

If you have any questions, please feel free to contact me.

{$subscriptionContactSignature}', 'This email notifies a subscriber that their subscription has expired. It provides the journal\'s URL along with instructions for access.')
[ERROR 17:12:23] Duplicate entry 'SUBSCRIPTION_AFTER_EXPIRY_LAST-en_US' for key 1
[MySQL 17:12:23] INSERT INTO email_templates_default (email_key, can_edit, can_disable, to_role_id, from_role_id) VALUES ('REVIEW_CONFIRM_ACK', 1, 1, 4096, 512)
[ERROR 17:12:23] Duplicate entry 'REVIEW_CONFIRM_ACK' for key 2
[MySQL 17:12:23] INSERT INTO email_templates_default_data (locale, email_key, subject, body, description) VALUES ('en_US', 'REVIEW_CONFIRM_ACK', 'Review Underway Acknowledgement', '{$reviewerName}:

Thank you for agreeing to review the manuscript "{$articleTitle}" for {$journalName} by {$reviewDueDate}.

{$editorialContactSignature}', 'This email is sent from the Section Editor to the Reviewer to acknowledge their acceptance of a review or encourage them to complete the review.')
[ERROR 17:12:23] Duplicate entry 'REVIEW_CONFIRM_ACK-en_US' for key 1
[MySQL 17:12:23] INSERT INTO scheduled_tasks (class_name) VALUES ('tasks.SubscriptionExpiryReminder')
[ERROR 17:12:23] Duplicate entry 'tasks.SubscriptionExpiryReminder' for key 1
[MySQL 17:12:23] INSERT INTO scheduled_tasks (class_name) VALUES ('tasks.OpenAccessNotification')
[ERROR 17:12:23] Duplicate entry 'tasks.OpenAccessNotification' for key 1
rthomas
 
Posts: 14
Joined: Thu May 26, 2005 9:15 am

Postby asmecher » Wed Oct 04, 2006 3:49 am

Hi rthomas,

Your diagnosis is correct -- your first upgrade attempt failed part-way through, and so attempting to run the upgrade again causes problems. You may be able to correct this by doing a manual upgrade (e.g. extracting the SQL statements and running them yourself), stripping out the email insert statements that caused the error messages you quote here; however, I'm curious about what caused the problem in the first place. Do you have the original database error messages you encountered?

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9099
Joined: Wed Aug 10, 2005 12:56 pm

Postby rthomas » Wed Oct 04, 2006 10:55 am

Thanks, Alec. I did extract the SQL statements and ran them manually. The only errors were the ones I posted above.

Based on the above error messages, do I still need to do something?

No, I'm afraid I don't have the original database errors. The first upgrade attempt was executed through the command line feature that downloads and upgrades. (tools/upgrade.php) The error I got at the end and on subsequent attempts was...
"Error: failed to apply patch"

asmecher wrote:Hi rthomas,
Your diagnosis is correct -- your first upgrade attempt failed part-way through, and so attempting to run the upgrade again causes problems. You may be able to correct this by doing a manual upgrade (e.g. extracting the SQL statements and running them yourself), stripping out the email insert statements that caused the error messages you quote here; however, I'm curious about what caused the problem in the first place. Do you have the original database error messages you encountered?

Regards,
Alec Smecher
Open Journal Systems Team
rthomas
 
Posts: 14
Joined: Thu May 26, 2005 9:15 am

Postby asmecher » Fri Oct 06, 2006 1:08 am

Hi rthomas,

Use the Site Administrator's "System Information" page to determine what version of database OJS thinks it's using; if the version number matches the upgrade, you should be fine.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9099
Joined: Wed Aug 10, 2005 12:56 pm

Postby rthomas » Tue Oct 10, 2006 9:46 am

Below is what I see in "System Information": It's a bit confusing (it is indicating v2.1.0.1 but says I installed 2.1.1.0 on 10/2). So it looks like I am still running at v2.1.0.1. (Argh!) I ran the 2.1.1 upgrade SQL manually and got only the errors I quoted above. What do I need to do?

System Information
OJS Version
Current version
2.1.0.1 (February 24, 2006 - 03:43 PM)

Version history
Version Major Minor Revision Build Date installed
2.1.1.0 2 1 1 0 2006-10-02
2.1.0.1 2 1 0 1 2006-02-24
2.0.0.0 2 0 0 0 2005-07-06

asmecher wrote:Hi rthomas,

Use the Site Administrator's "System Information" page to determine what version of database OJS thinks it's using; if the version number matches the upgrade, you should be fine.

Regards,
Alec Smecher
Open Journal Systems Team
rthomas
 
Posts: 14
Joined: Thu May 26, 2005 9:15 am

Postby asmecher » Tue Oct 10, 2006 11:52 am

Hi rthomas,

Check to see if a row exists in the scheduled_tasks table with a class_name of tasks.OpenAccessNotification; this is one of the last things the upgrade does (see dbscripts/xml/upgrade/2.1.1_upgrade.xml). If this is in place, manually upgrade the versions in the "versions" table by inserting a new row for version 2.1.1-0 and setting its "current" value to 1 instead of the old version.

I'm still at a loss for why the manual upgrade failed in the first place unless it was run twice... if you scare up any more information, please post it here.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9099
Joined: Wed Aug 10, 2005 12:56 pm

Postby rthomas » Thu Oct 12, 2006 1:44 pm

Interesting. The 2.1.1.0 version row existed and had a "current" value of 1. But so did the row with 2.1.0.1. I changed the "current" value for 2.1.0.1 to 0. Now the System Information page shows everything at 2.1.1.

So, I think I'm hearing from you that the upgrade was successful.

Can you please confirm, however, that I don't need to do anything about the error messages I quoted in my first post (above)?
rthomas
 
Posts: 14
Joined: Thu May 26, 2005 9:15 am

Postby asmecher » Fri Oct 13, 2006 1:31 am

Hi rthomas,

Those messages are duplicate inserts, meaning that the rows in question already existed; you should be ready to go with the new version. Just in case, I'd suggest making sure that php's display_errors directive is set to E_ALL in php.ini -- this will ensure that any errors are displayed, in case something went wrong during the upgrade.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 9099
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