Forum


Replies: 9   Views: 4281
Replacetablevariable & parselinebreaks=true failure
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by falcana-blocked  · 12-06-2014 - 03:34

I'm trying to use replaceTableVariable together with "parseLineBreaks=true", which doesn't work properly. If the content for the cell is "Line1\nLine2" (with double quotes) -> this gives "Line1 Line2" in the document If the content for the cell is 'Line1\nLine2' (with single quotes) -> this gives "Line1</w:t><w:br/><w:t>Line2" in the document As seen from one of your examples I guess, that using single quotes would be the right way, but obviously there's a bug? Is there a workaround?

Posted by falcana-blocked  · 12-06-2014 - 03:42

Deleted by falcana-blocked · 12-06-2014 - 03:43

Posted by admin  · 13-06-2014 - 09:21

Hello, Thanks for posting the issue. We're solving the error and we'll post a patch to solve it. Regards.

Posted by Simplexe  · 24-06-2014 - 15:22

I had the same problem i looked in phpDocx Sources found the bug on line 606 in CreateDocxFromTemplate.inc did you post a fix? I didn't find it thanks regards

Posted by admin  · 25-06-2014 - 07:20

Hello, Yes, here is the patch to solve the issue for PRO, Corporate and Enterprise versions: http://pastebin.com/2B4gpYQ0 We're preparing a new package that solve this issue. Regards.

Posted by ragetech  · 29-06-2014 - 00:01

Deleted by ragetech · 29-06-2014 - 00:12

Posted by ragetech  · 29-06-2014 - 00:12

I understand from the previous post that a fix is available. How do I get this fix and patch my copy of Pro? I followed the link provided, but could not figure out what to do with the code shown? Thanks, Phil

Posted by admin  · 29-06-2014 - 08:08

Hello, The patch is valid only for PRO, Corporate and Enterprise packages. You just need to download the file and use the patch command to apply it. Of course a new package will be released with the fix. Regards.

Posted by Simplexe  · 02-07-2014 - 13:29

thanks but i try to get it, i get this message : This paste has been removed!

Posted by admin  · 02-07-2014 - 13:36

Hello, On this page you can get the patch: http://pastebin.com/UtqKziVz Regards.