Problem/Motivation
I'm testing the module and it seems very good to me, it meets what I need but I was doing tests to use it in the layout builder but I see that it gives me this problem
The website encountered an unexpected error. Try again later.
TypeError: strlen(): Argument #1 ($string) must be of type string, array given in strlen() (line 395 of core/lib/Drupal/Component/Utility/Unicode.php).
Drupal\Component\Utility\Unicode::validateUtf8() (Line: 65)
Drupal\Component\Utility\Xss::filter() (Line: 398)
Drupal\toc_ng\Plugin\Block\TocNgBlock->buildToc() (Line: 435)
Drupal\toc_ng\Plugin\Block\TocNgBlock->build() (Line: 106)
Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray->onBuildRender()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 90)
Drupal\layout_builder\SectionComponent->toRenderArray() (Line: 88)
Drupal\layout_builder\Section->toRenderArray() (Line: 228)
Drupal\layout_builder\Element\LayoutBuilder->buildAdministrativeSection() (Line: 112)
Drupal\layout_builder\Element\LayoutBuilder->layout() (Line: 86)
Drupal\layout_builder\Element\LayoutBuilder->preRender()
call_user_func_array() (Line: 111)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 859)
Drupal\Core\Render\Renderer->doCallback() (Line: 421)
Drupal\Core\Render\Renderer->doRender() (Line: 493)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 239)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Steps to reproduce
- create a content type
- activate layout builder and use toc ng block
with that reproduce the error
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | toc_ng-3463846-6-layout_builder_compatibility.patch | 3.14 KB | mably |
Issue fork toc_ng-3463846
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
mably commentedHello, thanks for reporting the problem,.
Could you apply the provided patch on the dev branch and tell me how it goes?
If it fixes the problem, I'll merge it.
Comment #4
mably commentedMerge request created.
Comment #5
mably commentedComment #6
mably commentedPatch has been replaced.
Comment #7
nelo_drup commented#6 Thanks @mably, I just installed it and it works very well.
Comment #9
mably commentedComment #10
mably commentedNew version 1.0.0-beta2 including the fix has been released.