<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/odtphp/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/odtphp/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 04 Jun 2014 10:59:38 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/odtphp/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Segment fail for latin1 characters</title><link>https://sourceforge.net/p/odtphp/bugs/14/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Assigning variables on Segment objects fails on (non ASCII) ISO 8859 characters.&lt;br /&gt;
Bug can be solved switching 2 lines in Segment::setVars() function:&lt;br /&gt;
        $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value;&lt;br /&gt;
        $value = $encode ? htmlspecialchars($value) : $value;&lt;br /&gt;
Thanks for this project!&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Javier Gracia</dc:creator><pubDate>Wed, 04 Jun 2014 10:59:38 -0000</pubDate><guid>https://sourceforge.net7c6f27e20df775f2b525d108764b96a2776859de</guid></item><item><title>tag with inner xml</title><link>https://sourceforge.net/p/odtphp/bugs/13/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This not really a bug, but a workaround.&lt;br /&gt;
I generate an odt document prepared from users.&lt;br /&gt;
Many times there are tags like:&lt;br /&gt;
{&amp;lt;text:span text:style-name="T34"&amp;gt;M&amp;lt;/text:span&amp;gt;y&amp;lt;text:span text:style-name="T34"&amp;gt;Tag&amp;lt;/text:span&amp;gt;}&lt;/p&gt;
&lt;p&gt;I've solved in the way that follow, hope could be useful.&lt;/p&gt;
&lt;p&gt;&amp;lt;?php&lt;br /&gt;
$data = array(&lt;br /&gt;
"tag"=&amp;gt;"value",&lt;br /&gt;
);&lt;br /&gt;
$odf = new odf(...);&lt;/p&gt;
&lt;p&gt;$fulltext = $odf-&amp;gt;__toString()&lt;br /&gt;
preg_match_all("~\{([^{]+)\}~ium", $fulltext, $res);&lt;/p&gt;
&lt;p&gt;foreach($tokens[1] as $token)&lt;br /&gt;
{&lt;/p&gt;
&lt;p&gt;if(key_exists($tokenx = strip_tags($token), $data)){&lt;br /&gt;
preg_match_all("~&amp;lt;[^&amp;lt;]*&amp;gt;([^&amp;lt;&amp;gt;]*)~iu", $token, $res);&lt;br /&gt;
$pieces = $res[1];&lt;br /&gt;
$tmpk = implode("", $pieces);&lt;br /&gt;
// echo "&amp;lt;p&amp;gt;".htmlspecialchars($token)." -&amp;gt; $tmpk";&lt;br /&gt;
if(strlen(trim($tmpk)) &amp;gt; 0 &amp;amp;&amp;amp; key_exists( $tmpk, $data ))&lt;br /&gt;
{&lt;br /&gt;
$data[$token] = $data[$tmpk];&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
if(! key_exists( $token , $data) )&lt;br /&gt;
{&lt;br /&gt;
$data[ $token ] = "";&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
// go on rendering&lt;br /&gt;
foreach($data as $k=&amp;gt;$var)&lt;br /&gt;
$odf-&amp;gt;setVars($k, $var);&lt;/p&gt;
&lt;p&gt;$odf-&amp;gt;exportAsAttachedFile();&lt;br /&gt;
?&amp;gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">luca capra</dc:creator><pubDate>Sun, 27 Mar 2011 16:14:48 -0000</pubDate><guid>https://sourceforge.net99cf72f51e899c04e765198fea3326e58b9da586</guid></item><item><title>Openoffice 3.x gives corrupted document warning</title><link>https://sourceforge.net/p/odtphp/bugs/12/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When the odt generated by odtPHP contains images, upon opening the document OpenOffice shows a dialog box saying that odt file is corrupted and ask to repair it or not. After studying Openoffice document structuring I found reason of this problem and also be able to solve it. Refer to my blog post for more details-:&lt;br /&gt;
This warning is due to the fact that odtPHP does not modifies manifest.xml file. For details about problem and its solution see my following blog spot-:&lt;br /&gt;
&lt;a href="http://vikasmahajan.wordpress.com/2010/12/09/odtphp-bug-solved/" rel="nofollow"&gt;http://vikasmahajan.wordpress.com/2010/12/09/odtphp-bug-solved/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 09 Dec 2010 16:47:44 -0000</pubDate><guid>https://sourceforge.net5a74352b2c14024bc550e3bd8a6415301b14cb13</guid></item><item><title>Bug with the charactere "&lt;"</title><link>https://sourceforge.net/p/odtphp/bugs/11/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;To start, we have a text like "3&amp;lt;6". When we open the document with OpenOffice, we have an error to the content.xml because of the character. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 01 Jun 2010 10:12:15 -0000</pubDate><guid>https://sourceforge.net89898728be6ce11004a53de1b8f9571a15112234</guid></item><item><title>html_entity_decode in setSegment() invalidated my document</title><link>https://sourceforge.net/p/odtphp/bugs/10/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;i had a '&amp;amp;' in my odtphp template file (&amp;amp;amp; in the content.xml) and after parcing, the document was unreadable.&lt;br /&gt;
the '&amp;amp;' was inside a segment. i changed the line 243 from&lt;/p&gt;
&lt;p&gt;if (preg_match($reg, html_entity_decode($this-&amp;gt;contentXml), $m) == 0) {&lt;br /&gt;
to &lt;br /&gt;
if (preg_match($reg, ($this-&amp;gt;contentXml), $m) == 0) {&lt;/p&gt;
&lt;p&gt;that seemed to have worked for me. just wanted to share ;-).&lt;br /&gt;
realy great work you guys did!!! saved me a bunch of work. keep it up, love windwerfer.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 22 May 2010 07:36:20 -0000</pubDate><guid>https://sourceforge.netf4f9561bb638d806cdd5cf597bb0270fe72a7e48</guid></item><item><title> problem with oo 3.2.0 and images</title><link>https://sourceforge.net/p/odtphp/bugs/9/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, everybody&lt;br /&gt;
I've found a nasty behavior. Consider an odt file with&lt;/p&gt;
&lt;p&gt;{image1}&lt;/p&gt;
&lt;p&gt;on opening OO gives you "corrupted file" warning but fix it.&lt;/p&gt;
&lt;p&gt;in odf file with&lt;/p&gt;
&lt;p&gt;{image1} {image2}&lt;/p&gt;
&lt;p&gt;on OO give you a "corrupted file" warning and fix only the first image.&lt;/p&gt;
&lt;p&gt;I dug in with a xml explorer the original and fixed content.xml and found out that the original have the images in a text tag&lt;br /&gt;
while the fixed has all the images out of text tag and listed as siblings.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 24 Feb 2010 10:40:13 -0000</pubDate><guid>https://sourceforge.net429eb395a8d1ae22f90b3ead754f7f0463a1ce8a</guid></item><item><title>bug avec open_basedir restriction</title><link>https://sourceforge.net/p/odtphp/bugs/8/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Le pb : l'appel $tmp = tempnam(null, md5(uniqid())); dans le constructeur échoue ; le passage du paramètre null essaye d'ouvrir un dossier temp par défaut qui n'est pas trouvé ("open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)") ; dans la config de nos serveurs (hotes virtuels), le dossier tmp n'est pas dans les chemins accessibles par défaut ; il faut du coup lui passer "en dur" le chemin : $tmp = tempnam('/var/www/virtual/www.monsite.fr/phptmp', md5(uniqid())); pour que cela marche. On tombe donc dans le cas du pb de la maj de la classe pour suivre son évolution.&lt;/p&gt;
&lt;p&gt;L'extension de la classe + redéfinition du constructeur (pour pallier le pb) provoque une erreur : Fatal error: Call to private method Odf::_moveRowSegments() from context 'Odf_Dfoad' in C:\wamp\www\phpodt\library\odf_dfoad.php on line 34&lt;/p&gt;
&lt;p&gt;puisque la méthode $this-&amp;gt;_moveRowSegments(); est appelée dans le constructeur parent&lt;/p&gt;
&lt;p&gt;Pour que cela fonctionne il faut soit passer la méthode à public (pas une bonne idée) ou protected (mieux) pour que la classe fille puisse l'étendre ; Dans ce cas je redéfini le constructeur dans la classe fille en passant en dur mon chemin ; marche bien tant que le constructeur de la classe parente n'évolue pas, c'est un copier/coller... (pas terrible pour l'évolutivité). Donc pas une très bonne solution non plus.&lt;/p&gt;
&lt;p&gt;En définitive ce qui me semble le plus approprié (dans une première approche) :&lt;/p&gt;
&lt;p&gt;Proposition de patch :&lt;br /&gt;
Passer par le chemin vers le répertoire d'upload temporaire du serveur et profiter du tableau $config et lui ajouter un paramètre par exemple : 'PATH_TO_TMP' =&amp;gt; null&lt;/p&gt;
&lt;p&gt;soit : protected $config = array(&lt;br /&gt;
'ZIP_PROXY' =&amp;gt; 'PclZipProxy',&lt;br /&gt;
'DELIMITER_LEFT' =&amp;gt; '{',&lt;br /&gt;
'DELIMITER_RIGHT' =&amp;gt; '}',&lt;br /&gt;
'PATH_TO_TMP' =&amp;gt; null&lt;br /&gt;
);&lt;/p&gt;
&lt;p&gt;et modifier $tmp = tempnam(null, md5(uniqid())); en&lt;/p&gt;
&lt;p&gt;$tmp = tempnam($this-&amp;gt;config['PATH_TO_TMP'], md5(uniqid()));&lt;/p&gt;
&lt;p&gt;du coup on peut passer le paramètre à la création de l'objet et profiter des mises à jour de la classe... (qui est très bien au passage !! ;) )&lt;/p&gt;
&lt;p&gt;Patch testé et validé sur mon serveur de prod.&lt;/p&gt;
&lt;p&gt;ou 2ème solution : récupérer la valeur de la directive upload_tmp_dir avec ini_get("upload_tmp_dir") si la tempnam échoue (peut être plus portable que la solution 1 ??) ; pas encore testé pour ma part.&lt;br /&gt;
Qu'en pensez-vous ?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eriseux</dc:creator><pubDate>Fri, 02 Oct 2009 18:25:22 -0000</pubDate><guid>https://sourceforge.net2d9309104f8a23de7f1059b525cf9e63a4edd5bc</guid></item><item><title>Bug with ZipArchive since PHP 5.3.7</title><link>https://sourceforge.net/p/odtphp/bugs/7/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Since PHP 5.2.7, the archive copression with Zip extension make troubles for ODT documents. The generated ODT document will be corrupted. This bug was confirmed by the php-zip author. It should be fixed in the next version of Zip.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vincent Brouté</dc:creator><pubDate>Fri, 15 May 2009 13:50:14 -0000</pubDate><guid>https://sourceforge.net1439e8cf3c9a5648e64bd167b16d3fafc62f327c</guid></item><item><title>Pictures are always centered</title><link>https://sourceforge.net/p/odtphp/bugs/6/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Pictures are always centered, even if in the template, the tag for the picture is to the right or to the left.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vincent Brouté</dc:creator><pubDate>Fri, 15 May 2009 13:45:41 -0000</pubDate><guid>https://sourceforge.net999c0fcfc2c96d28bab75596cef36bcbd1838266</guid></item><item><title>Carriage returns don't take effect</title><link>https://sourceforge.net/p/odtphp/bugs/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Carriage returns in data source don't take effect in the generated ODT document. All the text is displayed in line.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vincent Brouté</dc:creator><pubDate>Fri, 15 May 2009 13:42:06 -0000</pubDate><guid>https://sourceforge.net3dbbef127fa793d2c990d6cebcc5076f4a8454a4</guid></item></channel></rss>