Closed fracsi closed 6 years ago
@rande can you help?
@fracsi what does the git log say about this?
@greg0ire Not much. I only found this PR: #3578
@fracsi what is you exact problem?
@OskarStark It is just a question. Why is it needed? Or if it is needed, then why it cannot be configured?
always +1 for configuration, would you provide a PR?
Not sure it isn't configurable. The PR you linked to says it is a default value. The variable this goes into is named groupDefaults
@OskarStark I think it needs more conversation about how it should be done.
Currently:
Configuration.php
)I don't know what should be the best to make it configurable.
@greg0ire If you check the usage of groupDefaults, it is passed to the Pool (setAdminGroups), and that is it. The only solution to modify it would be to get the adminGroups from Pool, modify them and reset them.
@OskarStark @greg0ire
One quick solution would be to remove $items[$key]['admin'] = '';
line from Configuration.php
, this way we can configure the menu item as array with an admin id.
E.g.:
sonata_admin:
dashboard:
groups:
test_group:
items:
- { admin: my.admin.service.id, route_absolute: false }
Any thougths?
@amine2z , can you help? Also, can you link your ekino.com email address to your github account?
I don't see the need of an absolute url... but I don't see the issue with absolute url too. If the url is not correct, it just mean the RequestContext is wrong, and should be correctly set either by settings the correct http headers in your RP or by changing the value at the php level.
@rande There is no issue. I just ran across this "feature"/"bug" and found an inconsistency. Because there is a configuration option, but it cannot be configured if using admin service ids. That is it.
as @rande said i dont see what is wrong with this. For the moment route_absolute is not used for admin menu items https://github.com/sonata-project/SonataAdminBundle/blob/3.x/Menu/Provider/GroupMenuProvider.php#L129. @greg0ire i don't see why im pinged too, and why you talk about email adresse 😆
@amine2z : I pinged you because you're the main author of this piece of code, and I had a hard time finding you because you did not link the email address you make your commits with with your github account (and thus, your username).
@amine2z As you can see route_absolute is used for admin: https://github.com/sonata-project/SonataAdminBundle/blob/3.x/Menu/Provider/GroupMenuProvider.php#L110
Hello, as a conclusion, how can I disable this for all groups? thanks you
Is there a specific reason why the generated routes in the sidemenu are absolute?
In the
Configuration.php
the route_absolute: true is hardcoded when using admin ids as items, thus cannot be changed.