-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloneBlock bug with subsequent document tables #1613
Comments
On slightly further investigation, I'm not sure what's going on. I created a very basic template and I couldn't reproduce my bug, it worked as I would expect it to work. However, I have encountered the issue on two other different templates. The regular expression in the preg_match of the cloneBlock function doesn't find the $blockname when a subsequent table is added to those documents. I don't get it. Edit: Narrowing things down further ... if the subsequent table after the cloneblock markers has 1 or 2 columns, the clone operation will work. If the subsequent table after the cloneblock markers has 3+ columns, the cloneblock operation will not work. I hope I have explained all of that ok. |
I have same problem too. |
I try to fix it,@shakenbakesl you can try this code,edit TemplateProcessor.php PHPWord version: 0.16
|
Thanks Mrrennen, I'll take a look at your code. For some reason I can't understand, the problem seemed to fix itself. I suffered a hard disk failure in the last few weeks and had to migrate my code to a new system. After that, it just started to work again!? :/ |
I am experiencing the same thing. I can get my second table to 3 columns by 2 rows. Oddly I have no issues having it be 6x11 on my local wamp stack, but it will only do 3x2 on my linux test server. |
My issue was the block i was trying to clone was too large for preg_match. I was able to fix this by adjusting the following setting ini_set("pcre.backtrack_limit", "10000000"); |
@rybo333 save the day. v: 0.16.0 |
This is:
Expected Behavior
I have a table which I have enclosed with cloneblock markers. This table is effectively in the middle of my document. The expectation is that cloneblock will clone it however many times I specify irrespective of what other data proceeds it in the document.
Current Behavior
If another arbitrary table exists in the document after the cloneblock marks, the cloneblock operation does not work
Failure Information
There is no failure
How to Reproduce
Please provide a code sample that reproduces the issue.
Context
The text was updated successfully, but these errors were encountered: