Hi Everyone!
I finally managed to really upgrade OJS to 3.1.1.2 and getting Successfully upgraded to version 3.1.1.2
message with no errors.
If someone is experience this kinds of errors this is how i’ve managed to solve this:
First, as @asmecher showed to me, there were journals that were not completed removed from database:
So I’ve get the create database wuery and searched in it for all journals_ids and context_ids referrences of the deleted journals_id, so this was the tables that i’ve found and deleted the ocurrences: (NOTE! There are more tables with context, context_id and journal_id but this was the only ones that I’ve found references)
DELETE FROM roles WHERE journal_id IN (4,3,7,2,5);
DELETE FROM rt_versions WHERE journal_id IN (4,3,7,2,5);
DELETE FROM notification_subscription_settings WHERE context IN (4,3,7,2,5);
DELETE FROM metrics WHERE context_id IN (4,3,7,2,5);
DELETE FROM authors WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM edit_decisions WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM metrics WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM review_assignments WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM review_round_files WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM review_rounds WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM stage_assignments WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM submission_comments WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM submission_files WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM submission_galleys WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM submission_settings WHERE submission_id IN (SELECT submission_id FROM submissions WHERE context_id IN (4,3,7,2,5));
DELETE FROM submissions WHERE context_id IN (4,3,7,2,5);
In that case creating the journal reference on journals table and trying to remove it from UI doesn’t not work.
=====================================================================================
Other problem that I get on [code: Installer Installer::fixGenreIdInFileNames]
that get this errors like (that didn’t broke the update, but created many errors):
[homolog] < PHP Warning: rename(files/journals/20//articles/1705//submission/final/1705-1-15394-1-6-20151201.docx,files/journals/20//articles/1705//submission/final/1705-193-15394-1-6-20151201.docx): Arquivo ou diretório não encontrado in {baseURL}/classes/install/Upgrade.inc.php on line 2490
[homolog] < Unable to move "files/journals/20//articles/1705//submission/final/1705-1-15394-1-6-20151201.docx" to "files/journals/20//articles/1705//submission/final/1705-193-15394-1-6-20151201.docx".
To fix this, I’ve manged to extract the file_id and revision from the file name (example: 1705-193-15394-1-6-20151201) and deleted the occurrences:
DELETE FROM submission_files WHERE file_id IN (16615,21206,21187,20048,18931,18639,18279,17869,21925,17296,21922,21745) AND revision = 2;
DELETE FROM submission_files WHERE file_id = 16729 AND revision = 2 OR revision = 3;
DELETE FROM submission_files WHERE file_id = 24978 AND revision = 4;
DELETE FROM submission_files WHERE file_id = 21576 AND revision = 4 OR revision = 5;
DELETE FROM submission_files WHERE file_id IN (15394, 15421, 15014, 15015, 10551, 10552, 10553, 10563, 10710, 10711, 10712, 10713, 10714, 10715, 10716, 10717, 10718, 10719, 10720, 10721, 10722, 10723, 10724, 10725, 13640, 13641, 13642, 13643, 13644, 13645, 15564, 14729, 14404, 14405, 15263, 11457, 11458, 1818, 15588, 10639, 10640, 10641, 11940, 11941, 11942, 15345, 15347, 15348, 15350, 15353, 11528, 14214, 10599, 10600, 12610, 15425, 15432, 15433, 15434, 15412, 15410, 2198, 14080, 14084, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14282, 14292, 14367);
DELETE FROM submission_file_settings WHERE file_id IN (15394, 15421, 15014, 15015, 10551, 10552, 10553, 10563, 10710, 10711, 10712, 10713, 10714, 10715, 10716, 10717, 10718, 10719, 10720, 10721, 10722, 10723, 10724, 10725, 13640, 13641, 13642, 13643, 13644, 13645, 15564, 14729, 14404, 14405, 15263, 11457, 11458, 1818, 15588, 10639, 10640, 10641, 11940, 11941, 11942, 15345, 15347, 15348, 15350, 15353, 11528, 14214, 10599, 10600, 12610, 15425, 15432, 15433, 15434, 15412, 15410, 2198, 14080, 14084, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14282, 14292, 14367);
DELETE FROM submission_supplementary_files WHERE file_id IN (16615,21206,21187,20048,18931,18639,18279,17869,21925,17296,21922,21745) AND revision = 2;
DELETE FROM submission_supplementary_files WHERE file_id = 16729 AND revision = 2 OR revision = 3;
DELETE FROM submission_supplementary_files WHERE file_id = 24978 AND revision = 4;
DELETE FROM submission_supplementary_files WHERE file_id = 21576 AND revision = 4 OR revision = 5;
DELETE FROM submission_supplementary_files WHERE file_id IN (15394, 15421, 15014, 15015, 10551, 10552, 10553, 10563, 10710, 10711, 10712, 10713, 10714, 10715, 10716, 10717, 10718, 10719, 10720, 10721, 10722, 10723, 10724, 10725, 13640, 13641, 13642, 13643, 13644, 13645, 15564, 14729, 14404, 14405, 15263, 11457, 11458, 1818, 15588, 10639, 10640, 10641, 11940, 11941, 11942, 15345, 15347, 15348, 15350, 15353, 11528, 14214, 10599, 10600, 12610, 15425, 15432, 15433, 15434, 15412, 15410, 2198, 14080, 14084, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14282, 14292, 14367);
There were an occurrence that the file was there, but it was a .docx file and the update was trying to get a .txt file, so with this update the error message disappear:
UPDATE submission_files SET original_file_name = '3228-##_Resultados de pesquisa-16481-1-4-20170215.docx' WHERE file_id = 18743;
the original_file_name does not have .docx in the end (I just dont undestand why it just don’t get the extencion from file_type
collum on submission_files
)
=====================================================================================
For the errors on [code: Installer Installer::moveReviewerFiles]
first I’ve to edit config.inc.php
and enable the debug option on database and the stacktrace option. With that everytime that a error was found the upgrade stop, so i’ve changed the class from pkp-lib and removed the fatal_error
and print the submission id on table.
With that I’ve got all the submissions with errors, and I’ve searched on UI and it appers it was “deleted” in some point, so i’ve removed all references that I’ve found from them and the errors messages desapear after that:
DELETE FROM authors WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM edit_decisions WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM metrics WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM published_submissions WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM review_assignments WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM review_round_files WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM review_rounds WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM stage_assignments WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM submission_comments WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM submission_files WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM submission_galleys WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM submissions WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM submission_settings WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
DELETE FROM submission_search_objects WHERE submission_id IN (297,415,443,454,485,514,546,617,620,618,617,620,620,1401,1374,2039,2617,775,921,1759);
=====================================================================================
There was another error that I don’t remember where it come from but produced this message:
[homolog] < ERROR: Reviewer files with ID 1470 from review assignment 264 could not be found in the database table submission_files
[homolog] < ERROR: Reviewer files with ID 11424 from review assignment 1462 could not be found in the database table submission_files
And solved by removing this references:
DELETE FROM review_assignments WHERE review_id IN (264,1462);
Hope it can help someone.
Regards,
Rafael Mansilha.