Call to method setCurrentUri fails in Symfony/SonataUserBundle setup

后端 未结 3 957
南笙
南笙 2021-01-17 18:26

I am trying to set up Symfony with the SonataUserBundle. User registration and login works fine. When I try to call up the /profile view, however I get the foll

3条回答
  •  -上瘾入骨i
    2021-01-17 19:01

    I had same issue, This is my solution that you can preserve KnpMenu V2.

    -You change setCurrentUri to setCurrent (because KNP changed code) in C:\path\vendor\sonata-project\user-bundle\Block\ProfileMenuBlockService.php

    -You can have this problem, Method "currentAncestor" for object "Knp\Menu\MenuItem" does not exist in Sonata

    And this works for me.

提交回复
热议问题