-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unclear error when a page title is identical to that of the parent-id #142
Comments
Hello, thank you for the report. I'll prepare a fix that will check for clash with parent ID title. As for "stealing" pages that are not under parent - that's a good question if this user mistake or intention. I think it is usually the latter, but I can add some marker in upload logs to highlight such scenarios or a command line option to detect this and fail. |
Thanks, that sounds great. I made a separate report #144 to detail the "page stealing" issue, as I think the title is a poor identifier, and leads to bigger problems. I'd be happy to help fix this! |
I only just discovered the option to provide a tenant, which is very useful, although it could still be useful to provide the option to prevent stealing of pages that are not associated with a tenant. |
@feliksik Tenants are designed to allow you to use text2confl from multiple page sources (e.g. separate git repos with docs) and avoid pages removal and stealing during cleanup. For single source publications this will not help you unfortunately. I'm planning to fix issue with parent title this weekend. As for detection of stealing pages in general - let's continue discussion in #144 |
@feliksik it took a while to find time and fix this, but now there will be dedicated error for this scenario. Available in |
With confluence-publisher, I used to provide my root asciidoc-page as 'ancestor'. Not sure if this was the intention, but it works. This way, the ancestor is replaced by the root asciidoc page, instead of it being attached under it.
Text2confl accepts a
parent-id
instead ofancestor
. It seems like the text2confl managed pages will be attached as children to theparent-id
. Thus the parent-id is not be overwritten, but managed manually.I'm not sure which of these approaches is the safest; but with text2confl, when one of the pages actually has the title of the existing parent-id, it tries to update them, but also provides it's own ID as the parent:
Note how the id in the PUT URL and the body are the same.
This fails with a vague error that cost me a lot of time to figure out:
Also, when a text2conf page as the same title as another page that is not under the same ancestor, weird stuff happens: the existing page if updated and moved into the uploaded tree. It is more likely that this is a mistake by the user, if this page is not originally under the parent page.
The text was updated successfully, but these errors were encountered: