-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cannot read properties of undefined (reading 'pageTitle') #19
Comments
@andreas-hempel thanks for raising this issue. |
Hey @andreas-hempel thanks for your patience. I have a hard time to reproduce this. Would it be possible to send me a small reproducer? You can also contact me via LinkedIn for that :) |
Hello @PacoVK Thank you for your feedback. I will try to reproduce the error in a new project this week. The current project where the error occurs is slightly larger. As soon as I can reproduce the error, I will make the project available to you. Kind Regards, |
Sounds good thanks for your help! |
Hello @PacoVK, I was able to reproduce the problem in a new project. You can find the project attached. The error occurs when I insert an xref in the tables.adoc file to an anchor that is defined in the message-header.csv file. The message-header.csv file is used as include in the message-header.adoc file. Kind Regards, |
Here is my console output
|
Thanks for the reproducer, now i found the bug and already have most of the fix. I'll try to merge and release soon :) |
@andreas-hempel could you please also confirm whether |
Hello @PacoVK, I have tested version 0.2.4. and the error "Cannot read properties of undefined (reading 'pageTitle')" no longer occurs. However, I now get the error "Cannot read properties of undefined (reading 'number')". Here is the output on the console.
I have also tested the project I have provided so that you can reproduce the error and I get the same error there. I believe the same error is described in issue #11 Kind Regards, |
Hey @andreas-hempel unfortunately it is not reproducable on my end, but i recognized Confluence seems to handle DRAFTs differently on some versions. I assume you are using Confluence on-prem? I am using Confluence Cloud. Will provide a new fix that should catch that error properly. Thanks for your support! Really appreciate it |
0.2.5 has the latest improvement, let's see if that fixes the issue on your end. BTW since 0.2.4 seems to fail on state creation, all resources on Confluence probably exist already. Captain failed after state creation, right? |
Hello @PacoVK, we use confluence in the on-prem version. The error no longer occurs in version 0.2.5. Unfortunately, the corresponding pages are not created in confluence. There are also no pages to be found in the drafts. For testing purposes, I have simply used an incorrect password and then get a 401. Apparently the connection to confluence is successful, but the following API calls do not seem to work. Is there a way to increase the logging to get the API call displayed? I could then use Postman to check which error comes back from confluence and whether I can adjust the request accordingly to submit it successfully. Alternatively, we can also have a debugging session and we can reproduce this in my environment. Best regards, |
log output:
|
Hello @PacoVK, I have created a collection in Postman to test the creation of a new page. The following call has successfully created the page on our Confluence server:
|
I have looked at the implementation of your Confluence client and in line 30
|
I tried something else to add some logging locally in the dist folder of the plugin. The url that is used looks like this https://{{server}}//rest/api/content. There are two slashes before the path. I simply adapted this locally to https://{{server}}/rest/api/content and was thus able to successfully create the pages in confluence. |
@andreas-hempel wow, thank you that is an important finding! Thanks again for investing your time into this issue. |
Hello @PacoVK, I have installed and tested version 0.3.0. This has fixed the error. Thank you very much for your support, |
Great to hear it's finally working. Thanks again, your investigations made it quite a lot easier to fix 🚀 |
Hello,
when running npx antora .\antora-playbook-confluence-local.yml --stacktrace I get the following error:
FATAL (antora): Cannot read properties of undefined (reading 'pageTitle')
Attached you will find a log file and the playbook.
Do you have any tips on how I can avoid this problem?
Many thanks and best regards,
Andreas Hempel
output.log
antora-playbook-confluence-local.txt
The text was updated successfully, but these errors were encountered: