Submission Files is not showing in OJS 3.3.0.11

Hello,
I am struggling with an issue in my OJS journal. The journal supports two languages one is English and the other one is Persian. The issue is that in submission page, the submission files section is loading properly when the language of the website is English but the same section stucks (loading…) when Persian language is selected.

I provided a screenshot of the issue:

In order to understand what the issue is, I checked the server log and the following error is logged:

PHP Fatal error:  Uncaught Error: Call to undefined method IntlCalendar::setGregorianChange() in /lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php:98, referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7

Note: I have intl php extension enabled.

Any help on how to resolve the issue.

Hello dear friend… some times it related to language settings in config.inc.php … at localized part set these settings… I hope your problem will be solved very soon.
;;;;;;;;;;;;;;;;;;;;;;;;;
; Localization Settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;

[i18n]

; Default locale
locale = en

; Database connection character set

client_charset = utf-8
connection_charset = utf8
database_charset = utf8
filesystem_charset = utf8
results_cahrset = utf8
server_charset = utf8
system_charset = utf8

Thanks @monirehbastami,
But the config file has already the same settings.

Hi @asrarahmadehsan,

Can you post the full stack trace for the error message?

Thanks,
Alec Smecher
Public Knowledge Project Team

PHP Fatal error:  Uncaught Error: Call to undefined method IntlCalendar::setGregorianChange() in /mj.ghalib.edu.af/lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php:98, referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: Stack trace:, referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #0 /lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php(201): PHP81_BC\\{closure}(Object(DateTime), '%B'), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #1 [internal function]: PHP81_BC\\{closure}(Array), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #2 /lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php(180): preg_replace_callback('/(?<!%)%([_#-]?...', Object(Closure), '%B %e, %Y'), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #3 /lib/pkp/controllers/grid/files/FileDateGridColumn.inc.php(56): PHP81_BC\\strftime('%B %e, %Y', Object(DateTime)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #4 /lib/pkp/classes/controllers/grid/ColumnBasedGridCellProvider.inc.php(34): FileDateGridColumn->getTemplateVarsFromRow(Object(SubmissionFilesGridRow)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #5 /lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(49): ColumnBasedGridCellProvider->getTemplateVarsFromRowColumn(Object(SubmissionFilesGridRow), Object(FileDateGridColumn)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #6 /lib/pkp/classes/controllers/grid/GridHandler.inc.php(1104): GridCellProvider->render(Object(Request), Object(SubmissionFilesGridRow), Object(FileDateGridColumn)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #7 /lib/pkp/classes/controllers/grid/GridHandler.inc.php(1011): GridHandler->_renderCellInternally(Object(Request), Object(SubmissionFilesGridRow), Object(FileDateGridColumn)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #8 /lib/pkp/classes/controllers/grid/GridHandler.inc.php(988): GridHandler->renderRowInternally(Object(Request), Object(SubmissionFilesGridRow)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #9 /lib/pkp/classes/controllers/grid/GridHandler.inc.php(1033): GridHandler->renderRowsInternally(Object(Request), Array), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #10 /lib/pkp/classes/controllers/grid/GridHandler.inc.php(923): GridHandler->renderGridBodyPartsInternally(Object(Request)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #11 /lib/pkp/classes/controllers/grid/GridHandler.inc.php(643): GridHandler->doSpecificFetchGridActions(Array, Object(Request), Object(TemplateManager)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #12 /lib/pkp/classes/core/PKPRouter.inc.php(395): GridHandler->fetchGrid(Array, Object(Request)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #13 /lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #14 /lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #15 /lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request)), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #16 /index.php(68): PKPApplication->execute(), referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr: #17 {main}, referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7
stderr:   thrown in /lib/pkp/lib/vendor/php81_bc/strftime/src/php-8.1-strftime.php on line 98, referer: https://www.mj.ghalib.edu.af/index.php/mj/authorDashboard/submission/7

Hi @asrarahmadehsan,

Hmm, I’m not sure why, but it appears that your PHP installation is missing a function (https://www.php.net/manual/en/intlgregoriancalendar.setgregorianchange.php).

Can you check what your exact PHP version is?

Regards,
Alec Smecher
Public Knowledge Project Team

Hello, @asmecher ,
Thanks for replying, The site is running on PHP 8.2

Hi @asrarahmadehsan,

Can you check the exact version? There should be something after the 2.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher ,

The exact version of PHP: 8.2.12

Hi @asrarahmadehsan,

Hmm, I’m afraid I can’t replicate that behaviour, and looking through the code, I’m not sure what caused it. It’s possibly something nonstandard about your PHP environment, or an assumption in the coding of a backwards-compatibility library that we use in OJS 3.3.0-x (the line of code in question is here).

I would recommend working around the problem, if possible. Here are two suggestions:

  1. Upgrade to OJS 3.4.0-x, which does not use the backwards compatibility library
  2. Downgrade your PHP to version 8.0.x or 8.1.x (8.1.x is recommended)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher ,

I checked the website with PHP version 8.0 to 8.3 and it only works with PHP 8.0 but that version has reached end of it’s life.

Interesting point is that it works with English as the language of the website but breaks when changed to other language (e.g. Persian).

Should I talk to the Hosting Provider for this problem?

Hi @asrarahmadehsan,

…breaks when changed to other language (e.g. Persian).

Thanks, that was the hint I needed to reproduce the problem locally.

I’ve filed this for work in the backwards-compatibility library, along with a proposed fix. You should be able to apply the proposed fix in the meantime to work around the problem without complications (in lib/pkp/lib/vendor/php81_bc/strftime). See for details:

Thanks,
Alec Smecher
Public Knowledge Project Team