[code: Installer Installer::migrateSubmissionCoverImages]
PHP Fatal error: Uncaught Exception: DB Error: ERROR: column reference āsubmission_idā is ambiguous
LINE 7: GROUP BY submission_id
^ Query: SELECT
ps.submission_id as submission_id,
ps.cover_image as cover_image,
s.context_id as context_id
FROM published_submissions ps
LEFT JOIN submissions s ON (s.submission_id = ps.submission_id)
GROUP BY submission_id in /var/www/3.2/lib/pkp/classes/db/DAO.inc.php:703
Stack trace: #0 /var/www/3.2/lib/pkp/classes/db/DAO.inc.php(103): DAO->handleError(Object(ADODB_postgres8), āSELECT\n\t\t\t\tps.sā¦ā) #1 /var/www/3.2/classes/install/Upgrade.inc.php(743): DAO->retrieve(āSELECT\n\t\t\t\tps.sā¦ā) #2 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(417): Upgrade->migrateSubmissionCoverImages(Object(Upgrade), Array) #3 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(263): Installer->executeAction(Array) #4 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller() #5 /var/www/3.2/lib/pkp/classes/cliTool/Up in /var/www/3.2/lib/pkp/classes/db/DAO.inc.php on line 703
Thank you very much, @asmecher. I replied to your email, but it looks like it didnāt go through.
Unfortunately, after changing the file, restoring the db, and running the upgrade again, I get another error:
[code: Installer Installer::migrateSubmissionCoverImages]
PHP Fatal error: Uncaught Exception: DB Error: ERROR: column "ps.cover_image" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ps.cover_image as cover_image,
^ Query: SELECT
ps.submission_id as submission_id,
ps.cover_image as cover_image,
s.context_id as context_id
FROM published_submissions ps
LEFT JOIN submissions s ON (s.submission_id = ps.submission_id)
GROUP BY ps.submission_id in /var/www/3.2/lib/pkp/classes/db/DAO.inc.php:703
Stack trace:
#0 /var/www/3.2/lib/pkp/classes/db/DAO.inc.php(103): DAO->handleError(Object(ADODB_postgres8), 'SELECT\n\t\t\t\tps.s...')
#1 /var/www/3.2/classes/install/Upgrade.inc.php(743): DAO->retrieve('SELECT\n\t\t\t\tps.s...')
#2 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(417): Upgrade->migrateSubmissionCoverImages(Object(Upgrade), Array)
#3 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(263): Installer->executeAction(Array)
#4 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeI in /var/www/3.2/lib/pkp/classes/db/DAO.inc.php on line 703
The installer continued complaining about wanting SELECT fields in the GROUP BY clause until my GROUP BY looked like this (l. 749):
GROUP BY ps.submission_id, ps.cover_image, s.context_id'
Iām not sure if that makes sense in the code, but the installer got past that bit.
However, I now get the following error:
[code: Installer Installer::migrateSubmissionCoverImages]
PHP Notice: Undefined offset: 1 in /var/www/3.2/classes/install/Upgrade.inc.php on line 762
PHP Fatal error: Uncaught Exception: DB Error: ERROR: syntax error at or near "SET"
LINE 2: SET
^ Query: INSERT INTO submission_settings
SET
submission_id = ?,
setting_name = ?,
setting_value = ?,
locale = ? in /var/www/3.2/lib/pkp/classes/db/DAO.inc.php:703
Stack trace:
#0 /var/www/3.2/lib/pkp/classes/db/DAO.inc.php(231): DAO->handleError(Object(ADODB_postgres8), 'INSERT INTO sub...')
#1 /var/www/3.2/classes/install/Upgrade.inc.php(820): DAO->update('INSERT INTO sub...', Array)
#2 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(417): Upgrade->migrateSubmissionCoverImages(Object(Upgrade), Array)
#3 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(263): Installer->executeAction(Array)
#4 /var/www/3.2/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller()
#5 /var/www/3.2/lib/pkp/classes/cliTool/UpgradeTool.inc.php(88): Installer->execute()
#6 /var/www/3.2/lib/pkp/classes/cliTool/UpgradeTool.inc.php(64): UpgradeTool->upgrade()
#7 /var/www/ in /var/www/3.2/lib/pkp/classes/db/DAO.inc.php on line 703
Just to double-check ā what version of OMP are you upgrading from? The title of the thread says 3.2.1 to 3.2.1-1, but the first post says 3.1.2 to 3.2.1-1.
Regards,
Alec Smecher
Public Knowledge Project Team
It looks like youāve moved to a checkout from the master branch of GitHub ā thatās unreleased code and will definitely be buggy! If youāre looking for something to use in production, try the stable-3_2_1 branch.
Regards,
Alec Smecher
Public Knowledge Project Team
I hope itās nothing Iām doing wrong, but I got another error:
php tools/upgrade.php upgrade
[pre-install]
[load: upgrade.xml]
[version: 3.2.1.1]
[code: Installer Installer::checkPhpVersion]
[data: dbscripts/xml/upgrade/3.1.2_preupdate_user_author_names.xml (skipped)]
[data: dbscripts/xml/upgrade/3.1.2_preupdate_chapters.xml (skipped)]
[data: dbscripts/xml/upgrade/3.1.2_preupdate_categories.xml (skipped)]
[data: dbscripts/xml/upgrade/3.1.2_preupdate_pub_id.xml (skipped)]
[code: Installer Installer::migrateSubmissionCoverImages]
PHP Notice: Undefined offset: 1 in /home/omp/omp/classes/install/Upgrade.inc.php on line 760
PHP Notice: Undefined offset: 1 in /home/omp/omp/classes/install/Upgrade.inc.php on line 760
PHP Notice: Undefined offset: 1 in /home/omp/omp/classes/install/Upgrade.inc.php on line 760
[data: dbscripts/xml/upgrade/3.2.0_preupdate_email_templates.xml]
ERROR: Upgrade failed: DB: ERROR: syntax error at or near "email_templates_assoc"
LINE 1: ALTER TABLE email_templates DROP INDEX email_templates_assoc...
Thatās odd ā it looks like ADODB is attempting to use MySQL-style SQL. What driver do you have configured in your config.inc.php configuration file?
Regards,
Alec Smecher
Public Knowledge Project Team