Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
4.7.0, 5.0
-
None
Description
The import problem occurs if the eZSectionDefinition and the corresponding content are not on the same page in the imported document.
When importing such a file ezodf cannot identify the field (eZSectionDefinition) correctly and as such cannot find the correct eZContentClass - which causes a fallback to the default eZContentClass defined for ezodf import.
By changing the following lines in the file extension/ezodf/classes/ezooimport.php we were able to fix the problem:
- Class eZOOImport
function import( $file, $placeNodeID, $originalFileName, $importType = "import", $upload = null, $locale = false )
--> Line 449 to 453 original:
$firstChildFlag = false;
childNodeChildren = $childNode->childNodes;
$paragraphSectionName = trim( $childNodeChildren->item( 0 )->textContent );
$sectionNameArray[] = $paragraphSectionName;
--> replaced with:
$firstChildFlag = false;
$childNodeChildren = $childNode->childNodes;
$childNodeLenght = $childNodeChildren->length;
for( $childNodeCounter = 0; $childNodeCounter < $childNodeLenght; $childNodeCounter++ )
{
$paragraphSectionName = trim( $childNodeChildren->item( $childNodeCounter )->textContent );
if( $paragraphSectionName )
}
With the page break between the eZSectionDefinition and the corresponding content the paragraphSectionName of the first item is empty.