Bookmarks not unique on PDF Export for Table of Contents links #6174
Labels
No labels
Focus: A11y
Focus: Admin/Meta
Focus: Authentication
Focus: Back-End
Focus: Database
Focus: Design & UX
Focus: Editor - Markdown
Focus: Editor - WYSIWYG
Focus: Export System
Focus: Front-End
Focus: Translations
Focus: View Customization
Is: Docs Update
Is: Enhancement
Is: Priority
Is: Security
Is: Upstream
Status
Blocked
Status
Open to discussion
Status
Out of scope
Status
Pending Validation
Type
API Request
Type
Bug Report
Type
Feature Request
Type
Happy feedback
Type
Maintenance
Type
Question
Type
Support
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bookstack/bookstack#6174
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the Bug
Table of Content hyperlinks do not correctly link to the right pages when generating a PDF export of a book that has common named headers within pages of the book.
It appears to link to the last element within the page structure that uses the same name of the bookmark.
When editing the page and viewing the HTML code, the bookmark ID appears to be just a truncated version of the header text, unique to the page if there were duplicated headers with same text. But it is not unique enough within the book for use with PDF outputs.
Example PDF generated to show the issue where each page has a common "Medium Header" element just as example.
Steps to Reproduce
Expected Behaviour
Screenshots or Additional Context
Example screenshots of two different pages using the same content. An example usecase would be a "template" page that has common sections for describing a procedure or tasks with sections steps involved.
Browser Details
No response
Exact BookStack Version
v26.05.2
Hi @johnnyuk,
Just to confirm, are you using some kind of customization to generate a more extensive table of contents in book exports?
By default, I thought we only list the chapters/pages in the export TOC for book exports, hence why this has not been raised before.
I guess it would also still be an issue for manually created id-based hyperlinks in content too though.