Build 398 - Modifying existing side menus throws exception in backend

Release Note 6

There have been some improvements to the internals of the NavigationManager class which may cause an exception between Build 398 and Build 408.

Due to improvements to logic in Backend\Classes\NavigationManager made in octobercms/october@462c9cd (becoming available in Build 398), extending existing menu items through the backend.menu.extendItems event could trigger the following exception:

Type error: Argument 4 passed to Backend\Classes\NavigationManager::addSideMenuItem() must be of the type array, object given, called in ../modules/backend/classes/NavigationManager.php on line 250

This would occur when extending menu items that had side menus, causing them to be run through the addSideMenuItem() method again. Since the side menu definitions are stored as stdClass objects in memory once they have been defined for the first time, passing these objects to Backend\Classes\Navigation->addSideMenuItem() would throw a type error as that method requires the side menu definition argument to be of type array. This was identified and fixed in octobercms/october@d1c9b1a, becoming available in Build 408.

Installations affected

If you are running any build between 398 and 408 your installation is affected and will throw an exception if a plugin attempts to extend existing menu items. Known plugins that will trigger this issue only include NetSTI.Backend so far.

Action required

Update to Build 408. If this issue is currently affecting you and you are unable to login to the backend in order to update, then disable the NetSTI.Backend plugin by temporarily renaming the plugin folder for that plugin. You should then be able to login and upgrade your build; at which point the plugin can be safely re-enabled.

Related issues

comments powered by Disqus