Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
system.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Dec 2016 at 17:44 UTC
Updated:
10 Feb 2017 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cilefen commentedI cannot reproduce this on PHP 7.1 so we need more information about this.
Comment #3
djan commentedThis happens when I activate PHP 7.1 for Drupal 8.2.4 with default Bartik theme and a site slogan defined for the site and after I clear the Drupal cache. Let me know what sort of information you need more.
Comment #4
cilefen commentedAre any contributed modules installed?
Comment #5
djan commentedOnly "Statistics" and "Quick Edit" module activated. I have no extra installed modules / themes.
I did an upgrade from new installation Drupal 8.1 in September 2016 to Drupal 8.2 (+all subsubversions)
Warning: Illegal string offset '#markup' in system_preprocess_block() (line 840 of /data/sites/web/testbe/www/quiz/core/modules/system/system.module) #0 /data/sites/web/testbe/www/quiz/core/includes/bootstrap.inc(548): _drupal_error_handler_real(2, 'Illegal string ...', '/data/sites/web...', 840, Array) #1 /data/sites/web/testbe/www/quiz/core/modules/system/system.module(840): _drupal_error_handler(2, 'Illegal string ...', '/data/sites/web...', 840, Array) #2 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Theme/ThemeManager.php(287): system_preprocess_block(Array, 'block', Array) #3 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('block', Array) #4 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #5 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #6 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render(Array) #7 /data/sites/web/testbe/www/quiz/sites/default/files/php/twig/ffde96f6_page.html.twig_af9f268a25b90265218da5365a877d105a9ca7819b5af9c9f4fb998146e7b8b1/b48aa15a8d40ce9389850e41df96cb3799877137afc1d1476e04fb9e5c9974cb.php(56): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #8 /data/sites/web/testbe/www/quiz/vendor/twig/twig/lib/Twig/Template.php(381): __TwigTemplate_c252cc75e6558d98d5647635a139bbecfb995a38dbbd48574038e38d834c494b->doDisplay(Array, Array) #9 /data/sites/web/testbe/www/quiz/vendor/twig/twig/lib/Twig/Template.php(355): Twig_Template->displayWithErrorHandling(Array, Array) #10 /data/sites/web/testbe/www/quiz/vendor/twig/twig/lib/Twig/Template.php(366): Twig_Template->display(Array) #11 /data/sites/web/testbe/www/quiz/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #12 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/bar...', Array) #13 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('page', Array) #14 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #15 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render(Array) #16 /data/sites/web/testbe/www/quiz/sites/default/files/php/twig/ffde96f6_html.html.twig_d82fee0bf95f70bd5101a48ad1ecd5fcc1cd6bccec16bed221b98e5d2ce200be/e01f308e8fc6f1874fe5775da6e3d115398addc618cbea2b8af22d4e9ea52637.php(90): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #17 /data/sites/web/testbe/www/quiz/vendor/twig/twig/lib/Twig/Template.php(381): __TwigTemplate_277e613894a0be5e008ebbcc1ab36c65008fb16fd8c17061fa3fc735c975dcdf->doDisplay(Array, Array) #18 /data/sites/web/testbe/www/quiz/vendor/twig/twig/lib/Twig/Template.php(355): Twig_Template->displayWithErrorHandling(Array, Array) #19 /data/sites/web/testbe/www/quiz/vendor/twig/twig/lib/Twig/Template.php(366): Twig_Template->display(Array) #20 /data/sites/web/testbe/www/quiz/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #21 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/cla...', Array) #22 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('html', Array) #23 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #24 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(147): Drupal\Core\Render\Renderer->render(Array) #25 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #26 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(148): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #27 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #28 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #29 /data/sites/web/testbe/www/quiz/vendor/symfony/http-kernel/HttpKernel.php(144): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #30 /data/sites/web/testbe/www/quiz/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #31 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #32 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #33 /data/sites/web/testbe/www/quiz/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #34 /data/sites/web/testbe/www/quiz/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #35 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #36 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #37 /data/sites/web/testbe/www/quiz/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #38 /data/sites/web/testbe/www/quiz/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #39 /data/sites/web/testbe/www/quiz/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #40 {main}.
Comment #6
Anonymous (not verified) commentedI have the same on a new installed Drupal 8.2.4, installed on Centos7 with php 7.1.0. Only default modules with Bartic theme.
Warning: Illegal string offset '#markup' in system_preprocess_block() (line 840 of core/modules/system/system.module)Comment #7
cilefen commentedI'll try this.
Comment #8
cilefen commentedI am bumping this to major because slogans are highly-visible. There appears to already be coverage in PageTitleTest.
Comment #9
cilefen commentedComment #10
damienmckennaComment #11
Anonymous (not verified) commentedPatch #3 solved the one character issue.
Thanks.
Comment #12
cilefen commented@cmseasy Why did you downgrade this to normal (there could be reasons, but state them) and mark it postponed?
Comment #13
Anonymous (not verified) commented@cilefen I did not change any metadata. It is a closed fieldset for me.
I don't know why the metadata is changed when saving my issue.
Set it back to needs review and major.
Comment #14
cilefen commentedThe earlier form state may have been loaded in your browser, no big deal.
Comment #15
alexpottWithout the patch
With the patch applied
So we've fixed the fail but we still have errors from the following code:
Comment #16
alexpottIn order to fix the Symfony Yaml component issue we need to do #2840596: Update Symfony components to ~2.8.16
Comment #17
andypost8.2.5 released and looks CI should be able to test 7.1 #2814933: PHP 7 test runs should be on released versions
Comment #18
pjcdawkins commentedThe tiny patch in #8 is OK, but this is theoretically less disruptive (in case anyone was for whatever reason relying on the empty string in a later preprocess function, or something).
Comment #19
Anonymous (not verified) commentedPatch #18 works ok for me. Testing on apache 2.4.25, centos7, php 7.1.0 and drupal 8.2.5 in multi site setup.
Comment #20
alexpottI like the fix in #18. I've applied locally and
Drupal\system\Tests\System\PageTitleTestpasses on 7.1. Let's get this done.Comment #22
catchCommitted/pushed to 8.3.x and cherry-picked to 8.2.x. Thanks!
Comment #24
alexpottComment #25
paintingguy commentedafter upgrading to php 7.1, I too am experiencing one letter in the Slogan.
Neither patch 8 or 18 solved this.
Comment #26
alexpott@paintingguy - there is no supported release with this patch yet - it'll be in 8.2.6 and 8.3.0
Comment #27
paintingguy commentedThanks Alex, neither patch 8 or 18 worked. Was there a patch I could use until its added?
Comment #28
alexpott@paintingguy did you clear the cache? The patches here definitely work for core. Maybe you are using a custom or contrib theme that has the same bug. However there are more changes to support 7.1 - tbh honest it is worth waiting to 8.2.6 to move to 7.1.
Comment #29
paintingguy commentedThanks Alex, I cleared my cache but it didn't help. Both patches broke the site so I and gave up.
I've reverted back to 7.0 and will wait as you suggest. Thanks for chiming in.
I'm using the stock Bartik, no mods to mention.
Comment #30
cilefen commentedBroke the site? Can we get details on that please?
Comment #31
paintingguy commentedThe moment I tried either of the patches my site went white (don't recall the error message). Could it be that I should have continued to try and rebuild Drupal?
When I saw that, I reverted back to the stock code and have now rolled back to php 7.0 and no longer have "Only one site slogan character in site slogan" .
Sorry, I'm not more helpful.
Comment #32
Crell commentedThe patch in #18 applied to my own website (http://www.garfieldtech.com) running on 8.2 on PHP 7.1 works fine. Just make sure you do a full cache clear as Drupal 8 is very aggressive in its render caching. (And by default shows almost no debugging information for security reasons; you have to enable it.) It does sound like it could be a custom theme issue.
Comment #33
paintingguy commentedTried patch #18 again. Did full cache clear. I get this. (The website encountered an unexpected error. Please try again later.)
This is a stock Bartik theme
paintingguys.ca
Comment #34
alexpott@paintingguy can you check the error log or use admin/config/development/logging to make errors visible on your site.
Comment #35
paintingguy commentedUser warning: The following module is missing from the file system: visitors in drupal_get_filename() (line 236 of /home/painter/public_html/core/includes/bootstrap.inc) #0 /home/painter/public_html/core/includes/bootstrap.inc(548): _drupal_error_handler_real(512, 'The following m...', '/home/painter/p...', 236, Array) #1 [internal function]: _drupal_error_handler(512, 'The following m...', '/home/painter/p...', 236, Array) #2 /home/painter/public_html/core/includes/bootstrap.inc(236): trigger_error('The following m...', 512) #3 /home/painter/public_html/core/includes/bootstrap.inc(259): drupal_get_filename('module', 'visitors') #4 /home/painter/public_html/core/includes/module.inc(134): drupal_get_path('module', 'visitors') #5 /home/painter/public_html/core/includes/module.inc(93): module_load_include('install', 'visitors') #6 /home/painter/public_html/core/includes/install.inc(82): module_load_install('visitors') #7 /home/painter/public_html/core/modules/system/src/SystemManager.php(109): drupal_load_updates() #8 /home/painter/public_html/core/modules/system/src/SystemManager.php(96): Drupal\system\SystemManager->listRequirements() #9 /home/painter/public_html/core/modules/system/src/Controller/SystemController.php(114): Drupal\system\SystemManager->checkRequirements() #10 [internal function]: Drupal\system\Controller\SystemController->overview('system.admin_co...') #11 /home/painter/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #12 /home/painter/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #13 /home/painter/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #14 /home/painter/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #15 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #16 /home/painter/public_html/vendor/symfony/http-kernel/HttpKernel.php(139): call_user_func_array(Object(Closure), Array) #17 /home/painter/public_html/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #18 /home/painter/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /home/painter/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /home/painter/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /home/painter/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /home/painter/public_html/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /home/painter/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /home/painter/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /home/painter/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /home/painter/public_html/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /home/painter/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #28 {main}.
ParseError: syntax error, unexpected ']' in Drupal\Core\Extension\Extension->load() (line 843 of /home/painter/public_html/core/modules/system/system.module) #0 /home/painter/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(127): Drupal\Core\Extension\Extension->load() #1 /home/painter/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(140): Drupal\Core\Extension\ModuleHandler->load('system') #2 /home/painter/public_html/core/lib/Drupal/Core/DrupalKernel.php(544): Drupal\Core\Extension\ModuleHandler->loadAll() #3 /home/painter/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(45): Drupal\Core\DrupalKernel->preHandle(Object(Symfony\Component\HttpFoundation\Request)) #4 /home/painter/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #5 /home/painter/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #6 /home/painter/public_html/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #7 /home/painter/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /home/painter/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 /home/painter/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #10 /home/painter/public_html/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #11 /home/painter/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #12 {main}.
Comment #36
pjcdawkins commented@paintingguy it sounds like the patch is incorrectly applied? Have a look at your system.module file around the lines in question (839 to 843)
Comment #37
paintingguy commentedI can't win with this patch, I feel like a bozo. As soon as I patch, I cannot access my site.
Here is my system.module
Could someone please replace what I need and I will copy the entire system.module. Thanks.
Comment #38
pjcdawkins commented@paintingguy: if you want an entire system.module from Drupal 8.2.x with the patch applied, see:
http://cgit.drupalcode.org/drupal/blob/core/modules/system/system.module...
Comment #39
paintingguy commented@pjcdawkins and others...
Thank you! Worked perfectly.