tyrannosaurusjames / silverstripe-menumanager-subsites

A module for SilverStripe that makes the heyday/silverstripe-menumanager module compatible with the silverstripe/subsites module
MIT License
2 stars 8 forks source link

BUGFIX: Check that the MenuSet gridfield exists before filtering #6

Closed silverstripe-elliot closed 6 years ago

silverstripe-elliot commented 6 years ago

Hi @guttmann!

I get this error when loading the menumanager on a new subsite: Fatal error: Call to a member function getList() on null in MenuAdminExtension.php on line 15

The issue seems to be that MenuItem is open by default on this installation, so the MenuSet gridfield is not present on the initial load.

To account for this, I've updated the MenuAdminExtension to only apply its logic when the MenuSet gridfield exists

tyrannosaurusjames commented 6 years ago

Thanks @silverstripe-elliot!