@bozana I’ve applied changes and now the upgrade script finish Successfully, anyway It doesn’t seem to be all right.
I get several Warning message during script execution, like these:
PHP Warning: Invalid argument supplied for foreach() in /path-to-ojs/classes/install/Upgrade.inc.php on line 1983
PHP Warning: Cannot use a scalar value as an array in /path-to-ojs/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /path-to-ojs/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Warning: Invalid argument supplied for foreach() in /path-to-ojs/classes/install/Upgrade.inc.php on line 2141
But the critical ones are these :
PHP Warning: rename(/path-to-ojs-files/journals/11//articles/2454//submission/original/2454-9209-1-SM.pdf,/path-to-ojs-files/journals/11//articles/2454//submission/2454-1-9209-1-2-20121019.pdf): Permission denied in /path-to-ojs/classes/install/Upgrade.inc.php on line 911
Unable to move "/path-to-ojs-files/journals/11//articles/2454//submission/original/2454-9209-1-SM.pdf" to "/path-to-ojs-files/journals/11//articles/2454//submission/2454-1-9209-1-2-20121019.pdf".
PHP Warning: rename(/path-to-ojs-files/journals/11//articles/2454//submission/review/2454-9210-1-RV.pdf,/path-to-ojs-files/journals/11//articles/2454//submission/review/2454-1-9210-1-4-20121019.pdf): Permission denied in /path-to-ojs/classes/install/Upgrade.inc.php on line 911
Unable to move "/path-to-ojs-files/journals/11//articles/2454//submission/review/2454-9210-1-RV.pdf" to "/path-to-ojs-files/test-ojs3-unimi/journals/11//articles/2454//submission/review/2454-1-9210-1-4-20121019.pdf".
PHP Warning: rename(/path-to-ojs-files/journals/11//articles/2454//submission/copyedit/2454-9211-1-CE.pdf,/path-to-ojs-files/journals/11//articles/2454//submission/copyedit/2454-1-9211-1-9-20121019.pdf): Permission denied in /path-to-ojs/classes/install/Upgrade.inc.php on line 911
Unable to move "/path-to-ojs-files/journals/11//articles/2454//submission/copyedit/2454-9211-1-CE.pdf" to "/path-to-ojs-files/journals/11//articles/2454//submission/copyedit/2454-1-9211-1-9-20121019.pdf".
PHP Warning: mkdir(): Permission denied in /path-to-ojs/lib/pkp/classes/file/FileManager.inc.php on line 307
Unable to make directory "/path-to-ojs-files/journals/11//articles/2454//submission/proof"
PHP Warning: rename(/path-to-ojs-files/journals/11//articles/2454//public/2454-9212-1-PB.pdf,/path-to-ojs-files/journals/11//articles/2454//submission/proof/2454-1-9212-1-10-20121019.pdf): No such file or directory in /path-to-ojs/classes/install/Upgrade.inc.php on line 911
Unable to move "path-to-ojs-files/journals/11//articles/2454//public/2454-9212-1-PB.pdf" to "/path-to-ojs-files/journals/11//articles/2454//submission/proof/2454-1-9212-1-10-20121019.pdf".
It seems that there are too slashes in the file path.
Final result is that new installation doesn’t work properly, indeed when I try to view article page I get a white page.
The second messages mean that your files in the files folder could not be migrated to the right position – it seems that the access permissions are not right. Could you double check the permissions on your files folder – maybe allow everything for the moment you are upgrading – and try again, but do not forget to use your back-up i.e. original files folder (and not the one after an upgrade trial!).
For the first message: How does the code line 1983 and/or 2141 (the messages are pointing to) looks like in your installation? – I do not see that number here: ojs/Upgrade.inc.php at ojs-3_0_2-0 · pkp/ojs · GitHub
Hmmmm… For some reason the $supportedFormLocales seem not to be an array Could you take a look in your DB table journal_settings, where setting_name = ‘supportedFormLocales’? Is setting_value an array for all journals there?
@Adriano_Jose, it would be best if you could double check if they are needed and repair them correctly, i.e. either upload the correct files again or delete them using the web user interface – in order for all dependencies to be managed correctly.
How many files are missing?
S. the function that deletes supp files in OJS 2.4.8-2: ojs/LayoutEditorAction.inc.php at ojs-2_4_8-2 · pkp/ojs · GitHub. I.e. you would need to consider at least also the DB tables article_files and article_supp_file_settings. Also the search index should then be rebuild.
HI, I have the same error:
I am using mysql and I tried to upgrade ojs-2_4_8 to ojs-3_1_1-4
I checked permission files.
SELECT * FROM submission_settings WHERE submission_id = '321704'
-----<hr>
PHP Warning: assert(): Assertion failed in ojs/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 112
Warning: assert(): Assertion failed in ojs/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 112
PHP Warning: copy(/files/journals/384//articles/321704/submission/review/321704-3004--1-4-20180406.doc): failed to open stream: No such file or directory in ojs/lib/pkp/classes/file/FileManager.inc.php on line 159
Warning: copy(/files/journals/384//articles/321704/submission/review/321704-3004--1-4-20180406.doc): failed to open stream: No such file or directory in ojs/lib/pkp/classes/file/FileManager.inc.php on line 159
-----<hr>
(mysql): DELETE FROM submission_files
WHERE file_id = 486631 AND revision = 1
-----<hr>
-----<hr>
(mysql): SELECT * FROM submission_files WHERE file_id = 486631
-----<hr>
-----<hr>
(mysql): DELETE FROM submission_file_settings WHERE file_id = 486631
-----<hr>
-----<hr>
(mysql): DELETE FROM item_views WHERE assoc_type = 515 AND assoc_id = '486631-1'
-----<hr>
-----<hr>
(mysql): SELECT s.*, ps.date_published,
COALESCE(stl.setting_value, stpl.setting_value) AS section_title,
COALESCE(sal.setting_value, sapl.setting_value) AS section_abbrev
FROM submissions s
LEFT JOIN published_submissions ps ON (s.submission_id = ps.submission_id)
JOIN sections se ON se.section_id = s.section_id
LEFT JOIN section_settings stpl ON (se.section_id = stpl.section_id AND stpl.setting_name = 'title' AND stpl.locale = 'en_US')
LEFT JOIN section_settings stl ON (se.section_id = stl.section_id AND stl.setting_name = 'title' AND stl.locale = 'en_US')
LEFT JOIN section_settings sapl ON (se.section_id = sapl.section_id AND sapl.setting_name = 'abbrev' AND sapl.locale = 'en_US')
LEFT JOIN section_settings sal ON (se.section_id = sal.section_id AND sal.setting_name = 'abbrev' AND sal.locale = 'en_US')
WHERE s.submission_id = 321704
-----<hr>
-----<hr>
(mysql): SELECT * FROM submission_settings WHERE submission_id = '321704'
-----<hr>
PHP Fatal error: Call to a member function getFileId() on null in ojs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065
Fatal error: Call to a member function getFileId() on null in ojs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065
I checked my log file:
grep “code: Installer Installer” /ojs/nohup.out
Sorry for the late response – I was sick for a long time and first now back again…
Did you manage to fix the problem?
If not: lets start from beginning again: what error message do you exactly get during the upgrade?
Note: do not forget to restore the clean backup of your 2.4.x installation before trying an upgrade/each time you try/do the upgrade…
Hi @bozana,don’t worries.
I am trying to upgrade from 2.4.8 to 3.1.0 and I have less errors.
The next week I will be send you the new errors with review_round.
Hi @bozana,
I am using this branch “ojs-stable-3_1_0” to migration from 2.4.8.
I checked error log:
SELECT s.*, ps.date_published,
COALESCE(stl.setting_value, stpl.setting_value) AS section_title,
COALESCE(sal.setting_value, sapl.setting_value) AS section_abbrev
FROM submissions s
LEFT JOIN published_submissions ps ON (s.submission_id = ps.submission_id)
JOIN sections se ON se.section_id = s.section_id
LEFT JOIN section_settings stpl ON (se.section_id = stpl.section_id AND stpl.setting_name = 'title' AND stpl.locale = 'en_US')
LEFT JOIN section_settings stl ON (se.section_id = stl.section_id AND stl.setting_name = 'title' AND stl.locale = 'en_US')
LEFT JOIN section_settings sapl ON (se.section_id = sapl.section_id AND sapl.setting_name = 'abbrev' AND sapl.locale = 'en_US')
LEFT JOIN section_settings sal ON (se.section_id = sal.section_id AND sal.setting_name = 'abbrev' AND sal.locale = 'en_US')
WHERE s.submission_id = 320427
-----<hr>
-----<hr>
(mysql): SELECT * FROM submission_settings WHERE submission_id = '320427'
-----<hr>
[code: Installer Installer::fixAuthorGroup]
-----<hr>
(mysql): SELECT a.author_id, s.context_id FROM authors a JOIN submissions s ON (a.submission_id = s.submission_id) JOIN user_groups g ON (a.user_group_id = g.user_group_id) WHERE g.context_id <> s.context_id
-----<hr>
[data: dbscripts/xml/upgrade/3.0.0_reviewer_files.xml]
-----<hr>
(mysql): SELECT TABLE_NAME, CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=SCHEMA()
-----<hr>
-----<hr>
(mysql): UPDATE submission_files sf, review_assignments ra SET sf.file_stage = 5, sf.assoc_type = 517, sf.assoc_id = ra.review_id WHERE ra.reviewer_file_id IS NOT NULL AND sf.file_id = ra.reviewer_file_id
-----<hr>
-----<hr>
(mysql): INSERT INTO review_round_files (submission_id, review_round_id, stage_id, file_id, revision) SELECT ra.submission_id, ra.review_round_id, 3, ra.reviewer_file_id, sf.revision FROM review_assignments ra, submission_files sf WHERE ra.reviewer_file_id IS NOT NULL AND sf.file_id = ra.reviewer_file_id
-----<hr>
1048: Column 'review_round_id' cannot be null
ADOConnection._Execute(INSERT INTO review_round_files (submission_id, review_round_id, stage_id, file_id, revision) SELECT ra.submission_id, ra.review_..., false)% line 1051, file: ojs/lib/pkp/lib/adodb/adodb.inc.php
ADOConnection.Execute(INSERT INTO review_round_files (submission_id, review_round_id, stage_id, file_id, revision) SELECT ra.submission_id, ra.review_...)% line 440, file: ojs/lib/pkp/classes/install/Installer.inc.php
Installer.executeSQL(INSERT INTO review_round_files (submission_id, review_round_id, stage_id, file_id, revision) SELECT ra.submission_id, ra.review_...)% line 435, file: ojs/lib/pkp/classes/install/Installer.inc.php
Installer.executeSQL(Array[3])% line 396, file: ojs/lib/pkp/classes/install/Installer.inc.php
Installer.executeAction(Array[3])% line 265, file: ojs/lib/pkp/classes/install/Installer.inc.php
ERROR: Upgrade failed: DB: Column 'review_round_id' cannot be null
I checked:
The file exists.(Original and attachment).
On article review, Recommendation date later than due date for at least one reviewer.
Could be any issue in upgrading process ?
Hi @bozana, I am working in branch 3.1.0 because I had problems with the stable 3.1.1
I will check in database this queries, (thanks a lot !!!)
I referenced in this discussion:
I am not sure if it is a problem with branch. Currently I am working with this branch in upgrade process and I am implementing a new features in parallel in other host with fresh install in this branch.