View Single Post
Old 02-15-2019, 05:44 PM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
I was able to reproduce this issue with a commercial epub2 book (Crichton, Michael - Dragon Teeth, Harper Collins, 2017). I simply opened the book and selected Tools > Index > Create Index.

The original order of the first 4 XHTML files in the Book Browser was:

cover.html
title.html
copyright.html
contents.html

original spine
Spoiler:
Code:
  <spine toc="ncx">
    <itemref idref="my-html-cover" linear="yes"/>
    <itemref idref="title"/>
    <itemref idref="copyright"/>
    <itemref idref="toc"/>
    <itemref idref="map"/>
    <itemref idref="introduction"/>
    <itemref idref="part001"/>
    <itemref idref="chapter001"/>
    <itemref idref="chapter002"/>
    <itemref idref="chapter003"/>
    <itemref idref="chapter004"/>
    <itemref idref="chapter005"/>
    <itemref idref="chapter006"/>
    <itemref idref="chapter007"/>
    <itemref idref="chapter008"/>
    <itemref idref="chapter009"/>
    <itemref idref="chapter010"/>
    <itemref idref="chapter011"/>
    <itemref idref="chapter012"/>
    <itemref idref="chapter013"/>
    <itemref idref="part002"/>
    <itemref idref="chapter014"/>
    <itemref idref="chapter015"/>
    <itemref idref="chapter016"/>
    <itemref idref="chapter017"/>
    <itemref idref="chapter018"/>
    <itemref idref="chapter019"/>
    <itemref idref="chapter020"/>
    <itemref idref="chapter021"/>
    <itemref idref="chapter022"/>
    <itemref idref="chapter023"/>
    <itemref idref="chapter024"/>
    <itemref idref="chapter025"/>
    <itemref idref="chapter026"/>
    <itemref idref="part003"/>
    <itemref idref="chapter027"/>
    <itemref idref="chapter028"/>
    <itemref idref="chapter029"/>
    <itemref idref="chapter030"/>
    <itemref idref="chapter031"/>
    <itemref idref="chapter032"/>
    <itemref idref="chapter033"/>
    <itemref idref="chapter034"/>
    <itemref idref="chapter035"/>
    <itemref idref="chapter036"/>
    <itemref idref="chapter037"/>
    <itemref idref="chapter038"/>
    <itemref idref="chapter039"/>
    <itemref idref="chapter040"/>
    <itemref idref="chapter041"/>
    <itemref idref="chapter042"/>
    <itemref idref="chapter043"/>
    <itemref idref="chapter044"/>
    <itemref idref="chapter045"/>
    <itemref idref="postscript"/>
    <itemref idref="note"/>
    <itemref idref="afterword"/>
    <itemref idref="bibliography"/>
    <itemref idref="footnote"/>
    <itemref idref="bm001"/>
    <itemref idref="bm002"/>
    <itemref idref="bm003"/>
    <itemref idref="abouttheauthor"/>
    <itemref idref="alsoby"/>
    <itemref idref="aboutpublisher"/>
  </spine>


after selecting Create Index the Book Browser order was changed to:

contents.html
cover.html
title.html
copyright.html

updated spine
Spoiler:
Code:
  <spine toc="ncx">
    <itemref idref="title"/>
    <itemref idref="copyright"/>
    <itemref idref="map"/>
    <itemref idref="introduction"/>
    <itemref idref="part001"/>
    <itemref idref="chapter001"/>
    <itemref idref="chapter002"/>
    <itemref idref="chapter003"/>
    <itemref idref="chapter004"/>
    <itemref idref="chapter005"/>
    <itemref idref="chapter006"/>
    <itemref idref="chapter007"/>
    <itemref idref="chapter008"/>
    <itemref idref="chapter009"/>
    <itemref idref="chapter010"/>
    <itemref idref="chapter011"/>
    <itemref idref="chapter012"/>
    <itemref idref="chapter013"/>
    <itemref idref="part002"/>
    <itemref idref="chapter014"/>
    <itemref idref="chapter015"/>
    <itemref idref="chapter016"/>
    <itemref idref="chapter017"/>
    <itemref idref="chapter018"/>
    <itemref idref="chapter019"/>
    <itemref idref="chapter020"/>
    <itemref idref="chapter021"/>
    <itemref idref="chapter022"/>
    <itemref idref="chapter023"/>
    <itemref idref="chapter024"/>
    <itemref idref="chapter025"/>
    <itemref idref="chapter026"/>
    <itemref idref="part003"/>
    <itemref idref="chapter027"/>
    <itemref idref="chapter028"/>
    <itemref idref="chapter029"/>
    <itemref idref="chapter030"/>
    <itemref idref="chapter031"/>
    <itemref idref="chapter032"/>
    <itemref idref="chapter033"/>
    <itemref idref="chapter034"/>
    <itemref idref="chapter035"/>
    <itemref idref="chapter036"/>
    <itemref idref="chapter037"/>
    <itemref idref="chapter038"/>
    <itemref idref="chapter039"/>
    <itemref idref="chapter040"/>
    <itemref idref="chapter041"/>
    <itemref idref="chapter042"/>
    <itemref idref="chapter043"/>
    <itemref idref="chapter044"/>
    <itemref idref="chapter045"/>
    <itemref idref="postscript"/>
    <itemref idref="note"/>
    <itemref idref="afterword"/>
    <itemref idref="bibliography"/>
    <itemref idref="footnote"/>
    <itemref idref="bm001"/>
    <itemref idref="bm002"/>
    <itemref idref="bm003"/>
    <itemref idref="abouttheauthor"/>
    <itemref idref="alsoby"/>
    <itemref idref="aboutpublisher"/>
    <itemref idref="Index.xhtml"/>
  </spine>


I.e., the Book Browser display doesn't match the actual spine. Also the spine reference of the item that was moved to the first position (<itemref idref="toc"/>) was deleted. The cover image spine entry (<itemref idref="my-html-cover" linear="yes"/>) was also deleted.

content.opf contained the following guide section:

Code:
  <guide>
    <reference type="cover" title="Cover" href="Text/cover.html"/>
    <reference type="toc" title="Contents" href="Text/contents.html"/>
    <reference type="text" title="Start" href="Text/title.html"/>
  </guide>
After deleting it, the bug disappeared.

@RbnJrg If your guide section contains entries, please temporarily remove them for testing purposes, before selecting Create Index and report back whether this makes a difference.

EDIT: You can also use this MR book by GrannyGrump to reproduce this issue.

Last edited by Doitsu; 02-15-2019 at 05:53 PM.
Doitsu is offline   Reply With Quote