EPUB FixerKDP upload error scanner

EPUB error guide

RSC_012 fragment identifier is not defined

How to handle an RSC_012 missing fragment error by checking the file before the # symbol and the anchor id after it before another KDP upload.

1. Example report output

What an RSC_012 report should make clear.

The useful detail is not just the code. It is the file before the # symbol, the missing fragment after it, and whether the link is navigation, a footnote, or an ordinary section jump.

EPUBCheck message

ERROR(RSC-012): OEBPS/nav.xhtml(18,32): Fragment identifier is not defined.

KDP / Previewer wording

A table of contents, footnote, or internal link points to a missing location.

EPUB Fixer report

Source link OEBPS/nav.xhtml, target file OEBPS/Text/chapter2.xhtml, missing fragment #note-4.

Do this next

Open the target XHTML file and confirm the intended id before adding or renaming an anchor.

Do not do this

Do not add #note-4 to the top of the chapter unless that is where the reader should land.

A renamed heading id can be safe to align. Footnotes and backlinks need context because the wrong anchor can send readers to the wrong note.

2. Next step

Check the file before #, then the id after #.

RSC_012 is usually an anchor problem. Split the target into file path and fragment before deciding whether to scan, inspect manually, or send it back to the formatter.

Upload scan

Use this when the broken anchor message is vague.

The report can show whether the missing fragment belongs to nav.xhtml, a chapter link, a footnote, an endnote, or a backlink.

Manual check

Use this for footnotes, backlinks, or repeated headings.

Open the target XHTML file and confirm the exact reading location before adding or renaming an id.

Formatter handoff

Use this when the export tool regenerated anchors.

Send the source file, target file, missing fragment, and surrounding heading or note text so the source project can be fixed cleanly.

3. Concrete path example

A typical RSC_012 link has two separate parts.

The file can exist while the anchor after the # is still missing.

Message: ERROR(RSC-012): OEBPS/nav.xhtml points to Text/chapter2.xhtml#section-5
Report shows: file exists, missing id section-5
Possible id: sec-5
Fix: use sec-5 only if it is the same reading location

Only use sec-5 if it is the intended heading. Do not point the link to a different section just because the name looks similar.

Quick decision

Find the anchor type before adding or renaming ids.

The file before the # and the fragment after it must both be checked. The same missing id can be harmless in a section link and risky in a footnote loop.

Scan first

You do not know which file owns the broken anchor.

Scan the EPUB to locate the source link and target XHTML file, then decide whether the missing fragment is a heading, TOC target, footnote, or backlink.

Safe fix

One nearby id clearly replaced the old fragment.

A renamed heading id or moved body id can be repaired when the target is unique and the reading location stays the same.

Manual review

The broken anchor is a note, backlink, or repeated heading.

Footnotes and repeated section titles are easy to mis-target. Do not create a new id unless you know exactly where the reader should land.

Start here

Split the link at the # symbol first.

RSC_012 is easy to misread as a missing chapter. Usually the XHTML file exists; the problem is the anchor after the #. Check those two parts separately before changing nav or footnote links.

What it means

The target XHTML file exists, but the exact anchor inside that file does not. This is different from a missing file error: the path before the # resolves, while the fragment after the # points to an id that is absent, renamed, duplicated, or located in a different file.

Can it be fixed automatically?

EPUB Fixer can repair a fragment only when there is one clear target, such as a moved body id, an obvious heading id mismatch, or a unique nearby anchor in the same XHTML file. A safe repair should keep the link in the same reading context and pass EPUBCheck again after the change.

What to check next

Split the broken link into two parts: the file path before # and the anchor name after #.

What not to assume

Footnotes, endnotes, repeated headings, and duplicated section titles often require manual review because choosing the wrong anchor can send readers to the wrong note, chapter section, or backlink. Do not create a new anchor if you cannot prove where the reader should land.

Common situations

Separate RSC_012 by the kind of link that broke.

RSC_012 always points after a # symbol, but the source of that link determines the risk.

A table of contents link points to a renamed heading.

The chapter file exists, but the heading id changed during export or editing.

Update the TOC link only when the intended heading is unique in that chapter.

A footnote link points to a missing note id.

The note may have been renumbered, moved to an endnotes file, or split into another chapter.

Check both the forward note link and the return backlink before changing ids.

A backlink returns to a missing paragraph id.

The note itself can exist while the return target no longer exists in the chapter.

Do not point every backlink to the chapter top; choose the original reading location or review manually.

A repeated heading creates several plausible targets.

Export tools can generate similar ids for repeated headings such as Introduction, Notes, or Chapter Summary.

Stop for manual review unless one target is clearly tied to the source link.

A nav or NCX file still points to an old body id.

Some exports leave links such as chapter.xhtml#bodymatter after the chapter body id was removed or renamed.

Check the target file for the current body or heading id. Do not replace it with the first id you find.

The RSC_012 fragment error text

RSC_012: Fragment identifier is not defined.

Where RSC_012 appears in KDP, Previewer, or EPUBCheck

KDP, Kindle Previewer, or EPUBCheck finds a link such as chapter.xhtml#note-4, chapter2.xhtml#section-5, or nav.xhtml#toc, but the target XHTML file has no matching id attribute for the fragment after the # symbol.

What it means

RSC_012 usually means the file exists but the landing point is gone.

The target XHTML file exists, but the exact anchor inside that file does not. This is different from a missing file error: the path before the # resolves, while the fragment after the # points to an id that is absent, renamed, duplicated, or located in a different file.

This often happens after headings, footnotes, endnotes, or TOC entries are edited and the old id remains in a nav file, NCX file, chapter link, or footnote backlink. Export tools can also regenerate heading ids while preserving older links from a previous EPUB build.

Before you edit

Check the target file, then the missing id.

A safe repair keeps the reader in the same place the original link intended. That is why footnotes, endnotes, repeated headings, and backlinks need more caution than ordinary section anchors.

  1. 1Split the broken link into two parts: the file path before # and the anchor name after #.
  2. 2Confirm the file path before # exists first; if the file itself is missing, handle it like a missing resource error.
  3. 3Open the target XHTML file and search for an exact id match, including capitalization, punctuation, underscores, and hyphens.
  4. 4If there is no exact match, look nearby for renamed headings, footnote ids, note backlinks, or export-generated id patterns.
  5. 5Treat footnotes, endnotes, repeated headings, and duplicated anchors as manual review unless there is one clearly correct target.

Why KDP checks it

Why validators reject missing fragment identifiers.

EPUBCheck

EPUBCheck checks EPUB 2 and EPUB 3 files against the official rules and reports package, markup, link, and file-reference problems.

EPUB 3.3 package rules

The OPF file is the EPUB's map: metadata, file list, reading order, and navigation wiring. KDP and EPUBCheck use it to decide whether the book package is coherent.

Can this be fixed safely?

When a fragment repair is safe.

When automatic repair is safe

EPUB Fixer can repair a fragment only when there is one clear target, such as a moved body id, an obvious heading id mismatch, or a unique nearby anchor in the same XHTML file. A safe repair should keep the link in the same reading context and pass EPUBCheck again after the change.

When you need manual review

Footnotes, endnotes, repeated headings, and duplicated section titles often require manual review because choosing the wrong anchor can send readers to the wrong note, chapter section, or backlink. Do not create a new anchor if you cannot prove where the reader should land.

Before / after example

Before: nav.xhtml links to chapter2.xhtml#section-5, but chapter2.xhtml contains id="sec-5" on the intended heading. After: the link is updated only if that is the single safe match. Before: a footnote backlink points to #fnref12 but the chapter has several note references; that should stop for manual review.

Ready to retry?

Scan the EPUB before rewriting anchors.

The scan helps show whether the broken fragment is in a TOC entry, a footnote backlink, an endnote, or an ordinary chapter link, which changes the safe next step.

Upload EPUB to scan

FAQ

Questions authors ask about RSC_012.

What does RSC-012 fragment identifier is not defined mean?

It means the EPUB link points to a file that exists, but the anchor after the # symbol does not exist inside that file. This often affects table of contents links, footnotes, endnotes, or heading links.

How do I fix an EPUB anchor that KDP cannot find?

Compare the link target with the id values inside the target XHTML file. Start with the file path before the # symbol, then check the fragment against headings, footnotes, and backlinks. A safe fix requires one clear matching anchor; otherwise the link may send readers to the wrong section.

Why does RSC-012 happen after editing a book?

Editing tools can rename headings, footnotes, or section ids while old links remain in the nav, NCX, or chapter files. The file path still works, but the specific fragment target is gone.

Can EPUB Fixer repair RSC-012 automatically?

Only when there is a single obvious replacement anchor, such as a moved body id or a simple heading id mismatch. Footnotes and duplicated headings usually need manual review.

Why does RSC-012 appear in table of contents links?

A TOC or nav file can point to a chapter file and a specific heading id. If the chapter file still exists but the heading id changed during export, the TOC entry becomes a broken fragment even though the chapter itself is present.

Should I add a new id to silence RSC-012?

Only when you know the exact reading location the link should target. Adding a new id just to satisfy the validator can create a valid but misleading link, especially for footnotes, endnotes, and repeated headings.

Why are footnote RSC_012 errors risky to auto-fix?

Footnotes often have forward links and backlinks. If the wrong id is chosen, the EPUB may validate while readers jump to the wrong note or cannot return to the text.

Related EPUB error guides