Mobi compile fails to resolve hyperlinks

Okay, I can clearly see the nature of the problem, and have an idea of how it might have come about. Firstly, is it possible for there to be footnotes within footnotes in Word? If so that might explain it—but I can reproduce the creation of the problem in Scrivener as well, by copying some text with a linked footnote in the text, and then pasting that into a new footnote. The link to the original footnote is not removed, but is rendered invisible until you compile. So that’s something we need to fix.

In the meanwhile, if you come across this problem again, here are some tips for much more efficiently solving validation problems:

  • Download and install the ePubCheck plugin for Sigil. ePubCheck all on its own is invaluable if you intend to get into ebook publishing, because as you’ve seen, the error reporting in readers and such can be extremely useless. “Line 11” left you wasting who knows how long trying to find the file, where as ePub check will tell you precisely, down to the letter of the line, where the problem is. Better yet, when integrated with Sigil, the error report (run the checker on your open .epub file via the Plugins menu) will display each problem as a line in a report that you can double-click on that jumps you straight to the spot.

    That’s my bad. ePubCheck plugin used to come preinstalled in Sigil and was part of the regular validation check. But it seems now it’s a separate thing.

  • Okay, say you don’t want to install plugins though—you can still often find problems based upon the text given in the error report. For example, you could have searched the whole ebook for “scrivcmt” rather than looking for it by hand. Just press Ctrl+F and make sure the “Mode” switch along the bottom is set to “All HTML Files” in the middle.

All right, so that should help you find the problem more efficiently. Once you know where it is, to fix it in Scrivener:

  1. In the main editor, select the problematic footnote marker, or a bit of text around it as well.
  2. Use the Edit ▸ Transformations ▸ Convert Inspector Footnotes to Inline Footnotes.
  3. The bad link should now be plainly visible. You won’t be able to delete it normally because it is a bad link. Just select a bit before and after it and retype that bit.
  4. Select the entire inline footnote, and use the Transformations menu to convert it back to an inspector footnote.

It’s a few steps, but that should be easier than retyping in the whole thing—and you could do that in the inspector footnote as well if you know exactly where it is too. But now that you know how it got to be that way you can watch out for accidentally pasting nested footnotes and avoid the problem before it creates errors.