Hello, I’m trying to upgrade OMP from 3.1.2-4 to 3.2.0
I get this error, but I don’t have idea how to solve it:
[code: Installer Installer::migrateSubmissionCoverImages]
PHP Warning: copy(/{filesPath}/files/presses/0//monographs/1/simple/cover.jpg): failed to open stream: No such file or directory in /hosted/omp320/omp/www/lib/pkp/classes/file/FileManager.inc.php on line 181
PHP Warning: copy(/{filesPath}/files/presses/0//monographs/1/simple/thumbnail.jpg): failed to open stream: No such file or directory in /hosted/omp320/omp/www/lib/pkp/classes/file/FileManager.inc.php on line 181
PHP Fatal error: Uncaught Error: Call to a member function getSupportedFormLocales() on null in /hosted/omp320/omp/www/classes/install/Upgrade.inc.php:796
Stack trace: #0 /hosted/omp320/omp/www/lib/pkp/classes/install/Installer.inc.php(417): Upgrade->migrateSubmissionCoverImages() #1 /hosted/omp320/omp/www/lib/pkp/classes/install/Installer.inc.php(263): Installer->executeAction() #2 /hosted/omp320/omp/www/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller() #3 /hosted/omp320/omp/www/lib/pkp/classes/cliTool/UpgradeTool.inc.php(88): Installer->execute() #4 /hosted/omp320/omp/www/lib/pkp/classes/cliTool/UpgradeTool.inc.php(64): UpgradeTool->upgrade() #5 /hosted/omp320/omp/www/tools/upgrade.php(22): UpgradeTool->execute() #6 {main}
thrown in /hosted/omp320/omp/www/classes/install/Upgrade.inc.php on line 796
I had this same issue about an year ago. It was caused by a data error (submissions that were in a non-existent press). Please, have a look at this Github issue with some queries to run against your pre-upgrade database:
Hello,
I launched the second query described in the @israel.cefrin link.
The query found some records, then I deleted them.
Now, if I try to upgrade I have this message:
[code: Installer Installer::installDefaultNavigationMenus]
WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a Navi
gationMenu attached.
WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already
a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a Navi
gationMenu attached.
[code: Installer Installer::migrateSidebarBlocks]
PHP Notice: Array to string conversion in /mypath/omp/www/lib/pkp/classes/install/Installer.inc.php on line 828
then I tryed to upgrate to 3.2.0 with the sql debugger option on and the result is always the same:
UPDATE publication_formats as pf
SET publication_id = (
SELECT s.current_publication_id
FROM temp_publication_formats as tpf
LEFT JOIN submissions as s
ON (tpf.submission_id = s.submission_id)
WHERE pf.publication_format_id = tpf.publication_format_id
)
failed. Column 'publication_id' cannot be null
Looking at the error, I tryed to extract from publication_formats values with submission_id = NULL
Then I deleted the result records:
SELECT pf.publication_format_id FROM publication_formats pf LEFT JOIN submissions s ON (pf.submissioion_id = s.submission_id) WHERE s.submission_id IS NULL;
DELETE FROM publication_formats pf WHERE pf.publication_format_id = (int);