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

[Bug]: Docx nested ul/li doesn't work properly #1133

Closed
alwyn974 opened this issue Apr 27, 2024 · 1 comment
Closed

[Bug]: Docx nested ul/li doesn't work properly #1133

alwyn974 opened this issue Apr 27, 2024 · 1 comment

Comments

@alwyn974
Copy link

alwyn974 commented Apr 27, 2024

Hi, I found this bug while trying to make a list from ul/li. It was already there when I created #1119
Here some screenshot


Wrong type of chips used

image

It should look like this

image


Here the playground link https://playground.jsreport.net/w/alwyn974/xEnhA7Yu
There's also another example with the maximum depth allowed by word.
Also, an error occurs if I try to add another nested element. I've included it in the json as a tooMuchNested property.

Report "template" render failed.

Error while executing docx recipe
(because) cannot read properties of undefined (reading 'hasAttribute')
TypeError: Cannot read properties of undefined (reading 'hasAttribute')
    at addOrGetNumbering (/app/node_modules/@jsreport/jsreport-docx/lib/postprocess/html/convertDocxMetaToNodes.js:1195:20)
    at convertDocxMetaToNodes (/app/node_modules/@jsreport/jsreport-docx/lib/postprocess/html/convertDocxMetaToNodes.js:96:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async processParagraphHtmlEmbedContainer (/app/node_modules/@jsreport/jsreport-docx/lib/postprocess/html/index.js:130:22)
    at async /app/node_modules/@jsreport/jsreport-docx/lib/postprocess/html/index.js:35:33
    at async Promise.all (index 1)
    at async module.exports (/app/node_modules/@jsreport/jsreport-docx/lib/postprocess/html/index.js:22:23)
    at async module.exports (/app/node_modules/@jsreport/jsreport-docx/lib/postprocess/postprocess.js:28:3)
    at async module.exports (/app/node_modules/@jsreport/jsreport-docx/lib/processDocx.js:92:5)
    at async module.exports (/app/node_modules/@jsreport/jsreport-docx/lib/recipe.js:35:28)
wrapped by:
Error: Error while executing docx recipe
(because) cannot read properties of undefined (reading 'hasAttribute')
    at module.exports (/app/node_modules/@jsreport/jsreport-core/lib/shared/createError.js:10:13)
    at WorkerReporter.createError (/app/node_modules/@jsreport/jsreport-core/lib/shared/reporter.js:53:12)
    at module.exports (/app/node_modules/@jsreport/jsreport-docx/lib/processDocx.js:117:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async module.exports (/app/node_modules/@jsreport/jsreport-docx/lib/recipe.js:35:28)
    at async invokeRender (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:93:5)
    at async WorkerReporter._render (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:148:7)
    at async /app/node_modules/@jsreport/jsreport-core/lib/worker/reporter.js:227:24
    at async processAndResponse (/app/node_modules/@jsreport/advanced-workers/lib/workerHandler.js:41:17)

Tested on jsreport version 4.2.0-full and 4.3.1-full

@bjrmatos
Copy link
Collaborator

thanks, we will check

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

No branches or pull requests

2 participants