Warning "Column not found: 1054 Unknown column 'setting_name' in 'field list' in..." when upgrading to 3.3


Still upgrading multiple OJS stable-3.2 to lts-3.3.
I’m writing with a new type or warning I am finding that in the upgrade process:

2024-06-19 13:15:24 [migration: OJSv3_3_0UpgradeMigration]                                                                                                                                                                                    
Failed to migrate the settings entity "object_for_review_settings"                                                                                                                                                                            
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'setting_name' in 'field list' in /var/www/html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80                                           
Stack trace:                                                                                                                                                                                                                                  
#0 /var/www/html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(80): PDO->prepare()                                                                                                                              
#1 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(331): Doctrine\DBAL\Driver\PDOConnection->prepare()                                                                                              
#2 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database\{closure}()                                                                            
#3 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback()                                                                                         
#4 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(339): Illuminate\Database\Connection->run()                                                                                                      
#5 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2270): Illuminate\Database\Connection->select()                                                                                               
#6 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2258): Illuminate\Database\Query\Builder->runSelect()                                                                                         
#7 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2753): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()                                                               
#8 /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2259): Illuminate\Database\Query\Builder->onceWithColumns()                                                                                   
#9 /var/www/html/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php(110): Illuminate\Database\Query\Builder->get()                                                                                                                   
#10 /var/www/html/classes/migration/upgrade/OJSv3_3_0UpgradeMigration.inc.php(37): OJSv3_3_0UpgradeMigration->_settingsAsJSON()                                                                                                               
#11 /var/www/html/lib/pkp/classes/install/Installer.inc.php(406): OJSv3_3_0UpgradeMigration->up()                                                                                                                                             
#12 /var/www/html/lib/pkp/classes/install/Installer.inc.php(252): Installer->executeAction()                                                                                                                                                  
#13 /var/www/html/lib/pkp/classes/install/Installer.inc.php(175): Installer->executeInstaller()                                                                                                                                               
#14 /var/www/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php(89): Installer->execute()                                                                                                                                                       
#15 /var/www/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php(65): UpgradeTool->upgrade()                                                                                                                                                     
#16 /var/www/html/tools/upgrade.php(22): UpgradeTool->execute()                                                                                                                                                                               
#17 {main}    

The error don’t breaks the upgrade and the resulting journal si working great (we did some testing and all works as expected) but the error stack is ugly so I though is better ask than cry.

I didn’t find any reference in the forum but my guess is this could be related with an ancient plugin for book reviews… and is not a usual issue.

May I be worried? Any suggestion to clean the DB and make the upgrade cleaner?

Thanks a lot in advance,

Hi @marc,

OJS is trying to run some general-purpose upgrades on _settings tables, but the old “objects for review” plugin used to include a table that was out of spec, and is causing the upgrade process to break.

I would suggest removing that table from the database prior to running the upgrade. You can re-add it afterwards if you like, and it shouldn’t cause problems, but we’re unlikely to ever make use of that data, so it might be best to just store it somewhere (along with the other tables in that plugin) for long-term keeping if you think there might be any useful data there. If you never used the plugin, you can just remove those tables – if you’re not sure, you can just check their contents to see if there’s anything present.

You can see the relevant tables in this XML descriptor.

Alec Smecher
Public Knowledge Project Team

1 Like

This topic was automatically closed after 11 days. New replies are no longer allowed.