Closed iamwebrocker closed 1 year ago
Hi,
there's an error when trying to use the "pages selector" function for menu items in the backend - in a non-multilanguage install, but with a (german) language pack installed for the default language, with PW3.0.165 and MenuBuilder 0.2.7
I suspect this is a similar issue as the one back in 2015, and line 2683 in ProcessMenuBuilder.module:
'title' => $title = is_null($language) ? $item->title : $item->title->getLanguageValue($language),
is to blame and the check method_exists(wire('pages')->get($itemID)->title, 'getLanguageValue') also needs to be applied here. I changed the line to:
method_exists(wire('pages')->get($itemID)->title, 'getLanguageValue')
'title' => $title = is_null($language) || !method_exists(wire('pages')->$item->title, 'getLanguageValue') ? $item->title : $item->title->getLanguageValue($language),
and now it works (for my setting)
cheers, and thanks for the great module Tom
Hi,
there's an error when trying to use the "pages selector" function for menu items in the backend - in a non-multilanguage install, but with a (german) language pack installed for the default language, with PW3.0.165 and MenuBuilder 0.2.7
I suspect this is a similar issue as the one back in 2015, and line 2683 in ProcessMenuBuilder.module:
'title' => $title = is_null($language) ? $item->title : $item->title->getLanguageValue($language),
is to blame and the check
method_exists(wire('pages')->get($itemID)->title, 'getLanguageValue')
also needs to be applied here. I changed the line to:'title' => $title = is_null($language) || !method_exists(wire('pages')->$item->title, 'getLanguageValue') ? $item->title : $item->title->getLanguageValue($language),
and now it works (for my setting)
cheers, and thanks for the great module Tom