Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service "pix_sortable_behavior.position.orm" not found #92

Open
nilov opened this issue Oct 26, 2021 · 3 comments
Open

Service "pix_sortable_behavior.position.orm" not found #92

nilov opened this issue Oct 26, 2021 · 3 comments

Comments

@nilov
Copy link
Contributor

nilov commented Oct 26, 2021

Service "pix_sortable_behavior.position.orm" not found: even though it exists in the app's container, the container inside "Pix\SortableBehaviorBundle\Controller\SortableAdminController" is a smaller service locator that only knows about the "doctrine", "form.factory", "http_kernel", "logger", "parameter_bag", "request_stack", "router", "security.authorization_checker", "security.csrf.token_manager", "security.token_storage", "serializer", "session", "sonata.admin.audit.manager", "sonata.admin.object.manipulator.acl.admin", "sonata.admin.pool", "sonata.admin.request.fetcher", "translator" and "twig" services. Try using dependency injection instead.

@TheFox
Copy link

TheFox commented May 11, 2022

@nilov Did you find a solution for this problem?

@er1z
Copy link

er1z commented Aug 26, 2022

The easiest way is to copy the controller to app scope and replace all dependencies with recent ones.

And then:

App\Controller\Admin\SortableAdminController:
   arguments:
      $positionHandler: '@pix_sortable_behavior.position'
   tags:
      - controller.service_subscriber

@dmitryuk
Copy link

Sonata admin officially migrated to runroom-packages/sortable-behavior-bundle, try it instead.
https://symfony.com/bundles/SonataAdminBundle/current/cookbook/recipe_sortable_listing.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants