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

Title is expected as an ancestor #79

Open
wbh1 opened this issue Mar 30, 2021 · 2 comments
Open

Title is expected as an ancestor #79

wbh1 opened this issue Mar 30, 2021 · 2 comments
Labels

Comments

@wbh1
Copy link
Contributor

wbh1 commented Mar 30, 2021

<!-- Space: ~wbhegedus -->
<!-- Parent: William Hegedus’s Home -->
<!-- Parent: Notes -->
<!-- Parent: Miscellaneous -->
<!-- Title: Podman -->
❯ mark -f misc/podman.md
2021-03-30 09:39:39.346 FATAL unable to resolve page
                              └─ the page has fewer parents than expected
                                 ├─ title: Podman
                                 ├─ actual: William Hegedus’s Home > Notes > Miscellaneous
                                 ├─ expected: William Hegedus’s Home > Notes > Miscellaneous > Podman
                                 └─ title: Podman

I've confirmed in the REST API Browser in Confluence (v7.4.0) that the results returned from Confluence are correct. I'm not sure why the title is expected to be an ancestor... Do we expect Confluence to list the page itself as an ancestor?

Here is where the page title is added to the ancestry tree. Here is where the ancestry check fails because the page title is not included as an ancestor from the Confluence API.

Interestingly, I was able to create the page, but not update it. Likely just because the ancestors had to be created at that time.

@wbh1
Copy link
Contributor Author

wbh1 commented Mar 30, 2021

It works when you do not specify the root article title.
This works:

<!-- Space: ~wbhegedus -->
<!-- Parent: Notes -->
<!-- Parent: Miscellaneous -->
<!-- Title: Podman -->

I'll leave the issue open due to the un-intuitive behavior/error, that should likely be addressed.

@kovetskiy kovetskiy added the bug label Jul 14, 2021
@whitelynx
Copy link

This may only occur when the page already exists. The first time I ran, it worked fine:

# mark -f Data\ \&\ BI\ Notes/index.md
2025-02-24 15:07:19.954 INFO  processing Data & BI Notes/index.md
2025-02-24 15:07:22.889 INFO  page will be stored under path: Overview > Data & BI Notes
2025-02-24 15:07:25.384 INFO  the leading H1 heading will be excluded from the Confluence output
2025-02-24 15:07:26.354 INFO  page successfully updated: https://something.atlassian.net/wiki/spaces/~fffffffffffff9424e42dbbe0c4a15deffffff/pages/3854893057/Data+BI+Notes
https://something.atlassian.net/wiki/spaces/~fffffffffffff9424e42dbbe0c4a15deffffff/pages/3854893057/Data+BI+Notes

Then, running it again after a minor change (with slightly different args because I was trying to also add another page) it failed:

# mark -f 'Data & BI Notes/**.md'
2025-02-24 17:18:39.127 INFO  processing Data & BI Notes/index.md
2025-02-24 17:18:39.888 FATAL unable to resolve page
                              └─ the page has fewer parents than expected
                                 ├─ title: Data & BI Notes
                                 ├─ actual: Overview
                                 ├─ expected: overview > Data & BI Notes
                                 └─ title: Data & BI Notes

But then, after finding this issue and removing the only <!-- Parent: ... --> line, it worked again:

# mark -f 'Data & BI Notes/**.md'
2025-02-24 17:22:43.486 INFO  processing Data & BI Notes/index.md
2025-02-24 17:22:44.448 INFO  page will be stored under path: Overview > Data & BI Notes
2025-02-24 17:22:44.606 INFO  the leading H1 heading will be excluded from the Confluence output
2025-02-24 17:22:45.421 INFO  page successfully updated: https://whownet.atlassian.net/wiki/spaces/~fffffffffffff9424e42dbbe0c4a15deffffff/pages/3854893057/Data+BI+Notes
https://whownet.atlassian.net/wiki/spaces/~fffffffffffff9424e42dbbe0c4a15deffffff/pages/3854893057/Data+BI+Notes

This is especially unintuitive, because the README.md states that Parent is required, but removing the only one in the file fixed this issue.

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

No branches or pull requests

3 participants