On a fresh install no content created (blank slate) I get this error before creating any content. Once I have content the error goes away. I know this is a rare setup it just took me a bit of work trying to get it working without error before i realized to just create a page. I added the error message I got below.

Warning: strlen() expects parameter 1 to be string, array given in bootstrap_barrio_preprocess_page_title() (line 226 of themes/bootstrap_barrio/bootstrap_barrio.theme).

bootstrap_barrio_preprocess_page_title(Array, 'page_title', Array)
Drupal\Core\Theme\ThemeManager->render('page_title', Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1)
__TwigTemplate_4c69e5991f3e160b935047dfe4777706db635ab67265fa6f4ec5c39794e17709->block_content(Array, Array)
Twig_Template->displayBlock('content', Array, Array)
__TwigTemplate_4c69e5991f3e160b935047dfe4777706db635ab67265fa6f4ec5c39794e17709->doDisplay(Array, Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('themes/bootstrap_barrio/templates/block/block.html.twig', Array)
Drupal\Core\Theme\ThemeManager->render('block', Array)
Drupal\Core\Render\Renderer->doRender(Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1)
__TwigTemplate_4eda0ce75fcd4d7c7bfea8acfbaae4f24ee45e1495f6c6cfc1fc2dfc1d49ff2b->block_content(Array, Array)
Twig_Template->displayBlock('content', Array, Array)
__TwigTemplate_4eda0ce75fcd4d7c7bfea8acfbaae4f24ee45e1495f6c6cfc1fc2dfc1d49ff2b->doDisplay(Array, Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('themes/bootstrap_barrio/templates/layout/page.html.twig', Array)
Drupal\Core\Theme\ThemeManager->render('page', Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1)
__TwigTemplate_df05244faca2f5ca5a1365e71348b8af3ab67d4d2e64686c649ed6460e498bf3->doDisplay(Array, Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('themes/bootstrap_barrio/templates/layout/html.html.twig', Array)
Drupal\Core\Theme\ThemeManager->render('html', Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
CommentFileSizeAuthor
#4 view_screenshot.png89 KBstaulien

Comments

staulien created an issue. See original summary.

hatuhay’s picture

Status: Active » Postponed (maintainer needs more info)

Cannot reproduce

staulien’s picture

After some more testing i found that this only showed up when the page did not have a title. For example my front page when i first created it I didn't put a title and i got this message. Once I put a title on it worked without error. The front page was being created by the frontpage view which for some reason is empty on default install.

staulien’s picture

StatusFileSize
new89 KB

More playing around i continue getting the error. It is not only on front page i created a completely blank view (screenshot attached)
I have one basic page that is set to published and promote to front page.
The page shows up but the title of the page is H2. The only other title section of the page shows up like this:

<div id="block-tpfpv1-page-title" class="contextual-region block block-core block-page-title-block">
<div class="contextual" data-contextual-id="block:block=tpfpv1_page_title:langcode=en" role="form">
<div class="content"> </div>
</div>

If I put a title in the view or not I still get the error message.

If i go to the page directly via node/1 i don't get the message and i get the following in the same title section above:

<div id="block-tpfpv1-page-title" class="contextual-region block block-core block-page-title-block">
<div class="contextual" data-contextual-id="block:block=tpfpv1_page_title:langcode=en" role="form">
<button class="trigger focusable" type="button" aria-pressed="false">Open configuration options</button>
<ul class="contextual-links" hidden="">
</div>
<div class="content">
<h1 class="js-quickedit-page-title title page-title">
<span class="field field--name-title field--type-string field--label-hidden quickedit-field" data-quickedit-field-id="node/1/title/en/full" property="schema:name">Thee Place For Paws - Just Like Home</span>
</h1>
</div>
</div>

I went looking for the template that creates this section but I can't seem to find the exact section broken out into a seperate template file and I am still learning twig so I may have completely missed it.

I hope this helps!

aangel’s picture

I'm seeing this with a fresh install of 4.5, as well.

  • hatuhay committed 74d57fa on 8.x-4.x
    Issue #2654118 by hatuhay: Page title error.
    
hatuhay’s picture

Status: Postponed (maintainer needs more info) » Needs review
hatuhay’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.