-
Notifications
You must be signed in to change notification settings - Fork 56
Description
I have just started to use this library and found the same issue as others are reporting.
I was able to fix the affected code by changing the _save function with the following lines. The issue seems to be that the manifest files need the file entry within the manifest namespace and I fixed it simply by replacing:
$this->manifestXml = substr_replace($this->manifestXml, "\n".$manifdata, $lastpos+1, 0);
WITH
$replace = '<manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/>'; $this->manifestXml = str_replace($replace, $replace . "\n" . $manifdata, $this->manifestXml);
This is after the comment "// Place content of $manifdata variable in manifest.xml file at appropriate place"
This very simply moves the file entry to WITHIN the manifest:manifest xml namespace. This fixes the odt file corruption message for me when adding images to odt templates.