Errors in PHP log from upgrade from 3.3.0-11 LTS to 3.3.0-12 LTS

I’ve seen the error in the forums before and from what I can tell the problem was addressed in a previous version but I am seeing it in the current version. First I edit the config.php.inc to set installed = Off before running the upgrade as follows:

php /www/publish/html/ojs/tools/upgrade.php upgrade

2022-09-21 16:15:39 [pre-install]
2022-09-21 16:15:39 [load: upgrade.xml]
2022-09-21 16:15:39 [version: 3.3.0.12]
2022-09-21 16:15:39 [code: Installer Installer::checkPhpVersion]
2022-09-21 16:15:39 [code: Installer Installer::installDefaultNavigationMenus]
2022-09-21 16:15:39 [code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
2022-09-21 16:15:39 [code: Installer Installer::addPluginVersions]
2022-09-21 16:15:39 [post-install]
Successfully upgraded to version 3.3.0.12

Then I checked the PHP error log and saw the errors.
Here’s a snippet from the log:

[21-Sep-2022 16:15:06 America/Chicago] PHP Fatal error: Uncaught Error: Call to a member function getConnection() on null in /www/publish/html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php:74
Stack trace:
#0 /www/publish/html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php(200): Illuminate\Database\Capsule\Manager::connection()
#1 /www/publish/html/ojs/lib/pkp/classes/db/DAO.inc.php(65): Illuminate\Database\Capsule\Manager::__callStatic()
#2 /www/publish/html/ojs/lib/pkp/classes/context/ContextDAO.inc.php(63): DAO->retrieve()
#3 /www/publish/html/ojs/lib/pkp/classes/core/PKPRouter.inc.php(252): ContextDAO->getByPath()
#4 /www/publish/html/ojs/lib/pkp/classes/core/PKPRequest.inc.php(760): PKPRouter->getContext()
#5 /www/publish/html/ojs/classes/core/Request.inc.php(64): PKPRequest->_delegateToRouter()
#6 /www/publish/html/ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php(114): Request->getContext()
#7 /www/publish/html/ojs/classes/template/TemplateManager.inc.php(28): PKPTemplateManag in /www/publish/html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 4, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 4, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 3, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 3, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 6, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 6, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 5, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 5, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:39 America/Chicago] WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[21-Sep-2022 16:15:43 America/Chicago] PHP Fatal error: Uncaught Error: Call to a member function getConnection() on null in /www/publish/html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php:74
Stack trace:
#0 /www/publish/html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php(200): Illuminate\Database\Capsule\Manager::connection()
#1 /www/publish/html/ojs/lib/pkp/classes/db/DAO.inc.php(65): Illuminate\Database\Capsule\Manager::__callStatic()
#2 /www/publish/html/ojs/lib/pkp/classes/context/ContextDAO.inc.php(63): DAO->retrieve()
#3 /www/publish/html/ojs/lib/pkp/classes/core/PKPRouter.inc.php(252): ContextDAO->getByPath()
#4 /www/publish/html/ojs/lib/pkp/classes/core/PKPRequest.inc.php(760): PKPRouter->getContext()
#5 /www/publish/html/ojs/classes/core/Request.inc.php(64): PKPRequest->_delegateToRouter()
#6 /www/publish/html/ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php(114): Request->getContext()
#7 /www/publish/html/ojs/classes/template/TemplateManager.inc.php(28): PKPTemplateManag in /www/publish/html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74

I can login to the system and it does report that it was upgraded but I’m not sure that everything upgraded properly given the above errors.

Hi @MacMike,

If you get the message “Successfully upgraded to version 3.3.0.12”, then the upgrade was successful. I’m not sure what caused the error message but it wasn’t the upgrade process.

Regards,
Alec Smecher
Public Knowledge Project Team

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