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

Pages with same title put different parents are conflicting #450

Open
ChristofferNissen opened this issue Jun 3, 2024 · 2 comments
Open
Labels

Comments

@ChristofferNissen
Copy link

What happened?

Imagine the following pages:

  1. Name: "Observability" Parent: "1"
  2. Name: "Observability" Parent: "2"

When syncing to Confluence, what happens is that the 2. page does not show up on confluence, and Page 1 is actually Page 2.

What did you expect to happen?

I expect to be able to have pages with the same Title under different Parents.

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Add page with name: "Observability" and parent: "1"
  2. Add page with name: "Observability" and parent: "2"
  3. Sync to Confluence with Mark
  4. Check contents of pages on Confluence

Further Information (please complete the following information)

  • Mark Version (mark --version): 9.11.1
  • Mark Parameters: --drop-h1, --title-from-h1
  • Confluence Hosting: Datacenter
  • Confluence Version: 8.5.5
  • Environment specific Information: Running on Ubuntu latest agents on Azure DevOps

Logs or other output

I can not provide logs as they might contain sensitive information as it logs the output of our pages. Let me know if interested in anything specific.

Logs does not show any errors produced, and mark exits with error code 0

Additional context

Add any other context about the problem here.

@mrueg
Copy link
Collaborator

mrueg commented Jul 30, 2024

I believe pages do need to have a unique name per space and not per parent.

@pwlandoll
Copy link
Contributor

That's correct, I've come across this issue before. Since that's a hard limitation from Confluence, there isn't really a way to change that behavior.

A workaround is to make it easier to ensure that each page title is unique to the space.

Looking at a similar tool, the confluencebuilder plugin for Sphinx in Python, there is a configuration option that allows you to add a postfix (or prefix) to a page title. Of particular note is the hash value that's available, which is a deterministic hash of the space, parent "path", and page title together. That guarantees that even if two pages have the same title before being uploaded, as long as they have different parent "paths" the appended hash value will be different.

I've opened #509 with a similar implementation that could help avoid this issue.

pwlandoll added a commit to pwlandoll/mark that referenced this issue Oct 8, 2024
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