Just installed Drupal 9.5.5 and got the following when viewing frontend page containing the block:
TypeError : count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 238 of /public_html/web/modules/contrib/dropdown_language/src/Plugin/Block/DropdownLanguage.php )
#0 /public_html/web/modules/contrib/dropdown_language/src/Plugin/Block/DropdownLanguage.php(238): count()
#1 /public_html/web/core/modules/block/src/BlockViewBuilder.php(171): Drupal\dropdown_language\Plugin\Block\DropdownLanguage->build()
#2 [internal function]: Drupal\block\BlockViewBuilder::preRender()
#3 /public_html/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array()
#4 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback()
#5 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback()
#6 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#7 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(160): Drupal\Core\Render\Renderer->render()
#8 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\Renderer->Drupal\Core\Render\{ closing}()
#9 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(161): Drupal\Core\Render\Renderer->executeInRenderContext()
#10 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(175): Drupal\Core\Render\Renderer->renderPlain()
#11 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(665): Drupal\Core\Render\Renderer->renderPlaceholder()
#12 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(550): Drupal\Core\Render\Renderer->replacePlaceholders()
#13 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#14 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(148): Drupal\Core\Render\Renderer->render()
#15 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\Renderer->Drupal\Core\Render\{ closing}()
#16 /public_html/web/core/lib/Drupal/Core/Render/Renderer.php(149): Drupal\Core\Render\Renderer->executeInRenderContext()
#17 /public_html/web/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(279): Drupal\Core\Render\Renderer->renderRoot()
#18 /public_html/web/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(128): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->renderPlaceholders()
#19 /public_html/web/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php(45): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments()
#20 [internal function]: Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond()
#21 /public_html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#22 /public_html/vendor/symfony/http-kernel/HttpKernel.php(202): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#23 /public_html/vendor/symfony/http-kernel/HttpKernel.php(190): Symfony\Component\HttpKernel\HttpKernel->filterResponse()
#24 /public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#25 /public_html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#26 /public_html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#27 /public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#28 /public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
#29 /public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
#30 /public_html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#31 /public_html/web/modules/contrib/raven/src/StackMiddleware/RavenMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#32 /public_html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\raven\StackMiddleware\RavenMiddleware->handle()
#33 /public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#34 /public_html/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#35 /public_html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#36 {main}
Reverting to Drupal 9.5.4 solved.
| Comment | File | Size | Author |
|---|
Issue fork dropdown_language-3348286
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kmontyI'm looking into what it would take to write a patch based off the work done here: https://www.drupal.org/project/language_switcher_menu/issues/3348242
Comment #3
kmontyI have a patch working on localdev. Going to have our QA team give it a test before posting here. Assigning to myself for now.
Comment #4
kmontyOur team is satisfied that this is sufficient to get us to be able to deploy the security release. I didn't look into if this needs tests or anything. Again, just prioritized getting today's security release out. Hope this helps folks!
Note: patch was written against `3.0.x-dev` but it applies cleanly to `3.1.0`
Comment #5
tostinni commentedI can confirm that this patch also fixed these errors that we had after testing 9.5.5 which was breaking the language switcher.
Comment #6
anybodyConfirming this issue. Just killed a project with a WSOD ;)
Maintainer should have a look asap and tag a new fixed stable release!
Comment #7
anybodyAligned the title to be more clear. The fix might be correct, but someone has to test this carefully. I can't do this currently.
Comment #8
anybodyComment #9
pkok commentedI can confirm that the patch in #4 fixes this issue. We use module version 3.1.2, core version 9.5.5.
Comment #11
anybodyCreated a MR from #4
Comment #12
anybody@SKAUGHT or @Grevil could you please review this? LGTM!
Should also be cherry-picked into 4.0.x once merged.
Comment #13
anybodyI was now able to reproduce the reported issues and can confirm it's perfectly fixed by this patch. Also I think #3336440: Dropbutton disappear had the same reason.
Thanks @kmonty for fixing this! I'll now merge the fix into 3.0.x and 4.0.x
Comment #16
anybodyMerged into 3.0.x and cherry-picked into 4.0.x!
Thank you very much! I don't have permission to administer releases, so @SKAUGHT will have to create a 3.1.4 and 4.0.3 release to fix this in stable releases.
Thank you all! :)
Comment #17
kbein commentedThank you for being this responsive! I had the exact same problem. I will wait until the stable release to update our instances :)