Hi everyone,
I’m currently using OJS version 3.4.0.5 with PHP version 8.2.28. I’m encountering an issue where authors are unable to add discussions to submissions. This seems to match descriptions of a known bug as this https://github.com/pkp/pkp-lib/issues/9145
Could anyone tell me how to fix this issue, or which OJS version this bug was fixed in?
Thanks in advance for your help!
Hi @ob2code,
This looks to be fixed as of OJS 3.4.0-2, but it may not be the same issue. Perhaps you could describe what is occurring when authors are unable to add to the discussions - are you getting any error messages?
-Roger
PKP Team
Hi rcgillis. Thanks for your reply.
There is no error message when the user types in the content and clicks the OK button. The loading icon keeps spinning and never stops, until we click Cancel (please see screenshot #1).
However, the Discussion still gets created, but it is completely empty (see screenshot #2). When we click Edit, an error message appears (screenshot #3).
Let me know if you need any more details.
Hi @ob2code,
Thanks for clarifying. With the spinning wheel, that means you should check your PHP error logs. Can you check your logs and report on errors found there?
-Roger
PKP Team
I’ve tested it, and here’s what’s happening in error_log:
[02-Jul-2025 16:48:25 Asia/Bangkok] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/accname/ojs.mysite.com/public_html/cache/t_compile/dd3b30d2edee5faedbd050778582a900e61b1c1f^cf0184772fdd3e26e3949ba5f0001e34b4a3c1c1_0.app.controllersgridqueriesformqueryForm.tpl.php:26
Stack trace:
#0 /home/accname/ojs.mysite.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6821c192e7b774_04701548()
#1 /home/accname/ojs.mysite.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#2 /home/accname/ojs.mysite.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()
#3 /home/accname/ojs.mysite.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render()
#4 /home/accname/ojs.mysite.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()
#5 /home/accname/ojs.mysite.com/public_html/lib/pkp/classes/template/PKPTemplateManager.php(1204): Smarty_Internal_TemplateBase->fetch()
#6 /home/accname/ojs.mysite.com/public_html/lib/pkp/classes/form/Form.php(217): PKP\template\PKPTemplateManager->fetch()
#7 /home/accname/ojs.mysite.com/public_html/lib/pkp/controllers/grid/queries/form/QueryForm.php(263): PKP\form\Form->fetch()
#8 /home/accname/ojs.mysite.com/public_html/lib/pkp/controllers/grid/queries/QueriesGridHandler.php(710): PKP\controllers\grid\queries\form\QueryForm->fetch()
#9 [internal function]: PKP\controllers\grid\queries\QueriesGridHandler->updateQuery()
#10 /home/accname/ojs.mysite.com/public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()
#11 /home/accname/ojs.mysite.com/public_html/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()
#12 /home/accname/ojs.mysite.com/public_html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route()
#13 /home/accname/ojs.mysite.com/public_html/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch()
#14 /home/accname/ojs.mysite.com/public_html/index.php(21): PKP\core\PKPApplication->execute()
#15 {main}
thrown in /home/accname/ojs.mysite.com/public_html/cache/t_compile/dd3b30d2edee5faedbd050778582a900e61b1c1f^cf0184772fdd3e26e3949ba5f0001e34b4a3c1c1_0.app.controllersgridqueriesformqueryForm.tpl.php on line 26
Could you help me check the error logs?@ rcgillis
Hi @ob2code,
Sorry - deciphering error logs is not my area of expertise. I have forwarded this along to our staff, but many have been unavailable as of late, but I will see if someone can assist.
-Roger
PKP Team