SonataClassificationBundle icon indicating copy to clipboard operation
SonataClassificationBundle copied to clipboard

[5.x] Admin routes are "ugly" after upgade to SonataAdmin 4

Open haivala opened this issue 2 years ago • 2 comments

Does this even belong here?

This actually effects many sonata bundles like PageBundle and MediaBundle

Routes are now:

  • /admin/app/sonata-sonataclassificationcontext/*
  • /admin/app/sonata-sonataclassificationcategory/*
  • /admin/app/sonata-sonataclassificationtag/*
  • /admin/app/sonata-sonataclassificationcollection/*

Before they were neat like this

  • /admin/sonata/classification/category/list

I'm just pointing this out. Not sure If there is something we need to do about it, but in a perfect world everything would be perfect :D

haivala avatar Sep 29 '22 06:09 haivala

This normally depends on your full classname of YOUR entities created on your code. Can you show the full classname to confirm it?

jordisala1991 avatar Sep 29 '22 06:09 jordisala1991

Okay! I did not know that. I have src/Entity/Sonata/SonataClassificationContext.php Which resolves to App\Entity\Sonata\SonataClassificationContext and that is in line with you comment.

What should I do to get those urls? add autoload {'Sonata\': "src/Entity/Sonata} and move the class to src/Entity/Sonata/Classification/Context.php ?

haivala avatar Sep 29 '22 07:09 haivala

I don't think we have anything to do here. The url will depend on the name of your entity. You can call if Context instead of SonataClassificationContext (the example assumes you don't want collisions with your other entities).

jordisala1991 avatar Mar 04 '23 10:03 jordisala1991