eZ Community » Forums » eZ Publish 5 Platform » Display XML block

Display XML block

Display XML block

Wednesday 09 October 2013 5:50:24 pm - 8 replies


I have a problem displaying an XML block that I didn't have before. 

The result is always the same, regardless of the method used:

{{ content.getField('my_field').value }}


{{ ez_render_field(content, 'my_field') }}


The response look's like:

<section xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:image="http://ez.no/namespaces/ezpublish3/image/">

     <paragraph xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">MY TEXT</paragraph>



I expect an answer as:

<p>MY TEXT</p>


After any change, I clear my cache.

If someone have an idea or know how I can solve that problem, I'm interested !


Thanks for helping

Wednesday 09 October 2013 6:20:31 pm

It seems that XSLT operation has failed for some reason... How did you get this ? What happens if you edit your content in admin (ezoe activated of course) and republish it ?

Wednesday 09 October 2013 6:33:40 pm

It happens just after making a dump in my twig file. ( {{ dump(content.getFieldValue('myField')) }} )


When I try to edit my content in my admin panel, it's the same.


Do you know if it is possible to active the EzPublish debug in my front (using Sf2) ?


In my Apache2 Log, I found this line that may help you : 

PHP Fatal error:  Call to a member function getElementsByTagName() on a non-object in /var/www/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/XmlText/Converter/EmbedToHtml5.php on line 52


Thanks in advance for your support !

Wednesday 09 October 2013 7:45:19 pm

Interesting. So we might have a bug !

Can you please report it on Jira and paste the link here ?

Thanks happy.gif Emoticon

Thursday 10 October 2013 10:47:15 am


After cheking in the vendors files, I found the answer to my problem. In the Html5.php, the function getXSLTProcessor() tried to load a nonexisting customTag.xsl listed in my ezpublish.yml was causing this misbehavior. 

So, I put a condition to check if the "$stylesheet" exist or not in this function and I submited it to Jira & Github. 

I just removed le wrong calling xsl in my ezpublish.yml and all came back to normal. (yes, I have a lot of customTags listed there..)

Thank you Jérôme for your help !

Thursday 10 October 2013 10:47:57 am

Couldn't reproduce your issue. Can you please lookup in your ezcontentobject_attribute table and check the raw ezxml content for your field ?

While trying to reproduce I found another related issue

Thursday 10 October 2013 11:27:27 am

Thanks for your feedback

You say that you submitted to Jira and Github. Could you please paste the links ? Thanks !

Thursday 10 October 2013 11:35:34 am

This is what I have for my field in the database:

And in my front I get this ezxml properly translated :

In my ezpublish.yml, I decalred a nonexistent customTag by using this method:

The link to Jira : https://jira.ez.no/browse/EZP-21722

And this little correction solved my problem : https://github.com/Djamy/ezpublish-kernel/commit/2762405de6b0bf67e224682c2cec1cefad76a0df

I don't really know if it would be a strong or an interesting fix but it definitly avoid the ez_render_field to try to load a wrong stylesheet, if I understood it correctly..

Modified on Thursday 10 October 2013 11:40:59 am by Lopper Dave

Thursday 10 October 2013 11:53:28 am

Thanks for this.

It is definitely an interesting fix since it should not fail silently. I commented your pull-request. A few things to change and it's in ! happy.gif Emoticon


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

36 542 Users on board!

Forums menu

Proudly Developed with from