Fresh install of D9 and can't get it to work, get WSOD when I head to the block/node settings.
I am on D9
ArgumentCountError: Too few arguments to function Drupal\Core\Config\Entity\ConfigEntityStorage::__construct(), 4 passed in /home/feafccef/public_html/live/maerl.studio/modules/fieldblock/src/BlockEntityStorage.php on line 64 and exactly 5 expected in Drupal\Core\Config\Entity\ConfigEntityStorage->__construct() (line 111 of /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php)
#0 /home/feafccef/public_html/live/maerl.studio/modules/fieldblock/src/BlockEntityStorage.php(64): Drupal\Core\Config\Entity\ConfigEntityStorage->__construct(Object(Drupal\Core\Config\Entity\ConfigEntityType), Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\Component\Uuid\Php), Object(Drupal\Core\Language\LanguageManager))
#1 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Component/DependencyInjection/Container.php(257): Drupal\fieldblock\BlockEntityStorage->__construct(Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\Component\Uuid\Php), Object(Drupal\Core\Language\LanguageManager), Object(Drupal\Core\Entity\EntityTypeManager))
#2 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Component/DependencyInjection/Container.php(171): Drupal\Component\DependencyInjection\Container->createService(Array, 'fieldblock.bloc...')
#3 /home/feafccef/public_html/live/maerl.studio/modules/fieldblock/src/Form/FieldBlockConfigForm.php(86): Drupal\Component\DependencyInjection\Container->get('fieldblock.bloc...')
#4 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\fieldblock\Form\FieldBlockConfigForm::create(Object(Drupal\Core\DependencyInjection\Container))
#5 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/Controller/HtmlFormController.php(48): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\\Drupal\\fieldbl...')
#6 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/Controller/FormController.php(58): Drupal\Core\Controller\HtmlFormController->getFormObject(Object(Drupal\Core\Routing\RouteMatch), '\\Drupal\\fieldbl...')
#7 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#8 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#9 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#10 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#11 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#12 /home/feafccef/public_html/live/maerl.studio/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#13 /home/feafccef/public_html/live/maerl.studio/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#14 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /home/feafccef/public_html/live/maerl.studio/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /home/feafccef/public_html/live/maerl.studio/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /home/feafccef/public_html/live/maerl.studio/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /home/feafccef/public_html/live/maerl.studio/core/lib/Drupal/Core/DrupalKernel.php(705): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /home/feafccef/public_html/live/maerl.studio/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#23 {main}
Comments
Comment #2
cosmin-hm commentedI have the same problem, on Drupal 9 (9.0.3).
Comment #3
imclean commentedAn extra parameter was added in D9. This includes it, but it may cause problems with D8 sites.
Comment #4
michèle commentedPatch #3 works well with Drupal 9.1.2.
Thank you, @imclean!
Comment #5
jon@s commentedCan confirm it also works on 9.0. Probably needs someone to double check it on an 8.x branch.
Comment #6
rosk0Tested on D9.1.9 and 2.0.0-alpha5 - works like a charm!
Thank you
Comment #7
sutharsan commentedThis change limits the compatibility of the module to 8.6+. For reference, this is the change record that introduced the constructor change: https://www.drupal.org/node/2973262
Either we add a minimum version requirement to the module's .info file (
- drupal:block (>=8.6.0)) or drop thecore: 8.xwhich makes is 8.7+ compatible.Comment #8
imclean commentedGiven that security coverage for 8.6 ended in December 2019, I think it's safe to not support it any more.
Comment #9
imclean commentedDrupal 8 has reached its end of life. To address #7 we can simply support Drupal 9.
Comment #10
rj commentedPatch from #9 tested against Drupal 9.3.5, works fine. Thanks!
Comment #11
luongosb commentedPatch from #9 works in Drupal 9.3.6 for me as well. Thanks!
Comment #12
lolcode commentedThis patch works well. Thanks! I think it it safe to mark it RTBC.
Comment #13
sutharsan commentedI agree with @imclean that the end of life of Drupal 8 makes it less important to keep full backwards compatibility. But there is no technical necessity to limit it further than 8.7+. This patch adjusts the info.yml accordingly.
Comment #15
sutharsan commentedThanks to all for your contribution.
Comment #16
jasonaaronwood commentedWill this patch be applied to a new release at some point?
Comment #18
amanire commentedNot sure if this merits a new issue. On 9.3.19, I see the following error after applying the patch in #13:
The error disappears if I change these lines in
fieldblock.info.ymlfrom:to:
core_version_requirement: ^8.7.7 | ^9See https://www.drupal.org/node/3070687
Comment #19
amanire commentedHere is a patch with the changes from the previous comment.
Comment #20
igork96 commentedPlease push the changes from the patch before closing the issue.
Comment #21
piridium commentedPatch #9 works for me on core 9.4.8
Thank you!
Comment #22
imclean commentedThanks @amanire. This issue is closed, can you post your patch on the related issue?
Comment #23
amanire commentedDone!