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 15
15
use Sonata \AdminBundle \Admin \AdminExtension ;
16
16
use Sonata \AdminBundle \Admin \AdminInterface ;
17
17
use Symfony \Bundle \FrameworkBundle \Translation \Translator ;
18
+ use Symfony \Cmf \Bundle \RoutingBundle \Doctrine \Phpcr \PrefixInterface ;
18
19
use Symfony \Cmf \Component \Routing \RouteReferrersReadInterface ;
19
20
use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
20
21
use Symfony \Component \Routing \Exception \ExceptionInterface as RoutingExceptionInterface ;
@@ -68,6 +69,11 @@ public function configureTabMenu(
68
69
);
69
70
}
70
71
72
+ if ($ subject instanceof PrefixInterface && !is_string ($ subject ->getId ())) {
73
+ // we have an unpersisted dynamic route
74
+ return ;
75
+ }
76
+
71
77
try {
72
78
$ uri = $ this ->router ->generate ($ subject );
73
79
} catch (RoutingExceptionInterface $ e ) {
You can’t perform that action at this time.
0 commit comments