Edit Book: ToC editor creates wrong entries

Bug #1428212 reported by arspr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Hi Kovid,

This is an elusive bug I've been suffering for a while but I haven't found a clear trigger yet.

It's just that "sometimes" you use the ToC editor, you save and exit the book and then, when you enter it again some of the entries are marked as "unlinked" (I mean with the red dot).

I've just suffered it and the problem was that the toc.ncx was pointing to a fragment id and that fragment id didn't exist. I mean it was something like myhtml.htm#e44b8e8c-26d3-4fb6-b0f1-8fdf4664fbb8 but the id="e44b8e8c-26d3-4fb6-b0f1-8fdf4664fbb8" hadn't been created in any tag of the file.

More over I perfectly remember when I created that ToC entry and I just selected the file (so the ToC editor says it was the "top of the file"). So no id="whatever" and no fragment id should have been used.

As I've said I haven't been able to find a replicable trigger but I've detected a possible related issue (or not) with a replicable trigger:

+ Open ToC editor.
+ Create (or edit) a new entry.
+ Select any file in the left list. In the right panel you get the correct info about being in the top of the file.
+ Now click inside the middle panel in order to create a fragment id and link inside that file.
+ Now DO NOT press OK, but select another file in the left list.
+ Return to the former file. You get the "top of the file" message again. (But it's false...)
+ Press OK.
+ A ToC entry has been created but instead to just the top of the file, the old in-the-middle position and fragment id has been used.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.