Error when click the setting option in pkp pn plugin

Describe the issue or problem
When i click the setting on pkp pn plugin, Failed Ajax request or invalid JSON error occurred.

Steps I took leading up to the issue
For example:

  1. click on the plugin
  2. Click the setting button
  3. error

What application are you using?
OJS 3.4.0-8
pkp pn 3.0.0.1

Additional information

thrown in /home/jurnal/public_html/ojs/cache/t_compile/d3401674d630564573cea1b257d7f257507eb57b^c69129f5094da2775ab3812198631f49c46c6e60_0.plugins-17-plugins-generic-pln-generic-pln.settings.tpl.php on line 116
#16 {main}
#15 /home/jurnal/public_html/ojs/index.php(21): PKP\core\PKPApplication->execute()
#14 /home/jurnal/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#13 /home/jurnal/public_html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route(Object(APP\core\Request))
#12 /home/jurnal/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array)
#11 /home/jurnal/public_html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#10 [internal function]: PKP\controllers\grid\plugins\PluginGridHandler->manage(Array, Object(APP\core\Request))
#9 /home/jurnal/public_html/ojs/lib/pkp/classes/controllers/grid/plugins/PluginGridHandler.php(282): APP\plugins\generic\pln\PlnPlugin->manage(Array, Object(APP\core\Request))
#8 /home/jurnal/public_html/ojs/plugins/generic/pln/PlnPlugin.php(357): APP\plugins\generic\pln\classes\form\SettingsForm->fetch(Object(APP\core\Request))
#7 /home/jurnal/public_html/ojs/plugins/generic/pln/classes/form/SettingsForm.php(114): PKP\form\Form->fetch(Object(APP\core\Request), NULL, false)
#6 /home/jurnal/public_html/ojs/lib/pkp/classes/form/Form.php(217): PKP\template\PKPTemplateManager->fetch('plugins-17-plug...')
#5 /home/jurnal/public_html/ojs/lib/pkp/classes/template/PKPTemplateManager.php(1208): Smarty_Internal_TemplateBase->fetch('plugins-17-plug...', NULL, 'd3401674d630564...', NULL)
#4 /home/jurnal/public_html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, 'd3401674d630564...', NULL, 0)
#3 /home/jurnal/public_html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 0)
#2 /home/jurnal/public_html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#1 /home/jurnal/public_html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#0 /home/jurnal/public_html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_675f9688ca4950_25007329(Object(Smarty_Internal_Template))
Stack trace:
[22-Dec-2024 20:18:40] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/jurnal/public_html/ojs/cache/t_compile/d3401674d630564573cea1b257d7f257507eb57b^c69129f5094da2775ab3812198631f49c46c6e60_0.plugins-17-plugins-generic-pln-generic-pln.settings.tpl.php:116

line 116 is

<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['fbvElement'][0], array( array('type'=>"checkbox",'name'=>"terms_agreed[".((string)$_smarty_tpl->tpl_vars['term_name']->value)."]",'id'=>"terms_agreed[".((string)$_smarty_tpl->tpl_vars['term_name']->value)."]",'value'=>"1",'checked'=>$_smarty_tpl->tpl_vars['checked']->value,'label'=>$_smarty_tpl->tpl_vars['term_data']->value['term'],'translate'=>false),$_smarty_tpl ) );?>

before this i was on 3.4.0.5 but i didnt enable pkp pn. before that on 3.3.0.8 i have enable the plugin and been successfully deposit through pkp pn.

Hi!

This is the first time I see such report, how did you install the plugin? There are migrations to update the database and looks like they were not executed.

Please, execute the following queries in your database and share with me the output:

describe pln_deposits;
select * from plugin_settings where plugin_name = 'plnplugin' and setting_name = 'terms_of_use_agreement';

Best,
Jonas Raoni

thanks for the reply.

from version 3.3.0.8 the plugin is working.

When we first upgrade from 3.3.0.8 to 3.4.0.5, there is no pkp pn plugin that support for version 3.4 so i just left it disable.

when we upgrade to 3.4.0.8 there is the plugin error like this

so i uninstall and install the latest plugin from the list.

thats when another error missing tables come up which i solve by following guide…

after that this current error come up…

i then uninstall the plug in and install it back then there is no error…

so the error is solve by uninstalling and install back the plug in.

I’d need a reproduction case to understand what was happening.
Anyway, is you problem solved?

Best,
Jonas Raoni

Yes… by uninstalling and installing back the plugin using the recomended step through the plugin page.

Thanks, I’ll check the feasibility of always running the upgrades for this plugin in case more reports appear. It’s not ideal, but should solve the issue.

Best,
Jonas