sonata-project/SonataFormatterBundle#669
- If not already done, install Docker Compose
- Run
docker-compose build --pull --no-cache
to build fresh images - Run
docker-compose up
(the logs will be displayed in the current shell) - Run
symfony server:start
- Run
php bin/console doctrine:database:create
- Run
php bin/console doctrine:schema:update --force
- Run
bin/console ckeditor:install
- Run
in/console assets:install
- Run
docker-compose down --remove-orphans
to stop the Docker containers.
- Navigate to https://127.0.0.1:8000/admin/app/article/create
- Click on image icon in FCK editor
- Click on Browse Server window with error opens "Sonata\FormatterBundle\Controller\CkeditorAdminController" has no container set, did you forget to define it as a service subscriber?"
- Navigate to upload tab select file and click upload - error message is displayed inline "Sonata\FormatterBundle\Controller\CkeditorAdminController" has no container set, did you forget to define it as a service subscriber?"
-
check in symfony/framework-bundle/Controller/ControllerResolver.php
`if ($controller instanceof ContainerAwareInterface) { $controller->setContainer($this->container); } if ($controller instanceof AbstractController) { if (null === $previousContainer = $controller->setContainer($this->container)) { throw new \LogicException(sprintf('"%s" has no container set, did you forget to define it as a service subscriber?', $class)); } else { $controller->setContainer($previousContainer); } }`
fails because the container is not set in Sonata\FormatterBundle\Controller\CkeditorAdminController
-
CkeditorAdminController does not implement ContainerAwareInterface
-
Container is not injected in any other way during the initialization
-
I didn't find in the sonata formatter docs information describing a way or a need to inject container manually