-1

I am updating a development environment; after updating to Drupal 8.3.0, I can't access /user/login.

These are the errors from my log.

[Mon Apr 10 15:57:50.142266 2017] [:error] [pid 22325] [client 172.16.8.46:65128] Recoverable fatal error: Object of class Drupal\Core\Link could not be converted to string in /var/www/html/core/lib/Drupal/Component/Utility/Xss.php on line 67 #0 /var/www/html/core/includes/bootstrap.inc(552): _drupal_error_handler_real(4096, 'Object of class...', '/var/www/html/c...', 67, Array)\n#1 [internal function]: _drupal_error_handler(4096, 'Object of class...', '/var/www/html/c...', 67, Array)\n#2 /var/www/html/core/lib/Drupal/Component/Utility/Xss.php(67): str_replace('\x00', '', Object(Drupal\Core\Link))\n#3 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(749): Drupal\Component\Utility\Xss::filter(Object(Drupal\Core\Link), Array)\n#4 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(382): Drupal\Core\Render\Renderer->ensureMarkupIsSafe(Array)\n#5 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array)\n#6 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false)\n#7 /var/www/html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false)\n#8 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()\n#9 /var/www/html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))\n#10 /var/www/html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))\n#11 /var/www/html/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))\n#12 /var/www/html/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))\n#13 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(149): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))\n#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)\n#15 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#16 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#17 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(207): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#18 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(121): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#19 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(75): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#20 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#21 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#22 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#23 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#24 /var/www/html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))\n#25 {main}

Any help is very much appreciated.

0

Not possible to see much, as it is set indirectly through a render array. You seem to have some code that is setting a link object on a #markup. Either a custom or a contrib module.

/var/www/html/core/lib/Drupal/Core/Render/Renderer.php(749): Drupal\Component\Utility\Xss::filter(Object(Drupal\Core\Link), Array)

This is where you want to start debugging, check that line and the Xss::filter() call, check the argument for a link object and if it is, dump that render array to see if you can figure out what it is. Calling toUrl() on the link might help for example, so you see what kind of link it is.

  • Thanks for pointing me in the right direction, after going though my modules I found the one causing the issue – Brynn MW Apr 10 '17 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.