Skip to content

Page include feature allows content to have duplicate IDs #3982

@gaufde

Description

@gaufde

Describe the Bug

I'm not exactly sure if this is best described as a bug or a feature request. However, when using the page include feature, it is possible to have ID's duplicated on the same page.

Steps to Reproduce

As an example, if you include an entire page twice, then all of the content IDs will be duplicated.

Obviously this example is a little weird since there is not good reason to include an entire page twice. However, if you start to make modifications as described in #3854, and you use page templates to create an outline for multiple pages, then it is easy for you to accidentally get duplicate IDs on one page that embeds similar content from multiple other pages.

Expected Behaviour

This likely won't be a high-priority bug to fix, but I think it should be considered as the page include feature grows.

I'm not exactly what the best way to fix this issue is. Maybe the content IDs should somehow be re-generated on the new page after the inserted content is parsed and included.

Alternatively, Bookstack could force IDs to be unique across all pages.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

BookStack v22.11.1

PHP Version

No response

Hosting Environment

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions