Bug JavascriptBuilder
Closed this issue · 6 comments
PHP 7.3
Contao 4.4.55
Maps 3.2.3
Symfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to Netzmacht\JavascriptBuilder\Symfony\EventDispatchingEncoder::__construct() must be an instance of Symfony\Contracts\EventDispatcher\EventDispatcherInterface, instance of Symfony\Component\EventDispatcher\EventDispatcher given, called in /kunden/xyz.de/vendor/netzmacht/contao-leaflet-maps/src/Encoder/EncoderFactory.php on line 58
at vendor/netzmacht/php-javascript-builder/src/Symfony/EventDispatchingEncoder.php:40
at Netzmacht\JavascriptBuilder\Symfony\EventDispatchingEncoder->__construct(object(EventDispatcher))
(vendor/netzmacht/contao-leaflet-maps/src/Encoder/EncoderFactory.php:58)
at Netzmacht\Contao\Leaflet\Encoder\EncoderFactory->__invoke(object(Output))
(vendor/netzmacht/php-javascript-builder/src/Builder.php:90)
at Netzmacht\JavascriptBuilder\Builder->encode(object(Map), 16448)
(vendor/netzmacht/php-leaflet/src/Netzmacht/LeafletPHP/Leaflet.php:167)
at Netzmacht\LeafletPHP\Leaflet->build(object(Map), object(ContaoAssets))
(vendor/netzmacht/contao-leaflet-maps/src/MapProvider.php:374)
at Netzmacht\Contao\Leaflet\MapProvider->doGenerate(object(MapModel), null, 'map_ce_361', 'leaflet_map_js', '')
(vendor/netzmacht/contao-leaflet-maps/src/MapProvider.php:223)
at Netzmacht\Contao\Leaflet\MapProvider->generate('1', null, 'map_ce_361', 'leaflet_map_js')
(vendor/netzmacht/contao-leaflet-maps/src/Frontend/AbstractMapHybrid.php:127)
at Netzmacht\Contao\Leaflet\Frontend\AbstractMapHybrid->prepareTemplateData(array('id' => '361', 'pid' => '7', 'ptable' => 'tl_article', 'sorting' => '640', 'tstamp' => '1657806882', 'type' => 'leaflet', 'headline' => '', 'text' => null, 'addImage' => '', 'overwriteMeta' => '', 'singleSRC' => null, 'alt' => '', 'imageTitle' => '', 'size' => '', 'imagemargin' => '', 'imageUrl' => '', 'fullsize' => '', 'caption' => '', 'floating' => 'above', 'html' => null, 'listtype' => '', 'listitems' => null, 'tableitems' => null, 'summary' => '', 'thead' => '', 'tfoot' => '', 'tleft' => '', 'sortable' => '', 'sortIndex' => '0', 'sortOrder' => 'ascending', 'mooHeadline' => '', 'mooStyle' => '', 'mooClasses' => '', 'highlight' => '', 'code' => null, 'url' => '', 'target' => '', 'titleText' => '', 'linkTitle' => '', 'embed' => '', 'rel' => '', 'useImage' => '', 'multiSRC' => null, 'orderSRC' => null, 'useHomeDir' => '', 'perRow' => '4', 'perPage' => '0', 'numberOfItems' => '0', 'sortBy' => '', 'metaIgnore' => '', 'galleryTpl' => '', 'customTpl' => '', 'playerSRC' => null, 'youtube' => '', 'vimeo' => '', 'posterSRC' => null, 'playerSize' => '', 'autoplay' => '', 'sliderDelay' => '0', 'sliderSpeed' => '300', 'sliderStartSlide' => '0', 'sliderContinuous' => '', 'cteAlias' => '0', 'articleAlias' => '0', 'article' => '0', 'form' => '0', 'module' => '0', 'protected' => '', 'groups' => null, 'guests' => '', 'cssID' => '', 'invisible' => '', 'start' => '', 'stop' => '', 'bs_grid_name' => '', 'bs_tab_nav_class' => '', 'bs_tab_content_class' => '', 'bs_tab_fade' => '', 'bs_tab_nav_position' => '', 'bs_tabs' => null, 'bs_tab_name' => '', 'bs_tab_parent' => '0', 'bs_panel_name' => '', 'bs_expanded' => '0', 'bs_image_sizes' => null, 'bs_grid_parent' => '0', 'bs_grid' => '0', 'bootstrap_dataAttributes' => null, 'formLayout' => '0', 'rsce_data' => null, 'leaflet_template' => 'leaflet_map_js', 'leaflet_height' => 'a:2:{s:4:"unit";s:2:"px";s:5:"value";s:3:"300";}', 'leaflet_width' => 'a:2:{s:4:"unit";s:1:"%";s:5:"value";s:3:"100";}', 'leaflet_mapId' => '', 'leaflet_map' => '1', 'wowjsIteration' => null, 'wowjsOffset' => null, 'wowjsDelay' => '', 'wowjsDuration' => '', 'wowjsAnimation' => '', 'owl_slide_template' => '', 'owl_carousel' => '0', 'playerAspect' => '', 'classes' => array('last'), 'typePrefix' => 'ce_', 'hl' => 'h1', 'style' => '', 'class' => 'ce_leaflet col-md-12 last', 'inColumn' => 'main'))
(vendor/netzmacht/contao-toolkit/src/Component/AbstractComponent.php:198)
at Netzmacht\Contao\Toolkit\Component\AbstractComponent->generate()
(vendor/netzmacht/contao-toolkit/src/Component/Module/AbstractModule.php:76)
at Netzmacht\Contao\Toolkit\Component\Module\AbstractModule->generate()
(vendor/netzmacht/contao-toolkit/src/Component/Hybrid/AbstractHybrid.php:43)
at Netzmacht\Contao\Toolkit\Component\Hybrid\AbstractHybrid->generate()
(vendor/netzmacht/contao-leaflet-maps/src/Frontend/AbstractMapHybrid.php:112)
at Netzmacht\Contao\Leaflet\Frontend\AbstractMapHybrid->generate()
(vendor/netzmacht/contao-toolkit/src/Component/ComponentDecoratorTrait.php:70)
at Netzmacht\Contao\Toolkit\Component\ContentElement\ContentElementDecorator->generate()
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:477)
at Contao\Controller::getContentElement(object(ContentModel), 'main')
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:182)
at Contao\ModuleArticle->compile()
(vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:219)
at Contao\Module->generate()
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:64)
at Contao\ModuleArticle->generate(false)
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:417)
at Contao\Controller::getArticle(object(ArticleModel), false, false, 'main')
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:279)
at Contao\Controller::getFrontendModule('0', 'main')
(vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:176)
at Contao\PageRegular->prepare(object(PageModel))
(vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:46)
at Contao\PageRegular->getResponse(object(PageModel), true)
(vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:308)
at Contao\FrontendIndex->renderPage(object(Collection))
(vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:74)
at Contao\FrontendIndex->run()
(vendor/contao/core-bundle/src/Controller/FrontendController.php:42)
at Contao\CoreBundle\Controller\FrontendController->indexAction()
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(web/app_dev.php:69)
Same here:
PHP 7.4.30
Contao 4.4.57
Maps 3.2.2
The error is thrown if a user visits a site where the leaflet module is included.
Same here:
PHP Version 7.4.10
Contao 4.4.57
Maps 3.2.2 (and 3.2.1, 3.2.0 and 3.1.7)
Frontend works with Contao 4.4.54 and PHP Version 8.1.14-he.0 (Hosteurope, hence the move).
Will an update to Contao 4.13 and Maps 3.2.3 fix the issue?
@Webstylerin der PR sollte das beheben.. #118
@Webstylerin der PR sollte das beheben.. #118
Vielen Dank für den Hinweis, mit dem PR selbst kann ich selbst leider nichts wirklich was anfangen. Ich hoffe, der PR passt und wird bald eingespielt.
siehe https://metamodels.readthedocs.io/de/latest/manual/install.html#test-von-speziellen-paketen
sollte mit
dev-hoftix/metamodels as 2.3.3
gehen
Contao 4.4 is not supported anymore by this extension.