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

Publication failing when a page title (link) is broken #29

Open
TitouanM opened this issue Jul 2, 2024 · 2 comments
Open

Publication failing when a page title (link) is broken #29

TitouanM opened this issue Jul 2, 2024 · 2 comments

Comments

@TitouanM
Copy link

TitouanM commented Jul 2, 2024

Hello

I'm using tis plugin on a big Antora project. Some links seems to be broken or pointing on a page that doesn't exist.

Actually, the confluence publication fails and stops at the first broken link.

Would it be possible to add an option to ignore those broken links please ?

Best regards

@PacoVK
Copy link
Owner

PacoVK commented Jul 3, 2024

So you want an option to allow the export of pages with broken links?

Could you provide me the error logs and an example that causes the error? I could investigate and fix the issue probably.

@TitouanM
Copy link
Author

TitouanM commented Jul 5, 2024

I have some examples that cause the issue :

  • image:image_name.JPG[link={imagesdir}/image_name.JPG] => Here, the images are located in ROOT/assets/images. The correct path that resolve the problem is image:image_name.JPG[]
  • image:../image_name.png[] => Here the correct path is : image:image_name.png[]`
  • link:../architecture/ADR/unePage.html[] needed to be link:architecture/ADR/unePage.html[]

The same issue happen with attachments, links, images .

The error log :
{"level":"fatal","time":1720179763956,"name":"antora","err":{"type":"TypeError","stack":"TypeError\n at /node_modules/antora-confluence/dist/lib/transformer/LinkTransformer.js:98:140\n at Array.forEach (<anonymous>)\n at rewriteInternalLinks (/node_modules/antora-confluence/dist/lib/transformer/LinkTransformer.js:77:41)\n at processPage (/node_modules/antora-confluence/dist/lib/service/PageService.js:303:52)\n at publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:187:40)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:281:13)\n at async publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:281:13)\n at async publish (/node_modules/antora-confluence/dist/lib/service/PageService.js:281:13)"},"msg":"Cannot read properties of undefined (reading 'pageTitle')"}

Hope this helps !

Thanks for your fast answer !

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