Skip to content
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 not working #1477

Open
ddmo opened this issue Sep 24, 2018 · 6 comments · May be fixed by #1478
Open

cloneBlock not working #1477

ddmo opened this issue Sep 24, 2018 · 6 comments · May be fixed by #1478

Comments

@ddmo
Copy link

ddmo commented Sep 24, 2018

Hi, I'm unable to use cloneBlock with template. I'm using 0.15 version.
This on my php page:

$template->cloneBlock('CLONEME', 3);

This on my docx:

${CLONEME}
PIPPO
${/CLONEME}

But I obtain only without any clone:

${CLONEME}
PIPPO
${/CLONEME}

Any idea?

@babache
Copy link

babache commented Sep 26, 2018

Use my fix ;)

@mantico91
Copy link

Use my fix ;)

Perfect! Congrats, it works perfectly!

Only a question.
The block to clone has numbered paragraphs from 1 to 9.
The 2nd and following blocks after cloning the 1st have numbered paragraphs from 10 to 19 and so on.

Can I avoid this auto-replacing?

@5b6santhosh
Copy link

clone block not working when adding more content after the clone block please help
${test}
${v1}
${/test}
after adding text its not working
its depending on character

@gnotev
Copy link

gnotev commented May 12, 2020

Same here... made a million tests, I try to clone a block which is located in the middle of a document.
after the block there are several pages with line breaks, pictures and tables. it clones only if I delete all things after the block, or if I only leave some simple text and maby a simple table.

@igronus
Copy link
Contributor

igronus commented Sep 14, 2020

Tested in several independent environments and documents. Doesn't work because of "Catastrophic Backtracking" issue (https://www.regular-expressions.info/catastrophic.html). So actually patch from babache is vital.

@avenCN
Copy link

avenCN commented Nov 6, 2020

Tested in several independent environments and documents. Doesn't work because of "Catastrophic Backtracking" issue (https://www.regular-expressions.info/catastrophic.html). So actually patch from babache is vital.

How to do on linux system solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

7 participants