Go to the menu items page:
joomla.example.com/administrator/index.php?option=com_menus&view=items
Choose a menu from the - Select menu - search tools dropdown.
Then go and edit the chosen menu:
joomla.example.com/administrator/index.php?option=com_menus&view=menu&layout=edit&id=<id of the menu type chosen in the previous page's search filter>
Change the menu's Menu Type.
Now go back to the first page. It crashes with a 500 Joomla error and there is no way to view the menu items anymore unless (I guess) logging out and logging back in or resetting the server session or reverting the menu type of the chosen menu to its old value.
The joomla.example.com/administrator/index.php?option=com_menus&view=items
page should work with the updated menu type in the filter or at least the filter should get reset.
The joomla.example.com/administrator/index.php?option=com_menus&view=items
page becomes unusable.
systeminfo-2017-10-03T17-39-37+03-00.txt
Worst case scenario the strict check for existing menu type should be removed from:
administrator/components/com_menus/models/items.php:150
(removing the second parameter from the call to MenusModelItems::getMenu()
thus leaving the default value of false and preventing the raising of a fatal error)
...and reset the menu type filter user, app and view state by adding a fallback case in:
administrator/components/com_menus/models/items.php:159
else { // WE ALSO ADD A CASE WHICH RESETS THE FILTERS TO THEIR DEFAULT VALUES
$app->input->set('limitstart', 0);
$app->input->set('menutype', '');
$app->setUserState($this->context . '.menutype', '');
$this->setState('menutypetitle', '');
$this->setState('menutypeid', '');
}
A better approach would be to add awareness for the user state to:
administrator/components/com_menus/models/menu.php:194
MenusModelMenu::save()
method and update the user state with the new menu type value.
Status | New | ⇒ | Confirmed |
Status changed on issue Tracker on "Confirmed".
For me the error handling looks natural as far as how Joomla works.
After the steps mentioned above, we indeed get that error. However, navigating to any other link, or "All Menu Items".
Going just to that particular link doesn't work because changing the menutype has made that link void. If we are using custom admin menu, we need to change the link too. If using presets it is updated automatically.
@izharaazmi so its expected Behaviour?
To me yes. Someone may want to review my opinion though.
No it's not expected behaviour. The problem is that the filter has been stored and you cannot get to a page to reset it
@izharaazmi the administration is not supposed to break down and spit out an obscure 500 error and render one of its pages unusable. Given the fact that it is also very easy to fix I don't see a reason to advocate leaving this bug lingering to manifest in one of the most used core components of Joomla!.
Fix coming.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-14 08:09:08 |
Closed_By | ⇒ | zero-24 |
Confirmed