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

Tring to delete block surrounding table corrupts docx file #2690

Open
2 tasks
DPineault opened this issue Oct 11, 2024 · 2 comments
Open
2 tasks

Tring to delete block surrounding table corrupts docx file #2690

DPineault opened this issue Oct 11, 2024 · 2 comments

Comments

@DPineault
Copy link

Describe the bug and add attachments

In my original docx file I have a series of table that I surrounded with

${block_name}${/block_name}

then in my code I try to delete the unused block. the minute this operation is performed the resulting file is corrupt and cannot be opened.

Expected behavior

we'd expect the table and variables to be deleted and the file to work properly.

Steps to reproduce

$templateProcessor->deleteBlock('table2');

PHPWord version(s) where the bug happened

1.3

PHP version(s) where the bug happened

7.4

Priority

  • I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)
@DPineault
Copy link
Author

A workaround, for now, is to use

$templateProcessor->cloneBlock('table2', 0);

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

No branches or pull requests

2 participants
@DPineault and others