stwe / DatatablesBundle

This Bundle integrates the jQuery DataTables plugin into your Symfony application.
355 stars 236 forks source link

DatatableController has no container set error after Symfony5 upgrade #955

Closed davidmorenonuez closed 3 years ago

davidmorenonuez commented 4 years ago

Greetings,

I'm getting this error when using the "In-place editing" feature of stwe/Datatables.

"Sg\DatatablesBundle\Controller\DatatableController" has no container set, did you forget to define it as a service subscriber?

It was working fine in Symfony 4 but started failing when I upgraded.

Any ideas on how to solve?

Anotación 2020-07-26 024404

Anotación 2020-07-26 024404s

Thank you and kind regards, David Moreno.

knallcharge commented 4 years ago

Can confirm, happens for me, too, after upgrading to Symfony 5 (4.4 still works fine).

knallcharge commented 4 years ago

Don't think this is a proper fix, but I got it to work by adding this to my services.yaml:

 Sg\DatatablesBundle\Controller\DatatableController:
        calls: [['setContainer', ['@Psr\Container\ContainerInterface']]]
davidmorenonuez commented 4 years ago

Don't think this is a proper fix, but I got it to work by adding this to my services.yaml:

 Sg\DatatablesBundle\Controller\DatatableController:
        calls: [['setContainer', ['@Psr\Container\ContainerInterface']]]

That worked, thanks.