Error upgrade from 2.4 to 3

Dear,
can you help me with the error below?

(mysqli): 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 = ‘pt_BR’)
LEFT JOIN section_settings stl ON (se.section_id = stl.section_id AND stl.setting_name = ‘title’ AND stl.locale = ‘pt_BR’)
LEFT JOIN section_settings sapl ON (se.section_id = sapl.section_id AND sapl.setting_name = ‘abbrev’ AND sapl.locale = ‘pt_BR’)
LEFT JOIN section_settings sal ON (se.section_id = sal.section_id AND sal.setting_name = ‘abbrev’ AND sal.locale = ‘pt_BR’)
WHERE s.submission_id = 3030

-----


Fatal error: Uncaught Error: Call to a member function getContextId() on null in /home/webuser/revistas/ojs-3.1.2-1/classes/install/Upgrade.inc.php:2316
Stack trace:
#0 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/install/Installer.inc.php(421): Upgrade->repairImageAssociations(Object(Upgrade), Array)
#1 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/install/Installer.inc.php(265): Installer->executeAction(Array)
#2 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller()
#3 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/cliTool/UpgradeTool.inc.php(88): Installer->execute()
#4 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/cliTool/UpgradeTool.inc.php(64): UpgradeTool->upgrade()
#5 /home/webuser/revistas/ojs-3.1.2-1/tools/upgrade.php(34): UpgradeTool->execute()
#6 {main}
thrown in /home/webuser/revistas/ojs-3.1.2-1/classes/install/Upgrade.inc.php on line 2316

Please, please, can anyone help me?

Hi @lsaluze,

It looks like you have a data error in your database. Check for an entry in submission_files that refers to a submission_id that doesn’t exist in the submissions table, or e.g. an entry in the submissions table that refers to a section_id that doesn’t exist in the sections table.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks Alec, I searched for this tables in version 2.8, but I didn’t find it. Can you help me with another idea? Thank you very much.

Hi @lsaluze,

In OJS 2.x, references to submissions will be called articles. For example, the submission_files table will be article_files. (Double-check your OJS 2.x version – there is no OJS 2.8.)

Regards,
Alec Smecher
Public Knowledge Project Team