Include tag logic failing due to duplicate IDs in resulting content #887

Closed
opened 2026-02-04 22:44:01 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @wouterloedeman on GitHub (Oct 31, 2018).

Describe the bug
Showing the "An unknown error occurred" warning after applying the bookmark link.

Steps To Reproduce
Steps to reproduce the behavior:
I created two pages in different chapters, contained in one book. After highlighting and copying the bookmark link from one page I pasted it on the other page. When I try to visit the second page now it will show me the "An unknown error occurred" warning.

I tested this again on a third page, which gives me the same problem after saving it with a bookmark link inserted. This time I created a new bookmark link. The bookmark link content is shown in the chapter overview though (the preview under the page title). The error-log (one instance of the error) is attached to this issue report.

laravel.log

Expected behavior
I was expecting it to display the page, even if it would contain an error. There seems to be no actions available in the front-end to solve the problem, delete the page, enter editing mode or revert the revision (as an admin).

Your Configuration:

  • BookStack Version: BookStack v0.24.1 on fresh Ubuntu Server 18.04
  • PHP Version: 7.2.10
  • Hosting Method (Nginx/Apache/Docker): Apache2

Additional context
It would help me a lot if you can tell me a way to delete or alter the two faulty pages. The pages involved did not contain any other info yet, so nothing was lost.

Originally created by @wouterloedeman on GitHub (Oct 31, 2018). **Describe the bug** Showing the "An unknown error occurred" warning after applying the bookmark link. **Steps To Reproduce** Steps to reproduce the behavior: I created two pages in different chapters, contained in one book. After highlighting and copying the bookmark link from one page I pasted it on the other page. When I try to visit the second page now it will show me the "An unknown error occurred" warning. I tested this again on a third page, which gives me the same problem after saving it with a bookmark link inserted. This time I created a new bookmark link. The bookmark link content is shown in the chapter overview though (the preview under the page title). The error-log (one instance of the error) is attached to this issue report. [laravel.log](https://github.com/BookStackApp/BookStack/files/2533205/laravel.log) **Expected behavior** I was expecting it to display the page, even if it would contain an error. There seems to be no actions available in the front-end to solve the problem, delete the page, enter editing mode or revert the revision (as an admin). **Your Configuration:** - BookStack Version: BookStack v0.24.1 on fresh Ubuntu Server 18.04 - PHP Version: 7.2.10 - Hosting Method (Nginx/Apache/Docker): Apache2 **Additional context** It would help me a lot if you can tell me a way to delete or alter the two faulty pages. The pages involved did not contain any other info yet, so nothing was lost.
OVERLORD added the 🐛 Bug🔍 Pending Validation labels 2026-02-04 22:44:01 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 3, 2018):

@wouterloedeman Thanks for reporting, Looks like a bug in the inclusion logic.

You could fix one of the pages by trying to view it, You will then see your error. Then add /edit to the end of the current URL and you should be taken directly to the editor for that page, so you can amend the page back to a working state.

@ssddanbrown commented on GitHub (Nov 3, 2018): @wouterloedeman Thanks for reporting, Looks like a bug in the inclusion logic. You could fix one of the pages by trying to view it, You will then see your error. Then add `/edit` to the end of the current URL and you should be taken directly to the editor for that page, so you can amend the page back to a working state.
Author
Owner

@comnam90 commented on GitHub (Nov 19, 2018):

I can confirm that I'm hitting the same bug.
Any ETA on a fix?

@comnam90 commented on GitHub (Nov 19, 2018): I can confirm that I'm hitting the same bug. Any ETA on a fix?
Author
Owner

@frbrs commented on GitHub (Jun 19, 2019):

Hi! Do you have any news regarding this issue ?

@frbrs commented on GitHub (Jun 19, 2019): Hi! Do you have any news regarding this issue ?
Author
Owner

@ssddanbrown commented on GitHub (Dec 12, 2020):

Updated title to be specific to the issue and marked for the next release as a reminder to check if this is still relevant and to fix if so.

@ssddanbrown commented on GitHub (Dec 12, 2020): Updated title to be specific to the issue and marked for the next release as a reminder to check if this is still relevant and to fix if so.
Author
Owner

@ssddanbrown commented on GitHub (Dec 19, 2020):

I've just spent a while attempting to re-produce this issue in various ways, including making manual edits to content to force duplicate ids and editing the code base to remove things that could ignore errors.

I was not able to re-produce this at all. I've considerably changed some of the code in the page content handling so something may have fixed it in the past year or so. Therefore I'll close this off but if you come across this issue again on the current version of BookStack feel free to open a new issue.

@ssddanbrown commented on GitHub (Dec 19, 2020): I've just spent a while attempting to re-produce this issue in various ways, including making manual edits to content to force duplicate ids and editing the code base to remove things that could ignore errors. I was not able to re-produce this at all. I've considerably changed some of the code in the page content handling so something may have fixed it in the past year or so. Therefore I'll close this off but if you come across this issue again on the current version of BookStack feel free to open a new issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#887