Affects Version/s: 4.3.0
Fix Version/s: 4.4.0alpha3
Component/s: Content (images, XML, PDF, RSS, etc.)
Operating System: Linux ( Ubuntu )
PHP Version: (please be specific, like '4.4.3' or '5.1.5') 5.2.4-2ubuntu5.9
Database and version: Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2
Browser (and version):
After upgrading a couple of sites to version 4.3 we got reports from customers about missing content
on the sites. After some investigation we discovered that some paragraphs in ezxmltext attributes
were not visible even if they existed in the database.
We traced the problem to the renderParagraph method in the eZXHTMLXMLOutput class.
This is the method eZXHTMLXMLOutput::renderParagraph in the file kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php
In line 463 the content of the variable $inlineContent will be rendered if current tag is inline
and it is the last item in the $childrenOutput array. But if the last item in the $childrenOutput
array is inline and contains a space then $inlinecontent that contains content from previous inline
tags will not be rendered because the continue statement in line 452 skips the rest of the code in the
foreach loop including the code that renders the inline content of the last tag.
We added a check that made sure the continue statement was not called on the last element. That made
the missing content appear on the websites again.
This is not easy to reproduce, but upon request I can provide a database with this problem.