eba-diary / Travelogues-webapp

Web application for Nile Travelogues
https://travelogues.travelersinegypt.com/
GNU General Public License v3.0
0 stars 0 forks source link

TEI Components request incorrectly includes publication id with document request #15

Closed fechan closed 3 years ago

fechan commented 3 years ago

When using TEI Web Components to display any sample TEI file, the web components include the "id" parameter from the page for an unknown reason, causing it to break.

For example, TEI Web Components, when run from

http://localhost:8000/publication?id=157

will request

http://localhost:8080/exist/apps/tei-publisher/api/parts/test%2FF-rom.xml/json?user.language=en-US&odd=shakespeare.odd&view=page&id=157&_source=%5Bobject%20HTMLElement%5D

(Note the id=157)

fechan commented 3 years ago

If I change the name of the id URL parameter to anything else, it works fine again. Why TEI Publisher Web Components takes the id parameter from the URL, I have no idea. Might be a bug.

The solution is to rename the URL parameter across the entire web application...

fechan commented 3 years ago

Did a search and replace for /publication?id= and changed the parameter that publication.mjs looks for to publicationId. Everything seems to be working.