sonata-project / SonataPageBundle

This bundle provides a Site and Page management through container and block services
https://docs.sonata-project.org/projects/SonataPageBundle
MIT License
219 stars 210 forks source link

Action "compose" could not be found in access mapping. #1498

Closed eerison closed 2 years ago

eerison commented 2 years ago

The compose page is not working

Steps:

you should get an internal server error:

Action "compose" could not be found in access mapping. Please make sure your action is defined into your admin class accessMapping property.

Stack trace

InvalidArgumentException:
Action "compose" could not be found in access mapping. Please make sure your action is defined into your admin class accessMapping property.

  at vendor/sonata-project/admin-bundle/src/Admin/AbstractAdmin.php:1692
  at Sonata\AdminBundle\Admin\AbstractAdmin->checkAccess('compose')
     (vendor/sonata-project/page-bundle/src/Controller/PageAdminController.php:158)
  at Sonata\PageBundle\Controller\PageAdminController->composeAction(object(Request))
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:29)     
VincentLanglet commented 2 years ago

This property https://github.com/sonata-project/SonataPageBundle/blob/4.x/src/Admin/PageAdmin.php#L51 must be moved into this method https://github.com/sonata-project/SonataAdminBundle/blob/4.x/src/Admin/AbstractAdmin.php#L2166

Same should be done for others admins.

Can one of you make the PR @eerison @Hanmac ?

Hanmac commented 2 years ago

This property https://github.com/sonata-project/SonataPageBundle/blob/4.x/src/Admin/PageAdmin.php#L51 must be moved into this method https://github.com/sonata-project/SonataAdminBundle/blob/4.x/src/Admin/AbstractAdmin.php#L2166

Same should be done for others admins.

Can one of you make the PR @eerison @Hanmac ?

i assume as MR for 4.x ?

eerison commented 2 years ago

This property https://github.com/sonata-project/SonataPageBundle/blob/4.x/src/Admin/PageAdmin.php#L51 must be moved into this method https://github.com/sonata-project/SonataAdminBundle/blob/4.x/src/Admin/AbstractAdmin.php#L2166 Same should be done for others admins. Can one of you make the PR @eerison @Hanmac ?

i assume as MR for 4.x ?

yes, I guess all PR should be for 4.x now đź‘€