OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Problems with updating OJS from version 2.2.3 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 with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Wed Jun 12, 2013 7:28 am

asmecher wrote:Hi madriano,

One additional note: I wonder if you're not running into http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8252.


Sorry Alec, I did not understand, how so?
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby asmecher » Fri Jun 14, 2013 3:10 pm

Hi madriano,

That was a note for myself as much as anything -- this may turn out to be a similar problem.

In any case, we need to determine what column contains an empty value where none is expected. I suspect it's the "type" column, which gets moved into the file_stage column during the upgrade. Could you try this on your original database?
Code: Select all
SELECT DISTINCT type FROM article_files;
...or, alternately, the following on the failed upgrade database...
Code: Select all
SELECT DISTINCT file_stage FROM article_files_tmp;
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9071
Joined: Wed Aug 10, 2005 12:56 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Mon Jun 17, 2013 4:58 am

Hi Alec, below the results:

asmecher wrote:
Code: Select all
SELECT DISTINCT type FROM article_files;



Code: Select all
"attachment"
"public"
"submission/copyedit"
"submission/editor"
"submission/layout"
"submission/original"
"submission/review"
"supp"
"temp"


asmecher wrote:
Code: Select all
SELECT DISTINCT file_stage FROM article_files_tmp;



With parcial upgrade (stopped in error message), show me the error:
Code: Select all
ERROR:  relation "article_files_tmp" does not exist

But, with the first sql, accused:
Code: Select all
ERROR:  column "type" does not exist
LINE 1: SELECT DISTINCT type FROM article_files;
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby asmecher » Mon Jun 17, 2013 11:28 am

Hi madriano,

Thanks for the information. Consider this an educated guess, but let's try the following. Edit dbscripts/xml/upgrade/2.4.0_preupdate_article_files.xml and find:
Code: Select all
        <!-- Bug #6128: Change paper_files 'type' column to 'file_stage' -->
        <sql>
                <!-- First, change all strings to their integer equivalents -->
                <query>UPDATE article_files SET type = 1 WHERE type = 'submission/original'</query><!-- ARTICLE_FILE_SUBMISSION -->
Just inside the <sql> node, add the following...
Code: Select all
                <query>DELETE FROM article_files WHERE type = 'temp'</query>
This will flush temporary files. I suspect these entries are the ones that are causing you upgrade problems, but please confirm. (Flushing temporary files like this won't lose you any important content -- they're just used while a user is in the process of uploading something.) Once you've made this change, attempt the upgrade process again from a copy of your pre-upgrade database.

Just checking, but those quotation marks in the set of values you reported above aren't included in the actual column values, are they?

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

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Mon Jun 17, 2013 1:16 pm

asmecher wrote:Hi madriano,

Thanks for the information. Consider this an educated guess, but let's try the following. Edit dbscripts/xml/upgrade/2.4.0_preupdate_article_files.xml and find:
Code: Select all
        <!-- Bug #6128: Change paper_files 'type' column to 'file_stage' -->
        <sql>
                <!-- First, change all strings to their integer equivalents -->
                <query>UPDATE article_files SET type = 1 WHERE type = 'submission/original'</query><!-- ARTICLE_FILE_SUBMISSION -->
Just inside the <sql> node, add the following...
Code: Select all
                <query>DELETE FROM article_files WHERE type = 'temp'</query>
This will flush temporary files. I suspect these entries are the ones that are causing you upgrade problems, but please confirm. (Flushing temporary files like this won't lose you any important content -- they're just used while a user is in the process of uploading something.) Once you've made this change, attempt the upgrade process again from a copy of your pre-upgrade database.


Hi Alec, may have advanced a little forward. The error now is related to postgres:
Code: Select all
Ocorreu um erro de base de dados: ERROR: index row size 3912 exceeds btree maximum, 2712 DICA: Values larger than 1/3 of a buffer page cannot be indexed. Consider a function index of an MD5 hash of the value, or use full text indexing.


I am researching the error, but it seems related to the data type of a field (maybe a parameter that can be changed in the database).

asmecher wrote:Just checking, but those quotation marks in the set of values you reported above aren't included in the actual column values, are they?


No, no, was because of the "Ctrl+C" and "Ctrl+V" of grid of the PgAdmin only.
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby asmecher » Mon Jun 17, 2013 2:05 pm

Hi madriano,

Great, that's definitely progress. Now I think you're hitting a different problem; have a look at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8248.

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

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Tue Jun 18, 2013 7:35 am

Hi Alec.

I applied the mentioned patch (0001-Fix-create-index-on-article_settings-table.patch), but occurs the same error. His suggestion is apply the patch or adapt it to "issue_settings_name_value" index, in indexes.xml (or other corresponding files)? If it´s to adapt, what would be the the parameter in clause "where" ( where setting_name != 'abstract';)?
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby asmecher » Tue Jun 18, 2013 11:51 am

Hi madriano,

We're still working on a fix over there, but if you remove the affected line entirely (i.e. the one the patch is modifying) you ought to be able to get through the upgrade -- unless I've misunderstood the cause here. Once we get a fix figured out there I can write up a SQL statement to create that specific index. (If you run without the index and you're using the specific PID tools that would use it, you'll see lower performance for certain queries; there are no other side-effects.)

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

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Thu Jun 20, 2013 5:46 am

Hi Alec.

I left commented then line in indexes.xml, but, appeared new error:

Code: Select all
(...)
-1: ERROR: duplicate key value violates unique constraint "c_v_e_s_pkey" DETALHE: Key (controlled_vocab_entry_id, locale, setting_name)=(1, , interest) already exists.
                                       ADOConnection._Execute(INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, setting_name, setting_value, setting_type) VALUES (?, ?,..., Array[4]) % line  860, file: adodb.inc.php
                                    ADOConnection.Execute(INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, setting_name, setting_value, setting_type) VALUES (?, ?,..., Array[4]) % line  225, file: DAO.inc.php
                                 DAO.update(INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, setting_name, setting_value, setting_type) VALUES (?, ?,..., Array[4]) % line  756, file: Upgrade.inc.php
                              Upgrade.migrateReviewingInterests(Object:Upgrade, Array[1]) % line    0, file:
                           call_user_func(Array[2], Object:Upgrade, Array[1]) % line  418, file: Installer.inc.php
DB Error: ERROR: duplicate key value violates unique constraint "c_v_e_s_pkey" DETALHE: Key (controlled_vocab_entry_id, locale, setting_name)=(1, , interest) already exists.

Stack Trace:

File: /var/www/revistas2/classes/install/Upgrade.inc.php line 756
Function: DAO->update("INSERT INTO controlled_vocab_entry_settings (controlled_vocab_en...", Array(4))

File: (unknown) line (unknown)
Function: Upgrade->migrateReviewingInterests(Object(Upgrade), Array(1))

File: /var/www/revistas2/lib/pkp/classes/install/Installer.inc.php line 418
Function: call_user_func(Array(2), Object(Upgrade), Array(1))

File: /var/www/revistas2/lib/pkp/classes/install/Installer.inc.php line 268
Function: Installer->executeAction(Array(3))

File: /var/www/revistas2/lib/pkp/classes/install/Installer.inc.php line 189
Function: Installer->executeInstaller()

File: /var/www/revistas2/classes/install/form/UpgradeForm.inc.php line 49
Function: Installer->execute()

File: /var/www/revistas2/lib/pkp/pages/install/PKPInstallHandler.inc.php line 113
Function: UpgradeForm->execute()

File: (unknown) line (unknown)
Function: PKPInstallHandler->installUpgrade(Array(0), Object(Request))

File: /var/www/revistas2/lib/pkp/classes/core/PKPRouter.inc.php line 370
Function: call_user_func(Array(2), Array(0), Object(Request))

File: /var/www/revistas2/lib/pkp/classes/core/PKPPageRouter.inc.php line 266
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)

File: /var/www/revistas2/lib/pkp/classes/core/Dispatcher.inc.php line 133
Function: PKPPageRouter->route(Object(Request))

File: /var/www/revistas2/lib/pkp/classes/core/PKPApplication.inc.php line 189
Function: Dispatcher->dispatch(Object(Request))

File: /var/www/revistas2/index.php line 63
Function: PKPApplication->execute()
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby asmecher » Thu Jun 20, 2013 10:11 am

Hi madriano,

You are hitting every pothole in the road! :) See http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=10065&start=15#p39197

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

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Thu Jun 20, 2013 1:07 pm

Great Alec! Finally the installation was successful. Now we will test before migrating to the production version.

Thank you for your help so far, that, surely, was essential. :D
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby andjsmit » Thu Jun 27, 2013 7:08 am

I ran into this same error (INSERT INTO article_files...) today when trying to upgrade from 2.3.8 -> 2.4.2. We are using Postgres 9.0.2. Were you ever successful in running the upgrade?
andjsmit
 
Posts: 8
Joined: Tue Apr 09, 2013 6:11 am

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Thu Jun 27, 2013 7:34 am

Hi andjsmit.

In this specific case, was identified the type "temp" in article_files, it was not necessary (select distinct type from article_files). Then, in dbscripts/xml/upgrade/2.4.0_preupdate_article_files.xml file (version 2.4.2 files), in block
Code: Select all
...
<query>UPDATE article_files SET type = 1 WHERE type = 'submission/original'</query>
...


was add (in the end of block):
Code: Select all
<query>DELETE FROM article_files WHERE type = 'temp'</query>


The changed file is attach...
Attachments
2.4.0_preupdate_article_files.xml
Changed file of version 2.4.2
(1.63 KiB) Downloaded 57 times
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Thu Nov 21, 2013 10:41 am

Hi, I need help again!

In the new test of migration, occurs the error:

Code: Select all
 ERROR: could not create unique index "email_templates_email_key" DETALHE: Key (email_key, assoc_type, assoc_id)=(REVIEW_REMIND_AUTO_ONECLICK, 0, 0) is duplicated.
madriano
 
Posts: 52
Joined: Wed Nov 25, 2009 12:23 pm

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby asmecher » Thu Nov 21, 2013 11:10 am

Hi madriano,

Can you include the full upgrade output?

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

PreviousNext

Return to OJS Technical Support

Who is online

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