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

Issue with certain numId value not rendering bullet points with templateProcessor #2730

Open
2 tasks
derricka-lau opened this issue Jan 24, 2025 · 0 comments
Open
2 tasks

Comments

@derricka-lau
Copy link

derricka-lau commented Jan 24, 2025

Describe the bug and add attachments

Issue Summary:

Description: When generating Word documents using templateProcessor replaceXmlBlock, there is an issue with list numbering. Specifically, using <w:numId w:val='4'/> causes the list numbering to continue from a previous list instead of starting a new list. This results in incorrect numbering in the Word document.

Workaround:

Replacing <w:numId w:val='4'/> with <w:numId w:val='3.5'/> resolves the issue, suggesting there might be a bug with how templateProcessor handles certain numId values.

Expected behavior

<w:p>
<w:pPr>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="4"/>
</w:numPr>
</w:pPr>
<w:r>
<w:rPr/>
<w:t xml:space="preserve">xxxxxxx</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="4"/>
</w:numPr>
</w:pPr>
<w:r>
<w:rPr/>
<w:t xml:space="preserve">xxxxxxx</w:t>
</w:r>
</w:p>

does not generate lists with bullet point but <w:numId w:val="1"/>, <w:numId w:val="2"/>, <w:numId w:val="3"/>, <w:numId w:val="5"/> etc do.

Steps to reproduce

Use templateProcessor replaceXmlBlock to generate a Word document with multiple lists.
Assign <w:numId w:val='4'/> to one of the lists.
Observe that the list with numId=4 continues numbering from a previous list instead of starting a new list.

PHPWord version(s) where the bug happened

1.3.0

PHP version(s) where the bug happened

8.3

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)
@derricka-lau derricka-lau changed the title Issue with numId Value Causing Incorrect List style with templateProcessor Issue with numId Value Causing Incorrect List Style with templateProcessor Jan 24, 2025
@derricka-lau derricka-lau changed the title Issue with numId Value Causing Incorrect List Style with templateProcessor Issue with numId value causing incorrect list style with templateProcessor Jan 24, 2025
@derricka-lau derricka-lau changed the title Issue with numId value causing incorrect list style with templateProcessor Issue with certain numId value not rendering bullet points with templateProcessor Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant