Updated OJS to 3.3.0-14 and now Article Statistics and System Infomation pages now showing -- IntlDateFormatter

Today we updated to 3.3.0.-14 most things went well but two areas of the site do not display:

Administration->Administrative Functions>System Information

And

Statistics->Articles

The PHP log shows the following:

“[28-Feb-2023 19:30:01 UTC] PHP Fatal error: Uncaught Error: Class ‘IntlDateFormatter’ not found in /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php:60
Stack trace:
#0 /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php(201): PHP81_BC{closure}()
#1 [internal function]: PHP81_BC{closure}()
#2 /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php(180): preg_replace_callback()
#3 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.date_format.php(84): PHP81_BC\strftime()
#4 /var/www/html/cache/t_compile/58602cf8e0d794be60307948e3b75c8078ff3454^ec004744317f29c2a6de74168cf42e47da599ebd_0.app.adminsystemInfo.tpl.php(64): smarty_modifier_date_format()
#5 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(248): Block_82611160363fe558e2be7c7_08674995->callBlock()
#6 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(184): Smarty_Internal_Runtime_Inheritance->callBlock() in /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php on line 60
[28-Feb-2023 19:30:17 UTC] PHP Fatal error: Uncaught Error: Class ‘IntlDateFormatter’ not found in /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php:60
Stack trace:
#0 /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php(201): PHP81_BC{closure}()
#1 [internal function]: PHP81_BC{closure}()
#2 /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php(180): preg_replace_callback()
#3 /var/www/html/lib/pkp/classes/services/PKPStatsService.inc.php(288): PHP81_BC\strftime()
#4 /var/www/html/lib/pkp/classes/services/PKPStatsService.inc.php(128): PKP\Services\PKPStatsService->getEmptyTimelineIntervals()
#5 /var/www/html/lib/pkp/pages/stats/PKPStatsHandler.inc.php(241): PKP\Services\PKPStatsService->getTimeline()
#6 /var/www/html/lib/pkp/classes/core/PKPRouter.inc.php(395): PKPStatsHandler->publications()
#7 /var/www/html/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()
#8 /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter in /var/www/html/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php on line 60”

The problem seems to be with IntlDateFormatter… which a little looking tells me has to do with rendering of dates. This worked in 3.3.0.-13, what has changed with 3.3.0.-14? Any suggestions on how to remedy this? Thanks in advance!

Sincerely,

Eric T. Gadsby

Hi @egadsby,

See: Issue with IntlDateFormatter

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher Thanks for the information and the help!

In my case was able to get it working by using “sudo yum install php-intl” from the CLI; we are using RHEL 8.5.

Just wondering, why had we been able to run OJS without this until the upgrade? Thanks again!

Hi @egadsby,

The latest build of OJS fixed Replace strftime() as it's deprecate in PHP 8.1 · Issue #7624 · pkp/pkp-lib · GitHub to improve PHP8.1 compatibility, but at the cost of introducing the new requirement for the intl module for older versions of PHP.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for you help!

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