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 » Thu Nov 21, 2013 11:55 am

Alec, I can not because the upgrade is being done by the interface...
Attachments
seer_tela_atualizacao.png
Screenupgrade
seer_tela_atualizacao.png (63.72 KiB) Viewed 980 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 asmecher » Thu Nov 21, 2013 12:14 pm

Hi madriano,

Hmm, taking a guess:

It looks like your database contains duplicate entries in the email_templates table. Run the following:
Code: Select all
SELECT * FROM email_templates ORDER BY email_key, assoc_type, assoc_id;
You'll find duplicate entries with the same values for email_key, email_type, and email_id. You'll need to delete the extra entries to ensure you only have one for each combination of email_key, assoc_type, and assoc_id.

I'm not sure why these extra entries exist; there may be other data problems.

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

Re: Problems with updating OJS from version 2.2.3 to 2.4.2

Postby madriano » Fri Nov 22, 2013 4:12 am

Hi Alec, I executed the sql bellow:

Code: Select all
SELECT email_key, assoc_type, assoc_id, count(*)
FROM email_templates
GROUP BY email_key, assoc_type, assoc_id
having count(*) > 1;


I had this return in the attached image... however, in the table exists a column "email_id", with a distinct value for each record... This should not be part of the unique key in the update?
Attachments
seer_retorno_sql_emailtemplates.jpg
SQL email_templates
seer_retorno_sql_emailtemplates.jpg (81.85 KiB) Viewed 957 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 asmecher » Fri Nov 22, 2013 10:41 am

Hi madriano,

Are you trying to run the install form over an existing database? Note that there's a separate "Upgrade" link on the form.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8445
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 Nov 25, 2013 1:30 pm

In this installer do not appears... only for upgrade of previous versions of 2.x in the top of form...
In the end of form the only button is "system install"...
My version of installer is the in Portuguese Brazilian idiom... can this be?
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 Nov 25, 2013 2:00 pm

Hi madriano,

Are you clicking the "Install" link, or the "Caso esteja atualizando uma versão 2.x anterior, clique aqui para continuar"?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8445
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 Nov 25, 2013 2:20 pm

Install link Alec...
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 Nov 25, 2013 2:49 pm

Hi madriano,

Use the "click here" upgrade link instead. (My apologies if we're going around in circles.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8445
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 Nov 25, 2013 3:17 pm

Hi Alec, I appreciate your help, without it would be zero even sure ...

But I'm not sure if we are talking the same link: is one of the screens below? I know that the screens printed are in Portuguese, but I think maybe the position of elements on the screen ...
Attachments
seer_Tela_2.png
Screen_upgrade_before_2x
seer_Tela_2.png (64.9 KiB) Viewed 892 times
seer_Tela_1.png
Screen_install_button_install
seer_Tela_1.png (41.15 KiB) Viewed 892 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 asmecher » Mon Nov 25, 2013 3:46 pm

Hi madriano,

Yes, that's what I'm talking about. Hitting the "Install" button attempts to install the system as though nothing already existed; instead, the upgrade link is intended to take an existing database and bring it up to the current requirements of the software. If you hit the "Install" button, it'll attempt to create data where data already exists, resulting in duplicate entry errors like you've posted above. The upgrade link will only attempt to add content that has been introduced since the last version you were using. What happens when you follow the upgrade link?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8445
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 Nov 26, 2013 5:31 am

Hi Alec.

Let´s go:

- the upgrade link (seer_Tela_1.png) refers to previous updates to the 2.x, but by trying it, accuses the same error.
Code: Select all
Ocorreram erros durante a instalação:

Ocorreu um erro de base de dados: 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.


- with the "install" button, the settings for connecting to the database, there is a checkbox "Create new database". If I´m not mistaken, the first test upgrade, I used that same form, not only marking this checkbox.

- I do not remember for sure, but I think before there was a button on the form installation "Upgrade" or "Manual installation" next to "install" button, not?

if there is no definition as to the error, I think maybe the solution is to delete the records from the table structures involved and insert them after the update... however, the difficulty is not sure what are the tables in the current structure (beyond "email_templates" table), and even less in the new structure...
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 Nov 26, 2013 9:00 am

Hi madriano,

The upgrade process itself shouldn't be trying to add those email templates again, but from this post it looks like there's already duplicate data in the database (probably from earlier failed upgrade attempts). For each of the duplicate templates listed there, remove one of them. The part of the upgrade process that's failing is the creation of a unique index, which will result in an error if there are any duplicate errors.

(FYI, if you encounter an error on upgrade, it means your database may be left in an intermediate state between the two versions; whenever that happens, it's best to restore your database from a backup made before the upgrade was executed, correct the issue that caused the failure, and continue from there.)

There was previously a "manual install" option, but some of the database entry process was moved to PHP rather than pure SQL, so we removed the manual install option.

The "create database" checkbox causes OJS to attempt to begin with an SQL "CREATE DATABASE" statement; regardless, the installation procedure is intended for execution only on an empty (or non-existent) database. Whenever you have a database with existing OJS tables, you must use the upgrade link instead.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8445
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 Dec 03, 2013 6:51 am

Hi Alec.

We proceed with the upgrade in production base with success (in part). But now, we have some doubts, below listed:

1) In upgrade, some files was altered
- dbscripts/xml/upgrade/2.4.0_preupdate_article_files.xml (included "<query>UPDATE article_files SET type = 1 WHERE type = 'submission/original'</query>")
- dbscripts/xml/upgrade.xml (commented lines "<code function="migrateReviewingInterests" />" and "<code function="migrateReviewingInterests2" />")
What is the influence on the updated base? Can I run sql procedures to correct the information on now?

2) Error message in attach.
Occurs when user access the page in review articles as Editor. And in the apache log error:
Code: Select all
[Tue Dec 03 15:12:29 2013] [error] [client x.x.x.x] ojs2: DB Error: ERROR:  column ea.user_id does not exist\nLINHA 37: ... 0 AND (a.status = 1 AND ea.edit_id IS NULL)  AND ea.user_id...\n                                                               ^, referer: http://revistas.unicentro.br/index.php/RECEN/editor
Attachments
erro.JPG
Editor error in article page
erro.JPG (143.58 KiB) Viewed 778 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 asmecher » Tue Dec 03, 2013 10:36 am

Hi madriano,

The error message you posted looks like #8154 in http://pkp.sfu.ca/wiki/index.php/OJS_2.4.2_Recommended_Patches; there's a patch at that URL you can use to correct it. (It's worth surveying the others; we'll be releasing OJS 2.4.3 very shortly, which will include this set of patches in addition to a few enhancements.)

The "migrate reviewing interests" functions change the way we were storing reviewer interests (which are available to users on their Profile form, and can be searched by Editors when looking for suitable reviewers). If you're using this data actively, it's worth migrating -- otherwise you can allow users to gradually fill it in themselves in case you find a use for it in the future. Off the top of my head you may find it difficult to perform this migration using pure SQL; it was implemented in PHP instead. You can see the implementation in classes/install/Upgrade.inc.php.

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

Previous

Return to OJS Technical Support

Who is online

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