Error during OJS upgrading from 2.4.5.0 to 3.0

Hello Everybody, I am trying to upgrade ojs 2.4.5 to 3.0 but has two problem.
First one:
[data: dbscripts/xml/upgrade/3.0.0_update.xml]PHP Strict Standards:
Only variables should be assigned by reference in /var/www/submission_scielo_br/lib/pkp/classes/db/DBDataXMLParser.inc.php on line 54
ERROR: Upgrade failed: DB: Duplicate entry ‘65003-3-1’ for key ‘review_rounds_submission_id_stage_id_round_pkey’

To solve this problem or to move on I restored the database and deleted all duplicated entry. After that I executed again the command to upgrade.

This second attempt many warning showed and finished with this warn/error:
PHP Warning: assert(): Assertion failed in /var/www/submission_scielo_br/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 132
PHP Warning: assert(): Assertion failed in /var/www/submission_scielo_br/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 380

There are no readable files in this directory tree. Are safe mode or open_basedir active?

ojs2: There are no readable files in this directory tree. Are safe mode or open_basedir active?

I tried to open the site and the page came in blank and I got in apache log the follow error:
PHP Strict Standards: Only variables should be passed by reference in /var/www/submission_scielo_br/lib/pkp/classes/core/PKPApplication.inc.php on line 210
PHP Fatal error: Call to a member function getUserVar() on a non-object in /var/www/submission_scielo_br/classes/i18n/AppLocale.inc.php on line 75

Someone could help me?
Best Regards,

Hi @Rondineli_Gama_Saad

Take a look:

Probably you have articles with null section id.

Regards,
Tarcisio Pereira.

Hi Tarcisio,
First of all, thanks for your answer!
I search for a answer in OJS Upgrade failed 2.4.8-1 to 3.0.0 - #10 by tiyok but what James suggested I don’t know how to apply. In my database there are some section_id with NULL value, but I don’t know which relationship the section_id has with other fields to change to a valid value.
Best Regards,

Hi @Rondineli_Gama_Saad

Try this select:

select concat('http://www.mydomain.com/', j.path, '/editor/submission/', a.article_id) as link
from articles a
join journals j on (a.journal_id = j.journal_id)
where section_id is null; 

You can use the result set to view, access and set a section to each article.

Regards,
Tarcisio Pereira.

Hello Tarcisio,
I changed all section_id to a valid section. Using the follow command:
update articles SET section_id=1552 where section_id is NULL
But, the upgrade didn’t work. I got the same error:
PHP Warning: copy(/journals/18//articles/354/attachment/354-1-1119-1-13-20070801.doc): failed to open stream: No such file or directory in /lib/pkp/classes/file/FileManager.inc.php on line 155
PHP Warning: assert(): Assertion failed in /lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 132
PHP Warning: assert(): Assertion failed in /lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 380
ojs2: There are no readable files in this directory tree. Are safe mode or open_basedir active?

Hi @Rondineli_Gama_Saad

Are you using a test instalation or testing in the real instalation?
If you are in a test area, maybe the data folder are too old. It’s happened to me.

Tarcisio Pereira.

Hi @Tarcisio_Pereira,
I am using a test instalation. Before to upgrade it I resynced it with production data. I analysed if the files with error exists in production. Then, they don’t.

@Rondineli_Gama_Saad

Can you double check if are any article with null section_id?

select * from articles where section_id is null;

Tarcisio Pereira.

@Tarcisio_Pereira
before to apply the upgrade the table articles existed but now doesn’t it. I didn’t a new database restore and executed update articles SET section_id=1545 where section_id is NULL; to change section_id. I executed select * from articles where section_id is null; and the quantity came 0.