- 🇮🇹Italy Niubbo75
Hi, I have update to Leaflet 10.0 via composer, after update I got error and my map doesn't work, here qhat I got:
ArgumentCountError: Too few arguments to function Drupal\leaflet\LeafletService::__construct(), 6 passed in /***/***/****/********/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 7 expected in Drupal\leaflet\LeafletService->__construct() (line 189 of /***/***/****/********/web/modules/contrib/leaflet/src/LeafletService.php) #0 /***/***/****/********/web/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\leaflet\LeafletService->__construct() #1 /***/***/****/********/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService() #2 /***/***/****/********/web/modules/contrib/leaflet/src/Plugin/Field/FieldFormatter/LeafletDefaultFormatter.php(154): Drupal\Component\DependencyInjection\Container->get() #3 /***/***/****/********/web/core/lib/Drupal/Core/Field/FormatterPluginManager.php(64): Drupal\leaflet\Plugin\Field\FieldFormatter\LeafletDefaultFormatter::create() #4 /***/***/****/********/web/core/lib/Drupal/Core/Field/FormatterPluginManager.php(126): Drupal\Core\Field\FormatterPluginManager->createInstance() #5 /***/***/****/********/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(207): Drupal\Core\Field\FormatterPluginManager->getInstance() #6 /***/***/****/********/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(238): Drupal\Core\Entity\Entity\EntityViewDisplay->getRenderer() #7 /***/***/****/********/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php(266): Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple() #8 /***/***/****/********/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(340): Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple() #9 /***/***/****/********/web/core/modules/node/src/NodeViewBuilder.php(24): Drupal\Core\Entity\EntityViewBuilder->buildComponents() #10 /***/***/****/********/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(282): Drupal\node\NodeViewBuilder->buildComponents() #11 /***/***/****/********/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(239): Drupal\Core\Entity\EntityViewBuilder->buildMultiple() #12 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build() #13 /***/***/****/********/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array() #14 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback() #15 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback() #16 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender() #17 /***/***/****/********/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render() #18 /***/***/****/********/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #19 /***/***/****/********/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(243): Drupal\Core\Render\Renderer->executeInRenderContext() #20 /***/***/****/********/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare() #21 /***/***/****/********/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() #22 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() #23 /***/***/****/********/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func() #24 /***/***/****/********/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() #25 /***/***/****/********/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #26 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle() #27 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #28 /***/***/****/********/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #29 /***/***/****/********/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass() #30 /***/***/****/********/web/modules/contrib/services/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle() #31 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\services\StackMiddleware\FormatSetter->handle() #32 /***/***/****/********/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #33 /***/***/****/********/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #34 /***/***/****/********/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle() #35 /***/***/****/********/web/index.php(19): Drupal\Core\DrupalKernel->handle() #36 {main}
if I rollback to 2.2.12 all works as expected, any hint?
Thanks in advance,
Alessandro - 🇮🇹Italy itamair
It looks you didn’t clear/refresh the Drupal cache after the update … (drupal basics)
- 🇩🇰Denmark ressa Copenhagen
Thanks @itamair, it is a joy to use Leaflet 10.x. It works very well, and is highly customizable.
With your help I managed to define setMaxBounds with Leaflet API ( 💬 Document how to set values such as setMaxBounds with Leaflet API Fixed ) and documented it in Leaflet > Leaflet API → , in the new docs system.
But many more of the great features could get documented, so I created a child issue for this.
- 🇩🇰Denmark ressa Copenhagen
@itamair: To give the new Drupal 10 documentation more exposure and get more features documented, perhaps at some point you have time to add a link to it on the project page, as described in the item of tasks in 📌 Document Leaflet 10.x features Active ?
- 🇮🇹Italy itamair
@ressa I accomplished your suggestion, and now you will find a couple of "Drupal Community documentation (WIP)" links in the Drupal.org project page, so as it also included in the Readme.md file, with this lates commit: https://git.drupalcode.org/project/leaflet/-/commit/3996852181abcd89c0fe...
- 🇩🇰Denmark ressa Copenhagen
Thanks @itamair, and great idea to include a link in the README, to tie it all together.