gourmet / knp-menu

CakePHP 3 plugin to support KnpMenu
MIT License
14 stars 3 forks source link

'undefined menu' Exception with Cakephp 3.1 beta2 #4

Open repher opened 9 years ago

repher commented 9 years ago

Hey!

I know it's stil beta, but i need to upgrad as soon as possible so i tested everything today.

The menu works without any problems on 3.0.11 but after the upgrade the helper doe not find any menus. Everything works until i call the following in my template.

echo $this->Menu->render('menu_left'); 

Error message:

undefined menu

The beforeRender() callback in MenuComponent.php gets called. I also can confirm, that - within the callback method - after setting the menu variable it is set in the `$event->subject() but coming back from the callback it is not there anymore ...

Bernhard

jadb commented 9 years ago

I started some changes here - and the very minimal tests are passing but that checks the variable after the callback.

The 3.1 branch is constantly updated and some changes have been happening to the view layer so without the exact commit and a failing test, I can't really look more into it.

repher commented 9 years ago

well thanks! Can you point me at what is changed in the view layer? I just don't get it ...