BugBuster1701 / contao-dlstats-statistic-export-bundle

Contao 4/5 dlstats Bundle Add-on: Statistic Export
GNU Lesser General Public License v3.0
3 stars 0 forks source link

Internal Server Error with Export on Contao 4.12.x #14

Closed hwit-biz closed 3 years ago

hwit-biz commented 3 years ago

Hi there,

probably due to changed Symfony behaviour of current version 5 with the definition of services there actually appears an error while exporting dlstats via the contao-dlstats-statistic-export-bundle:

Internal Server Error Was ist das Problem? "BugBuster\DlstatsExportBundle\Controller\ExportController" has no container set, did you forget to define it as a service subscriber?

I could fix the error by inserting some code for the ExportController service to the corresponding file services47.yml as following:

services:
    bugbuster.dlstatsexport.form.type.request_token:
        class: BugBuster\DlstatsExportBundle\Form\Type\RequestTokenType
        arguments:
          ['@security.csrf.token_manager', '%contao.csrf_token_name%']
        tags:
            - form.type

    BugBuster\DlstatsExportBundle\Controller\ExportController:
        class: BugBuster\DlstatsExportBundle\Controller\ExportController
        autowire: true
        public: true
        arguments:
            - "@service_container"

Hope this helps you, Harry.

Edit: Fixed typo and link to services.47.yml

BugBuster1701 commented 3 years ago

Thanks for the hint