Failed Ajax request in adding section

Hi Dear friends!
I’m trying to add a section in my journal but I faced with this invalid return for Ajax, What should I do, also this is my php error log:

[22-Nov-2024 19:02:50 Asia/Kabul] PHP Fatal error: Uncaught TypeError: PKP\section\Repository::get(): Argument #1 ($id) must be of type int, null given, called in /home/kjnorg/public_html/plugins/generic/browseBySection/BrowseBySectionPlugin.php on line 159 and defined in /home/kjnorg/public_html/lib/pkp/classes/section/Repository.php:58
Stack trace:
#0 /home/kjnorg/public_html/plugins/generic/browseBySection/BrowseBySectionPlugin.php(159): PKP\section\Repository->get(NULL, 1)
#1 [internal function]: APP\plugins\generic\browseBySection\BrowseBySectionPlugin->initDataSectionFormFields(‘sectionform::in…’, Array)
#2 /home/kjnorg/public_html/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Array, Array)
#3 /home/kjnorg/public_html/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run(‘sectionform::in…’, Array)
#4 /home/kjnorg/public_html/lib/pkp/classes/form/Form.php(266): PKP\plugins\Hook::call(‘sectionform::in…’, Array)
#5 /home/kjnorg/public_html/lib/pkp/controllers/grid/settings/sections/form/PKPSectionForm.php(170): PKP\form\Form->initData()
#6 /home/kjnorg/public_html/controllers/grid/settings/sections/form/SectionForm.php(81): PKP\controllers\grid\settings\sections\form\PKPSectionForm->initData()
#7 /home/kjnorg/public_html/controllers/grid/settings/sections/SectionGridHandler.php(214): APP\controllers\grid\settings\sections\form\SectionForm->initData()
#8 /home/kjnorg/public_html/controllers/grid/settings/sections/SectionGridHandler.php(196): APP\controllers\grid\settings\sections\SectionGridHandler->editSection(Array, Object(APP\core\Request))
#9 [internal function]: APP\controllers\grid\settings\sections\SectionGridHandler->addSection(Array, Object(APP\core\Request))
#10 /home/kjnorg/public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#11 /home/kjnorg/public_html/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array)
#12 /home/kjnorg/public_html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route(Object(APP\core\Request))
#13 /home/kjnorg/public_html/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#14 /home/kjnorg/public_html/index.php(21): PKP\core\PKPApplication->execute()
#15 {main}
thrown in /home/kjnorg/public_html/lib/pkp/classes/section/Repository.php on line 58

Thanks for your help.

Hi @Naqibullah_Asadi_Kar,

Can you please note which specific version you’re using (e.g. 3.3.0-18)?
Please indicate this when posting questions on the forum, as it it is important for those who might assist in troubleshooting.

-Roger
PKP Team

Hi Roger
Thanks
I’m using ojs-3.4.0-7.

What happens if you disable the BrowseBySection plugin temporarily?

Hi @Naqibullah_Asadi_Kar,

We have a new release available for the “Browse by Section” plugin in the plugin gallery that should resolve this for you - can you try updating the plugin (in Settings > Website > Plugins > Plugin Gallery) and see if you can create a section now?


Kaitlin Newson
PKP Team