Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Upgraded theme, plugins, and grav core and have an indecipherable error

Started by Muut Archive 11 years ago · 1 replies · 321 views
11 years ago

Twig_Error_Runtime
HELP
An exception has been thrown during the rendering of a template ("DOMDocumentFragment::appendXML(): Entity: line 1: parser error : xmlParseEntityRef: no name") in "partials/blog_item.html.twig" at line 49.

From logs/grav.log:

[2015-09-14 11:10:38] grav.CRITICAL: An exception has been thrown during the rendering of a template ("DOMDocumentFragment::appendXML(): Entity: line 1: parser error : xmlParseEntityRef: no name") in "partials/blog_item.html.twig" at line 49. - Trace: #0 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(312): Twig_Template->displayWithErrorHandling(Array, Array) #1 /var/www/html/mab2.sendthemtomir.com/vendor/maximebf/debugbar/src/Debu gBar/Bridge/Twig/TraceableTwigTemplate.php(96): Twig_Template->display(Array, Array) #2 /var/www/html/mab2.sendthemtomir.com/cache/twig/c/2/c2263d51e2a04e2146 502b1c320fd366802592cec97423652e45bffb18ee2ad1.php(130): DebugBar\Bridge\Twig\TraceableTwigTemplate->display(Array) #3 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(161): TwigTe mplate_c2263d51e2a04e2146502b1c320fd366802592cec97423652e45bff b18ee2ad1_538961287->block_content(Array, Array) #4 /var/www/html/mab2.sendthemtomir.com/cache/twig/3/9/39233617e8ba34975b 0de8215e7450f35160cc8fb15ff9a96429cef2b33a0262.php(263): Twig_Template->displayBlock('content', Array, Array) #5 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(161): TwigTemplate_39233617e8ba34975b0de8215e7450f35160cc8fb15ff9a96429cef 2b33a0262->block_body(Array, Array) #6 /var/www/html/mab2.sendthemtomir.com/cache/twig/3/9/39233617e8ba34975b 0de8215e7450f35160cc8fb15ff9a96429cef2b33a0262.php(60): Twig_Template->displayBlock('body', Array, Array) #7 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(338): __TwigTemplate_39233617e8ba34975b0de8215e7450f35160cc8fb15ff9a96429cef 2b33a0262->doDisplay(Array, Array) #8 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(312): Twig_Template->displayWithErrorHandling(Array, Array) #9 /var/www/html/mab2.sendthemtomir.com/vendor/maximebf/debugbar/src/Debu gBar/Bridge/Twig/TraceableTwigTemplate.php(96): Twig_Template->display(Array, Array) #10 /var/www/html/mab2.sendthemtomir.com/cache/twig/c/2/c2263d51e2a04e2146 502b1c320fd366802592cec97423652e45bffb18ee2ad1.php(67): DebugBar\Bridge\Twig\TraceableTwigTemplate->display(Array, Array) #11 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(338): TwigTemplate_c2263d51e2a04e2146502b1c320fd366802592cec97423652e45bff b18ee2ad1_538961287->doDisplay(Array, Array) #12 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(312): Twig_Template->displayWithErrorHandling(Array, Array) #13 /var/www/html/mab2.sendthemtomir.com/vendor/maximebf/debugbar/src/Debu gBar/Bridge/Twig/TraceableTwigTemplate.php(96): Twig_Template->display(Array, Array) #14 /var/www/html/mab2.sendthemtomir.com/cache/twig/c/2/c2263d51e2a04e2146 502b1c320fd366802592cec97423652e45bffb18ee2ad1.php(19): DebugBar\Bridge\Twig\TraceableTwigTemplate->display(Array) #15 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(338): TwigTemplate_c2263d51e2a04e2146502b1c320fd366802592cec97423652e45bff b18ee2ad1->doDisplay(Array, Array) #16 /var/www/html/mab2.sendthemtomir.com/vendor/twig/twig/lib/Twig/Templat e.php(312): Twig_Template->displayWithErrorHandling(Array, Array) #17 /var/www/html/mab2.sendthemtomir.com/vendor/maximebf/debugbar/src/Debu gBar/Bridge/Twig/TraceableTwigTemplate.php(96): Twig_Template->display(Array, Array) #18 /var/www/html/mab2.sendthemtomir.com/vendor/maximebf/debugbar/src/Debu gBar/Bridge/Twig/TraceableTwigTemplate.php(115): DebugBar\Bridge\Twig\TraceableTwigTemplate->display(Array) #19 /var/www/html/mab2.sendthemtomir.com/vendor/maximebf/debugbar/src/Debu gBar/Bridge/Twig/TraceableTwigEnvironment.php(148): DebugBar\Bridge\Twig\TraceableTwigTemplate->render(Array) #20 /var/www/html/mab2.sendthemtomir.com/system/src/Grav/Common/Twig/Twig. php(328): DebugBar\Bridge\Twig\TraceableTwigEnvironment->render('blog.html.twig' , Array) #21 /var/www/html/mab2.sendthemtomir.com/system/src/Grav/Common/Grav.php(1 43): Grav\Common\Twig\Twig->processSite(NULL) #22 /var/www/html/ma eb2.sendthemtomir.com/vendor/pimple/pimple/src/Pimple/Container.php(11 2): Grav\Common\Grav::Grav\Common{closure}(Object(Grav\Common\Grav)) #23 /var/www/html/mab2.sendthemtomir.com/system/src/Grav/Common/Grav.php(2 38): Pimple\Container->offsetGet('output') #24 /var/www/html/mab2.sendthemtomir.com/index.php(37): Grav\Common\Grav->process() #25 {main} [] []

11 years ago

Hmm.. this is a new one, which makes me think it might be related to the new truncateHTML twig filter as that uses DOMDocument. This is typically used when trying to get a summary/portion of the page content to show in the blog list view.

This is probably caused by some invalid HTML that it cannot parse.

My advice is that you should unpublish each page, until you find the page that is causing the problem. Then look at the content of that page and see if there is anything in there that is not valid HTML.

The other option is to not use the truncateHTML method, and either use an explicit page summary indicator (=== by default), or use |striptags|truncate to remove HTML first, then simply truncate the resulting plain text.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1338 9 years ago
Archive · by Muut Archive, 9 years ago
2 927 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2941 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago