OJS 31: Error in settings in “Navigation Menus” tab in site level

Hi,

I upgraded recently from OJS2 to OJS31.
I have errors occurred in “Navigation Menus” tab in site level while errors don’t occurred in “Navigation Menus” tab in a journal level.

I noticed 2 different errors in this topic. The first one was because of my php version which was < to php 5.6
But now my php version is php 5.6.x, and I still have the error occurred in “Navigation Menus” tab in site level.
I permit myself to open a new topic of this specific subject.

When I go to the menu “settings” in “Navigation Menus” tab on site level Administration for example with this fake link:
http://portal-journals.org/ojs3/index.php/index/admin/settings

When I want to edit or add “Navigation Menu Items”, a pop-up appears with the following error:
Failed Ajax request or invalid JSON returned

And I have this message in error log file:

PHP Fatal error: Call to a member function getPath() on a non-object in /var/www/ojs3/cache/t_compile/afdbc343a85db3051c96acebe4dc1fed0244d413^%%56^56A^56A06BB9%%navigationMenuItemsForm.tpl.php on line 62, referer: http://portal-journals.org/ojs3/index.php/index/admin/settings

And there is the code on line 62 of /var/www/ojs3/cache/t_compile/*navigationMenuItemsForm.tpl.php file

<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_plugins['function']['url'][0][0]->smartyUrl(array('router' => @ROUTE_PAGE,'context' => $this->_tpl_vars['currentContext']->getPath(),'page' => 'navigationMenu','op' => 'view','path' => 'REPLACEME'), $this))) ? $this->_run_mod_handler('replace', true, $_tmp, 'REPLACEME', "%PATH%") : smarty_modifier_replace($_tmp, 'REPLACEME', "%PATH%")))) ? $this->_run_mod_handler('assign', true, $_tmp, 'exampleUrl') : $this->_plugins['modifier']['assign'][0][0]->smartyAssign($_tmp, 'exampleUrl'));?>

I cleared the cache many times.

And errors don’t occurred in “Navigation Menus” tab in a journal level for example with this fake link:
http://portal-journals.org/ojs3/index.php/journal1/management/settings/website

Thanks in advance for your help.
Best regards
Helene

Hi Helene,

Thanks for posting a new topic about this. What locale are you using on your site?

Best,
Amanda Stevens
Public Knowledge Project Team

Hi Amanda @astevens,

On OJS site level, we are using the following locales: French (from France as primary locale) and English.
As your question made me think it could a problem of locale, I did a fresh install of OJS3 by choosing only English as locale and so as primary locale and I still have the same error.

To me, it’s like context “0” of level site is not recognized while contexts of journals (1,2, etc.) are well recognized.

Thanks again for your help.
Best regards
Helene

Hi Helene,

It looks like this is a bug in 3.1 that is being worked on. You can follow the progress here: NavigationMenus - Custom Page Error on Site level · Issue #3080 · pkp/pkp-lib · GitHub

Best,
Amanda Stevens
Public Knowledge Project Team

Hi Amanda @astevens,

I was afraid that my first request was not taken into consideration and in fact it was just the opposite, it was the subject of a specific issue but I didn’t have this information.
Thank you for keeping me informed.

Best regards
Helene

Hi Helene,

Yes, I’m sorry that wasn’t communicated better by us.

Best,
Amanda Stevens
Public Knowledge Project Team