I'm using InDesign CC 2019 on a 2016 MacBook Pro running OS 10.13.6 and I'm having a problem when I export an EPUB file of a book I designed. This book contains endnotes and in the InDesign document when I check the endnote reference it looks correct. I also looked in Story Editor to check for anything weird, but it appears to look correct there too (as far as I can tell):
However, when I test in iBooks none of them go to the correct reference. They go to the same random page in chapter 11. When I click from where the references are in the text those all send me to the first page. I've also exported in both 2.1 and 3.0 with the neither making a difference.
The problem was detected when we tried to send to the publisher and received this error message for almost all of the endnotes (e.g. endnote-001, 002, and so on:
[ERROR]OEBPS/Trilogy_Hamilton_EPUB.xhtml: 53,1443: 'endnote-001': fragment identifier is not defined in 'OEBPS/Trilogy_Hamilton_EPUB.xhtml'
The only other error message that's different is this one:
[ERROR]could not parse OEBPS/Trilogy_Hamilton_EPUB-18.xhtml: duplicate id: endnote-000
I've never seen this before in any of the EPUB files I've exported, I've Googled quite a bit with no luck, and I can't think of anything else. Some sites seem to suggest a bug, but I really have no idea. What else can I try?