Error generating TOC on AZW3 format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Calibre version: 5.1
OS: Windows 10 x64 (build 19041, aka "version 2004")
When defining the table of contents (TOC) in a AZW3 book, I am getting strange but consistent errors related to auto-generated ids. I can correctly set up the TOC using either the editor or directly in the toc.ncx file and the check shows no errors. But when I save, close, and re-open the book in the editor, all the TOC entries are changed to point to invalid IDs that seem to be some kind of default values that do not exist in the actual HTML.
This is true when:
* I set a TOC entry as "top of page" (no id in the link)
* I set a TOC entry to the first DIV in the document. Calibre generates a "top_1" id in the HTML.
* I set my own (valid) IDs on the top DIV or BODY tag and reference them in toc.ncx
In all cases, after saving and reopening, the TOC entries look something like:
<content src="text/
<content src="text/
<content src="text/
I see the same issue in metadata.opf:
<reference type="toc" href="text/
Note the invalid auto-generated IDs all share the same GUID value at the end. I have been unable to determine the source of this GUID. Every time I save and reopen, the IDs are all re-generated with a new GUID. This means that I cannot manually use these IDs in the HTML even if they were valid, which most are not.
In practice, I do not know if the error exists when saving the file or when re-opening the file. When loaded on my kindle (paperwhite 3) the TOC bookmarks mostly work, with one exception. I can't see anything different about this chapter in the editor.
The HTML and CSS is otherwise fairly clean, with only a bit of DIV-itis. Nothing obviously strange.
This is a new book created with Calibre 5.1, converted from an epub format and merged from multiple source files. Attaching.
Changed in calibre: | |
status: | Invalid → New |
status: | New → Invalid |
I cannot replicate. Steps I tried:
1) Open azw3 file html#toc_ 2
2) Open the ToC editor all the entries have red dots next to them
indicating broken links
3) Change the location of the first entry to point to the top of the
first file.
4) Click OK to close the dialog
5) Click save and exit editor
6) Re-open editor with the same file
7) Open the toc editor, the link is now green and clicking on it in the
table of contents panel (which you can access from the view menu) moves
the cursor to the correct place.
8) Checking by opening the toc.ncx shows the link going to text/part0000.
and ctrl clicking it jumps to the correct place.
status invalid