Open kswro opened 8 months ago
Hallo!
I have the same problem with the plugin (and cannot "save" changes to existing sections; see this closed issue: https://github.com/pkp/browseBySection/issues/29).
I am using
Logs
CHANGE EXISTING SECTION
<br/>
<b>Fatal error</b>
: Uncaught Error: Non-static method PKP\i18n\Locale::getPrimaryLocale() cannot be called statically in /var/www/xxx/plugins/generic/browseBySection/BrowseBySectionPlugin.php:217
Stack trace:
#0 [internal function]: APP\plugins\generic\browseBySection\BrowseBySectionPlugin->executeSectionFormFields('sectionform::ex...', Array)
#1 /var/www/xxx/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Array, Array)
#2 /var/www/xxx/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run('sectionform::ex...', Array)
#3 /var/www/xxx/lib/pkp/classes/form/Form.php(350): PKP\plugins\Hook::call('sectionform::ex...', Array)
#4 /var/www/xxx/lib/pkp/controllers/grid/settings/sections/form/PKPSectionForm.php(199): PKP\form\Form->execute(Array)
#5 /var/www/xxx/controllers/grid/settings/sections/form/SectionForm.php(196): PKP\controllers\grid\settings\sections\form\PKPSectionForm->execute()
#6 /var/www/xxx/controllers/grid/settings/sections/SectionGridHandler.php(234): APP\controllers\grid\settings\sections\form\SectionForm->execute()
#7 [internal function]: APP\controllers\grid\settings\sections\SectionGridHandler->updateSection(Array, Object(APP\core\Request))
#8 /var/www/xxx/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#9 /var/www/xxx/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array)
#10 /var/www/xxx/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route(Object(APP\core\Request))
#11 /var/www/xxx/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#12 /var/www/xxx/index.php(21): PKP\core\PKPApplication->execute()
#13 {main}
thrown in <b>/var/www/xxx/plugins/generic/browseBySection/BrowseBySectionPlugin.php</b>
on line <b>217</b>
<br/>
CREATE NEW SECTION
<br/>
<b>Fatal error</b>
: Uncaught TypeError: PKP\section\Repository::get(): Argument #1 ($id) must be of type int, null given, called in /var/www/xxx/plugins/generic/browseBySection/BrowseBySectionPlugin.php on line 159 and defined in /var/www/xxx/lib/pkp/classes/section/Repository.php:58
Stack trace:
#0 /var/www/xxx/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 /var/www/xxx/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Array, Array)
#3 /var/www/xxx/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run('sectionform::in...', Array)
#4 /var/www/xxx/lib/pkp/classes/form/Form.php(266): PKP\plugins\Hook::call('sectionform::in...', Array)
#5 /var/www/xxx/lib/pkp/controllers/grid/settings/sections/form/PKPSectionForm.php(170): PKP\form\Form->initData()
#6 /var/www/xxx/controllers/grid/settings/sections/form/SectionForm.php(81): PKP\controllers\grid\settings\sections\form\PKPSectionForm->initData()
#7 /var/www/xxx/controllers/grid/settings/sections/SectionGridHandler.php(214): APP\controllers\grid\settings\sections\form\SectionForm->initData()
#8 /var/www/xxx/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 /var/www/xxx/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request))
#11 /var/www/xxx/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array)
#12 /var/www/xxx/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route(Object(APP\core\Request))
#13 /var/www/xxx/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#14 /var/www/xxx/index.php(21): PKP\core\PKPApplication->execute()
#15 {main}
thrown in <b>/var/www/xxx/lib/pkp/classes/section/Repository.php</b>
on line <b>58</b>
<br/>
Console Screenshots
Describe the bug If the browseBySection plugin is activated, it will not be possible to add sections. When pressing the "Create Section" button in the Journal Settings --> Section menu, an error message appears: "Failed Ajax request or invalid JSON returned."
To Reproduce Steps to reproduce the behavior:
What application are you using?
Log