File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1515use Sonata \AdminBundle \Admin \AdminExtension ;
1616use Sonata \AdminBundle \Admin \AdminInterface ;
1717use Symfony \Bundle \FrameworkBundle \Translation \Translator ;
18+ use Symfony \Cmf \Bundle \RoutingBundle \Doctrine \Phpcr \PrefixInterface ;
1819use Symfony \Cmf \Component \Routing \RouteReferrersReadInterface ;
1920use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
2021use Symfony \Component \Routing \Exception \ExceptionInterface as RoutingExceptionInterface ;
@@ -68,6 +69,11 @@ public function configureTabMenu(
6869 );
6970 }
7071
72+ if ($ subject instanceof PrefixInterface && !is_string ($ subject ->getId ())) {
73+ // we have an unpersisted dynamic route
74+ return ;
75+ }
76+
7177 try {
7278 $ uri = $ this ->router ->generate ($ subject );
7379 } catch (RoutingExceptionInterface $ e ) {
You can’t perform that action at this time.
0 commit comments