This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Twig fails

Twig fails

Twig fails

Tuesday 11 December 2012 4:49:59 pm - 13 replies

Hi all,

after doing a fresh install (from github width ezdemo) I get Twigish errors. Frontpage is loaded, but dynamic content seems to feil. And when I go to a specific location, e.g. http://mysite/content/location/101, I get this error:

Fatal error: The web server did not finish its request

Apache error.log and prod.log give few clues.

Admin (legacy)site works well.

Any ideas?



Modified on Tuesday 11 December 2012 6:27:45 pm by Felix Laate

Tuesday 11 December 2012 4:58:13 pm

Hi Felix

In your virtual host, make it point to index_dev.php instead of index.php. You'll see a lot of more interesting things (including the web profiler)

Tuesday 11 December 2012 6:26:56 pm

Wow, that really gave more info.

First I got an error concerning permission issues with dev.log. After fixing that I got:

 LogicException: Unable to add global "app" as extensions have already been initialized.

I googled it and there was an advice to update Symfony. So I did, and I came further. But the site still lacks content (except for external links like ez news..).

Doing a


results in:

 An exception has been thrown during the rendering of a template ("Invalid field identifier 'intro' for content #58") in "{% extends "eZDemoBundle::pagelayout.html.twig" %}

{% block content %}
{{ viewResult|raw }}
{% endblock %}"

So I guess I'm getting there, slowly, sometime happy.gif Emoticon



Tuesday 11 December 2012 6:47:51 pm

Mmm... Are you using 2012.9 ? If so, you should know that it's completely outdated happy.gif Emoticon. Prefer using Github for now, until 2012.11 is released.

Tuesday 11 December 2012 6:58:14 pm

I did install from Github.

Version (according to admin dashboard) is 5.0.0alpha1:

Sunday 16 December 2012 3:42:31 am

I'm experiencing a similar (or is really the same?) problem from accessing a ezdemo page. It appears that the twig exception is generated because of the internal access to


I believe you should be able to reproduce the problem by hitting this url with a browser.



$content = $this->getRepository()->getContentService()->loadContent( $location->contentId);

in DemoController::footerAction method fails to collect 'intro' attribute.The reason(s) is beyond my reach for now.


Modified on Sunday 16 December 2012 3:45:13 am by Shinji Suzuki

Tuesday 18 December 2012 4:53:43 pm

Now that 2012-11 tarball is available, I've installed the new version parallel to the one I've had and compared two databases.

It looks like the database created by the git version I have lacks Home>>footer object and that is the cause of the error mentioned above resulting in the footer missing in the gerated pages. If that was true, is having a reference to a missing object expected situation?


Modified on Tuesday 18 December 2012 4:59:56 pm by Shinji Suzuki

Wednesday 19 December 2012 10:09:11 am

@Shinji It would be nice to have twig templates which at least fail in graceful manner if

- the expected footer object is missing, or

- the expected atribute is missing

Esp. because (afaik), the expected footer object will not be present in databases upgraded from older eZP releases. Willing to try a pull request?

Modified on Wednesday 19 December 2012 10:09:56 am by Gaetano Giunta

Tuesday 16 July 2013 7:14:18 am

I'm using 2013.6. The problem remains.

Saturday 21 September 2013 8:54:26 pm

you have to delete manually these directories:



Monday 23 September 2013 6:01:42 pm

I think Gaetano is right. I had the same problem too when upgrading. 

Causes of this could be:

  1. you're installing ezpublish with an existing database having not a object with id = 60
  2. you're installing ez5 from the scratch but you choose ezdemo without content package (i'm not sure of this, just a though...)
  3. You indeed have an object from your previous install with id 60, but that object has not an attribute named intro. 

Could be good if twig template provided with the ez install does a check of the existence of that content and that field...

Wednesday 27 November 2013 11:52:37 am

I have problem with the footer's content but there is yet another reason, because:

  • I have footer article object (Location ID 60, Content ID 58)
  • The object is available in footer's template.
  • The object is translated.
  • intro attribute is filled

The first template with problem is: address.html.twig

There is a problem with:

{{ ez_render_field(
            'editMode': false

and no info in ezpublish/logs/dev.log. After digging in sources I checked Apache's error log and I found that almost all lines look like:

 Fatal error:  Class 'XSLTProcessor' not found in <...>/ez/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Converter/Html5.php on line 133

Why there is no eZ or Symfony exception?

I found one more interesting in header:

 <hx:include src="/_fragment?_path=serialized_siteaccess%3DO%253A38%253A%2522eZ%255CPublish%255CCore%255CMVC%255CSymfony%255CSiteAccess%2522%253A3%253A%257Bs%253A4%253A%2522name%2522%253Bs%253A2%253A%2522pl%2522%253Bs%253A12%253A%2522matchingType%2522%253Bs%253A7%253A%2522default%2522%253Bs%253A7%253A%2522matcher%2522%253BN%253B%257D%26_format%3Dhtml%26_locale%3Dpl_PL%26_controller%3DeZDemoBundle%253ADemo%253AuserLinks&amp;_hash=OmxS8l%2FKzrkPmabDSeCoQnLcwHU%3D" class="include_200"><ul class="nav">
    <li id="tagcloud"><a href="/content/view/tagcloud/2" title="Tag cloud">Tag cloud</a></li>
    <li id="sitemap"><a href="/content/view/sitemap/2" title="Site map">Site map</a></li>
    <li id="myprofile"><a href="/user/edit" title="My profile">My profile</a></li>
    <li id="logout"><a href="/user/logout" title="Logout">Logout ( Anonymous User )</a></li>

I'm using 2013.09 with dev environment.

Modified on Wednesday 27 November 2013 11:56:39 am by Karol Radziuk

Wednesday 27 November 2013 12:26:56 pm

Issue was the lack of php5-xsl module. Maybe this information will help someone.

But hx:include is still present. This is probably another issue.

Modified on Wednesday 27 November 2013 12:29:12 pm by Karol Radziuk

Friday 29 November 2013 9:22:16 pm

@Karol is the xsl extension part of composer.json? if not, it might be a welcome addition


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from