Skip to main content
New Participant
February 10, 2024
Answered

epub validation error

  • February 10, 2024
  • 7 replies
  • 8046 views
I am getting the following error when trying to validate a reflowable epub that I exported from InDesign: ERROR(RSC-012): epub/OEBPS/toc.xhtml(63,94): Fragment identifier is not defined.
 
Nothing I try is getting rid of the error. I've tried rebuilding the TOC in multiple ways. But it is not fixing the issue. 
Correct answer James Gifford—NitroPress

I ran an ePub 3.0, and it uploaded just fine to Amazon. Page Navigation on that file -was- checked. Should it be unchecked? 


Yes. It's a new feature (implemented in v19.2 or v19.5) supporting a form of accessiblity that is not fully cooked yet and is not universally implemented; Kindle simply strips it out, but many other EPUB vendors see the code it adds as a flaw. Don't check it, ever, until and unless you understand the accessibility it enables, need that feature, and the vendors have slowly caught up to the new standards and features.

 

Also stay out of the Accessiblity menu (a submenu of the Metadata export pane) for all the same reasons. Accessiblity is good, but it's an evolving area of EPUB and the industry is not entirely in step with the changes, and it's not clear if ID's implementation is completly conforming.

7 replies

alexanderklar
Inspiring
March 18, 2025

I received the same error and renaming my InDesign file so it didn't use German umlaut characters in the file name did the trick. Apparently this resulted in file names that EPUBCheck could resolve.

Inspiring
October 15, 2024

The issue is very likely in the pagelist. If you check "Page Navigation" on EPUB export, InDesign with put markers where the page breaks occur in the text. There is a minor bug where it sometimes lists a page number twice and then iterates the ID in the second instance: <span epub:type="pagebreak" role="doc-pagebreak" id="page123-1" aria-label=" Page 123. " />. The error will point to the line in toc.xhtml where that occurs and then you can hunt down and delete that erroneous pagebreak. 

Participating Frequently
June 28, 2024

Same error on loading to IngramSpark: (RSC-012): /OEBPS/toc.xhtml: Fragment identifier is not defined.

 

I don't have any TOC information set up in my ebook. (And I don't include a TOC in the print book.) I build the ebook TOC from file names, not from internal information. I've never encountered this issue on my previous books, and this is my 11th. Has something changed in a recent ID release?

 

James Gifford—NitroPress
Braniac
June 28, 2024

For both @delehman and @JKunkel99999999 — EPUB can be fussy about TOC elements, never more so than when you try to omit one. There's a regular error in FXL EPUBs where selecting "None" for the TOC, even if that's sensible, leaves a tag end in the TOC file that many book portals dislike.

 

I'd suggest generating a dynamic TOC, under a style name EPUB or EBOOK or the like, even if it's essentially empty or null, and assigning it to the export using the Multi-Level option. That's the only thing that seems to provide a proper stub or "empty" dynamic TOC.

 

Not at all sure if the fault lies with ID or inconsistent interpretation of its idea of an empty TOC. Many of these files seem to pass validation but not upload to one book vendor or another.

Participating Frequently
June 28, 2024

Thank you. I suppose it could be a change in Ingram's validation, too. I'll give it a shot, although I'll probably have to muddle through the steps, never having done a TOC this way beofre.

Participating Frequently
May 30, 2024

I'm getting a similar error message: "(RSC-012): /OEBPS/toc.xhtml: Fragment identifier is not defined."

I loaded my ebook to Amazon with no problems, but when I try to upload to Ingram Spark I get the above error message and am not able to proceed. After several trys, I stripped my book down to 2 pages - Neither of these 2 pages contain any TOC links. They're both just one sentence - "Mary had a little lamb."

The first page worked if I switched to Georgie type (which is a TT type). But if I added a second page with the same sentence, I still get the above error message. 

So far, I don't know what to do!

WritelyDividedEditing
Participating Frequently
September 19, 2024

Did you find a solution? An ePub I created for a client is generating the same problem: it uploaded to Amazon with no issues, but comes back with the RSC-012 Fragment identifier errors for Ingram Spark. I don't know where to start. I only use InDesign and am not familiar with Sigil, etc. 

James Gifford—NitroPress
Braniac
September 19, 2024

You shouldn't need to edit an exported EPUB for any reason.

 

I don't remember the whole of this thread, but start with this: under the EPUB export menu, is "Page Navigation" unchecked?

New Participant
February 29, 2024

The only solution I found to this problem was to export it as an Epub 2.0.1 rather than Epub 3.0.

James Gifford—NitroPress
Braniac
February 29, 2024

That's a bit like printing something in grayscale to fix a color problem.

 

Did you work through the steps above?

New Participant
February 29, 2024

Yes, I did. And nothing worked to remove the error. I know it is not ideal, but I was on a time crunch. And since none of the other solutions worked, I went with what did work. 

Inspiring
February 11, 2024

Hello, @karenb27703346  Use Sigil to open your ePub file and look for line 63.

If you can, send us a screenshot of the file.

 

This is simple error

New Participant
February 12, 2024

I opened it in Dreamweaver since I don't have Sigil. Here is the screenshot. 

James Gifford—NitroPress
Braniac
February 10, 2024

Have you deleted the TOC and re-created it? If you update a TOC frequently while editing, it can leave broken/orphaned anchors in the text, and ID will export them. They're harmless grit, for the most part, but validation will flag them.

 

Try deleting any TOC panel you have (and note that a visible/page TOC is something pretty much deprecated in e-books), tidying up your TOC definition as needed — don't forget to save it under a unique name, don't use [default] — and re-create it.

 

If, properly, your TOC is only for the dynamic e-book one, try creating a new "style" and saving it under a new name, then generate it. (I find it useful to actually place, then delete the text frame containing the TOC; not sure if that's necessary but it assures me TOC generation is completed.)

 

If none of that works, you will probably have to clean out the source file: export to IDML, then open that file and save as INDD again under a new name. That purges leftover/junk data like lost bookmarks and TOC markers, and rewrites the INDD structure to remove corruption. Then generate your TOC anew and you should have no further problem.