Unable add Remot URL in primary menu (OJS-3.3.0-12)

I am using OJS-3.3.0-12 and I want to add one remote URL in the primary menu through the admin panel but am unable to add it.
During adding the menu form was stuck. Below is mentioned error log during adding the remote URL.

[11-Oct-2022 13:27:13 Asia/Kolkata] PHP Fatal error:  Uncaught Error: Call to a member function getPrimaryLocale() on null in /EPUB/ojs/lib/pkp/controllers/grid/navigationMenus/form/PKPNavigationMenuItemsForm.inc.php:227
Stack trace:
#0 /EPUB/ojs/lib/pkp/controllers/grid/navigationMenus/NavigationMenuItemsGridHandler.inc.php(164): PKPNavigationMenuItemsForm->validate()
#1 /EPUB/ojs/lib/pkp/classes/core/PKPRouter.inc.php(395): NavigationMenuItemsGridHandler->updateNavigationMenuItem()
#2 /EPUB/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest()
#3 /EPUB/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route()
#4 /EPUB/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#5 /EPUB/ojs/index.php(68): PKPApplication->execute()
#6 {main}
  thrown in /EPUB/ojs/lib/pkp/controllers/grid/navigationMenus/form/PKPNavigationMenuItemsForm.inc.php on line 227

Hi @shantanusingh

I also had the same issue, what I edited a validation in the file
lib/pkp/controllers/grid/navigationMenus/form/PKPNavigationMenuItemsForm.inc.php line 227 in OJS 3.3.0-13 condition it to journal and not to the site

if (!empty($context)) {
           if($locale !== $context->getPrimaryLocale() && $remoteUrl == '') continue;
}

Hope it helps

3 Likes