When I navigate from https://teipublisher.com/exist/apps/tei-publisher/doc/documentation.xml?odd=docbook.odd&id=web-annotations (“Annotating Documents”) to the next chapter (“Configuring the Annotation Editor”) using the TOC in the left sidebar, the root parameter is updated, but the id parameter is not. As a result, if I reload the page, I’m returned to “Annotating Documents” instead of the expected page (“Configuring the Annotation Editor”).
As a result of this bug, if a user shares a URL to a place in the documentation, the recipient may end up on the wrong page.
Looking at the source for documentation.xml, I see some sections (like “Annotating Documents”) have @xml:id attributes, but others (like “Configuring the Annotation Editor”) don’t. The application seems to update the id parameter in the URL if the selected section has an xml:id attribute, but they leave any existing id in place if the selected section does not have an xml:id attribute, instead of stripping the id parameter and letting the root parameter serve as the address for the target element. (When a request contains both an id parameter and a root parameter, TEI Publisher only considers the id parameter.)
As a workaround for this specific report, we could simply add xml:id attributes to all section elements, but it seems that the application should handle this scenario more gracefully: the id parameter should be stripped from link URLs when the target element lacks an xml:id attribute.
When I navigate from https://teipublisher.com/exist/apps/tei-publisher/doc/documentation.xml?odd=docbook.odd&id=web-annotations (“Annotating Documents”) to the next chapter (“Configuring the Annotation Editor”) using the TOC in the left sidebar, the
root
parameter is updated, but theid
parameter is not. As a result, if I reload the page, I’m returned to “Annotating Documents” instead of the expected page (“Configuring the Annotation Editor”).As a result of this bug, if a user shares a URL to a place in the documentation, the recipient may end up on the wrong page.
Looking at the source for documentation.xml, I see some sections (like “Annotating Documents”) have
@xml:id
attributes, but others (like “Configuring the Annotation Editor”) don’t. The application seems to update theid
parameter in the URL if the selected section has anxml:id
attribute, but they leave any existingid
in place if the selected section does not have anxml:id
attribute, instead of stripping theid
parameter and letting theroot
parameter serve as the address for the target element. (When a request contains both anid
parameter and aroot
parameter, TEI Publisher only considers theid
parameter.)As a workaround for this specific report, we could simply add
xml:id
attributes to all section elements, but it seems that the application should handle this scenario more gracefully: theid
parameter should be stripped from link URLs when the target element lacks anxml:id
attribute.