OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Problems trying to upgrade OJS 2.2.4 to 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.

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Thu Jun 06, 2013 7:55 am

Hi Alec,
No there aren't. Here are the tables of my database backup in OJS 2.2.4:
    access_keys
    announcements
    announcement_settings
    announcement_types
    announcement_type_settings
    articles
    article_authors
    article_author_settings
    article_comments
    article_email_log
    article_event_log
    article_files
    article_galleys
    article_html_galley_images
    article_notes
    article_search_keyword_list
    article_search_objects
    article_search_object_keywords
    article_settings
    article_supplementary_files
    article_supp_file_settings
    article_xml_galleys
    auth_sources
    captchas
    comments
    completed_payments
    copyed_assignments
    counter_monthly_log
    custom_issue_orders
    custom_section_orders
    edit_assignments
    edit_decisions
    email_templates
    email_templates_data
    email_templates_default
    email_templates_default_data
    external_feeds
    external_feed_settings
    groups
    group_memberships
    group_settings
    issues
    issue_settings
    journals
    journal_settings
    layouted_assignments
    notification_status
    oai_resumption_tokens
    paypal_transactions
    plugin_settings
    proof_assignments
    published_articles
    queued_payments
    review_assignments
    review_forms
    review_form_elements
    review_form_element_settings
    review_form_responses
    review_form_settings
    review_rounds
    roles
    rt_contexts
    rt_searches
    rt_versions
    scheduled_tasks
    sections
    section_editors
    section_settings
    sessions
    site
    site_settings
    subscriptions
    subscription_ip
    subscription_types
    subscription_type_settings
    temporary_files
    theses
    users
    user_settings
    versions

It may be a good idea to try to upgrade step by step. Do you know where can I find the patches to upgrade to one or two intermediate versions...? i.e. 2.2.4 to 2.3.2 and then I could use the existing 2.3.2 to 2.4.2 patch. In dowloads section I only see patches to upgrade from your whichever current version to 2.4.2...
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Thu Jun 06, 2013 9:22 am

Hi Daniel,

I doubt that'll help; you're likely to encounter the same message at some intermediate step. This is likely to be a fairly easy problem to solve once we can track it down.

Forgive my persistence, but when you restore your database, do you import the backup SQL into an existing DB, or do you drop it and re-create it entirely?

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Thu Jun 06, 2013 10:50 am

Sorry Alec,
I tried again with a new database and with a new database name and again the same error. After a few minutes working it stops and prints: ojs2: DB Error: Duplicate entry 'interest-4096-514' for key 'controlled_vocab_symbolic'

:cry:
Regards,
Daniel
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Thu Jun 06, 2013 11:05 am

Hi Daniel,

OK, we're making progress, believe it or not.

The problem lies in the migration of the "reviewer interests" data. If that data is not important to you, there's an easy work-around to stop it from being included in the migration: comment out the following lines in dbscripts/xml/upgrade before running the upgrade.
Code: Select all
<code function="migrateReviewingInterests" />
...and...
Code: Select all
<code function="migrateReviewingInterests2" />

Alternately, if that's important data and you want to keep it: the specific problem you're running into, judging by the messages above, is in the first of the two migration processes. That code is implemented in classes/install/Upgrade.inc.php in the migrateReviewingInterests function. Looking at that code, I can identify a few cases where a data inconsistency in your old installation might cause the migration process to break.

Try running the following query:
Code: Select all
SELECT user_id FROM user_settings WHERE setting_name = 'interests' GROUP BY user_id, setting_name HAVING count(*) > 1;
This will identify any cases where users somehow have two sets of interests stored in the database, which should not be the case. If you see any entries listed, use the following query to identify the problem rows using the user IDs from the first query (e.g. 123 in this example):
Code: Select all
SELECT * FROM user_settings WHERE setting_name = 'interests' AND user_id = 123;
All but one of the rows listed will need to be removed, for each user account.

If I'm barking up the wrong tree, we'll know because the first query listed will come back empty. If that's the case, let me know and I'll try another approach.

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Thu Jun 06, 2013 12:17 pm

Wow Alec,
YOU HAVE NAILED IT!!

Current Version
2.4.2.0 (junio 6, 2013 - 09:07 PM)
:D :D :D :D :D
Thank you very much for your awesome help.
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby asmecher » Thu Jun 06, 2013 12:47 pm

Hi Daniel,

Great, glad to hear it! Just for the sake of anyone else following this trail: did the problem turn out to be duplicate rows, or did you skip the user interest migration process?

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

Re: Problems trying to upgrade OJS 2.2.4 to 2.4.2

Postby Celuloide » Thu Jun 06, 2013 1:22 pm

Yes, I took the difficult way... Run the query in PHPMyAdmin to find out the users that had duplicate their interests and it printed 5 user ids. Then, I run the other query for that user ids and found out they had two rows with their interests in es-ES and another language, so I dropped the second row leaving only the es-ES et voilà!

Thank you, truly, it has been a hard battle to get it!

Regards,
Daniel
Celuloide
 
Posts: 30
Joined: Tue Feb 07, 2012 7:31 am

Previous

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], marchitelli, Yahoo [Bot] and 6 guests