Closed AndrewSpin closed 3 years ago
A PR should be done to change to sonata.admin.exporter
, can you do it @AndrewSpin ?
Also, if you're inside this if, you should get the following deprecation
'Not registering the exporter bundle is deprecated since version 3.14. You must register it to be able to use the export action in 4.0.',
So registering the ExporterBundle fix the issue.
@VincentLanglet Thanks for fix. I updated to 3.105.0 and it works ok now
Environment
Sonata packages
show
``` sonata-project/admin-bundle 3.104.0 3.104.0 The missing Symfony Admin Generator sonata-project/block-bundle 4.5.3 4.6.0 Symfony SonataBlockBundle sonata-project/cache 2.0.1 2.2.0 Cache library sonata-project/doctrine-extensions 1.12.0 1.13.1 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 3.33.0 3.35.0 Integrate Doctrine ORM into the SonataAdminBundle sonata-project/exporter 2.6.2 2.7.0 Lightweight Exporter library sonata-project/form-extensions 1.9.0 1.9.0 Symfony form extensions sonata-project/twig-extensions 1.5.1 1.7.0 Sonata twig extensions ```
PHP version
Subject
Error with tying download data from list. Action
export
. Now its return error message "You have requested a non-existent service "sonata.admin.exporter.do-not-use". Did you mean this: "sonata.admin.pool.do-not-use"?"As I see, problem located at
vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:970
$exporter = $this->get('sonata.admin.exporter.do-not-use');
Steps to reproduce
Expected results
The datagrid must be downloaded to the file
Actual results
Exception:
"You have requested a non-existent service "sonata.admin.exporter.do-not-use". Did you mean this: "sonata.admin.pool.do-not-use"?"
Stack Trace: at vendor/symfony/dependency-injection/Container.php:289 at Symfony\Component\DependencyInjection\Container->make('sonata.admin.exporter.do-not-use', 1) (vendor/symfony/dependency-injection/Container.php:231) at Symfony\Component\DependencyInjection\Container->get('sonata.admin.exporter.do-not-use') (vendor/symfony/framework-bundle/Controller/ControllerTrait.php:68) at Sonata\AdminBundle\Controller\CRUDController->get('sonata.admin.exporter.do-not-use') (vendor/sonata-project/admin-bundle/src/Controller/CRUDController.php:957) at Sonata\AdminBundle\Controller\CRUDController->exportAction(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:25)