Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21017

ODF Import problem if eZSectionDefinition and content are on different pages

    Details

      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 )

      { $sectionNameArray[] = $paragraphSectionName; break; }

      }

      With the page break between the eZSectionDefinition and the corresponding content the paragraphSectionName of the first item is empty.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Tamara Oellinger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: