Upgrade PHP Fatal error from ojs 3.3.0-19 to 3.4

Describe the issue or problem
Hello, I am trying to upgrade from 3.3.0-19 to 3.4.0-7.

Steps I took leading up to the issue
php tools/upgrade.php upgrade

PHP Fatal error: Uncaught TypeError: PKP\core\PKPString::convertStrftimeFormat(): Argument #1 ($format) must be of type string, null given, called in /var/www/ssl/ojs34/lib/pkp/classes/template/PKPTemplateManager.php on line 194 and defined in /var/www/ssl/ojs34/lib/pkp/classes/core/PKPString.php:557
Stack trace:
#0 /var/www/ssl/ojs34/lib/pkp/classes/template/PKPTemplateManager.php(194): PKP\core\PKPString::convertStrftimeFormat()
#1 /var/www/ssl/ojs34/classes/template/TemplateManager.php(40): PKP\template\PKPTemplateManager->initialize()
#2 /var/www/ssl/ojs34/lib/pkp/classes/template/PKPTemplateManager.php(1438): APP\template\TemplateManager->initialize()
#3 /var/www/ssl/ojs34/lib/pkp/classes/plugins/Plugin.php(403): PKP\template\PKPTemplateManager::getManager()
#4 /var/www/ssl/ojs34/lib/pkp/classes/plugins/Plugin.php(137): PKP\plugins\Plugin->_registerTemplateResource()
#5 /var/www/ssl/ojs34/lib/pkp/classes/plugins/LazyLoadPlugin.php(34): PKP\plugins\Plugin->register()
#6 /var/www/ssl/ojs34/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.php(43): PKP\plugins\LazyLoadPlugin->register()
#7 /var/www/ssl/ojs34/lib/pkp/classes/plugins/PluginRegistry.php(76): APP\plugins\generic\recommendByAuthor\RecommendByAuthorPlugin->register()
#8 /var/www/ssl/ojs34/lib/pkp/classes/plugins/PluginRegistry.php(121): PKP\plugins\PluginRegistry::register()
#9 [internal function]: PKP\plugins\PluginRegistry::PKP\plugins{closure}()
#10 /var/www/ssl/ojs34/lib/pkp/classes/plugins/PluginRegistry.php(121): array_walk_recursive()
#11 /var/www/ssl/ojs34/lib/pkp/classes/cliTool/CommandLineTool.php(72): PKP\plugins\PluginRegistry::loadCategory()
#12 /var/www/ssl/ojs34/lib/pkp/classes/cliTool/UpgradeTool.php(39): PKP\cliTool\CommandLineTool->__construct()
#13 /var/www/ssl/ojs34/tools/upgrade.php(21): PKP\cliTool\UpgradeTool->__construct()
#14 {main}
thrown in /var/www/ssl/ojs34/lib/pkp/classes/core/PKPString.php on line 557

What application are you using?
OJS 3.3.0-19

Additional information
Server running PHP 8.0.30

Journal settings related to date/time formats are like to the following:

34 dateFormatLong %B %e, %Y NULL en_US
34 dateFormatShort %Y-%m-%d NULL en_US
34 datetimeFormatLong %B %e, %Y - %l:%M%P NULL en_US
34 datetimeFormatShort %Y-%m-%d %l:%M%P NULL en_US

Any suggestions are appreciated!

Hi @jason,

It looks like you don’t have a time_format setting configured in your config.inc.php. See config.TEMPLATE.inc.php for an example of how this should look.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks Alec. You are right! I shouldn’t copy over the old config.inc.php from ojs 3.3.0.19.

Best,

Jason

1 Like