EPUB FixerKDP upload error scanner

EPUB error guide

RSC_012: fragment identifier is not defined

Use this when an EPUB link reaches the right XHTML file but the anchor after # is missing. Check the file, the missing id, and where the reader should land before changing the link.

Read the link

Split the target at the # symbol.

The part before # names the XHTML file. The part after # names the missing anchor inside that file.

Check the target

Check case or URL encoding first.

Automatic repair is limited to one existing id that differs only by capitalization or URL encoding. Similar wording, hyphens, or nearby text are not enough.

Stop if unclear

Footnotes and repeated headings need context.

Do not add an id only to silence the error. The link must still take the reader to the intended note, heading, or return point.

Scan when the message does not name the affected path. The report shows affected paths and repair decisions, not manuscript text.

No signup before the scan report.Checks EPUB package paths, not manuscript text.Repair download only after EPUBCheck passes again.

Need fixed-layout, DRM, or source-file help? Check unsupported or review-first EPUB cases.

Match these report titles

  • RSC_012 fragment identifier is not defined
  • Fragment identifier is not defined
  • Internal links with missing anchor
  • Missing anchor in EPUB internal link
  • Broken internal link points to a missing id
  • TOC target anchor is missing

Use this guide when

Your message matches "RSC_012 fragment identifier is not defined" or one of the report titles above.

Upload if

You have the exported reflowable .epub and need the affected path, file, field, or repair decision before editing.

Handle outside this tool

Use the source tool or publishing workflow for DOCX, PDF, KPF, KCB, fixed-layout, comics, image-first books, DRM, visual design, or KDP listing and approval problems.

Read the scan report

Decide if this report item matches.

Use the report label, affected file, and repair decision together. A matching title alone is not enough if the file path or EPUB structure points to a different problem.

Error textAffected pathDecisionRepair, review, or stop

A useful report does not stop at the error name. It connects the message to an internal file and a next action.

Match the report title.

Look for "RSC_012 fragment identifier is not defined" or the closest title above. Keep the original EPUBCheck, KDP, or Kindle Previewer wording if it differs.

Check the affected file first.

Use the Affected area, Source file, Target file, or Problem type rows before editing OPF, nav, XHTML, CSS, or image paths.

Follow the repair decision.

Repairable means one clear structural change. Needs review or Not supported means use the named file, source project, or platform step.

Keep with your repair note.

Copy these fields from the report instead of rebuilding the fix from memory.

Source file
Target path or field
Original error
Repair decision
Next step

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.

Automatic repair is safe only when exactly one existing id matches by capitalization or URL encoding. Renamed headings, footnotes, and backlinks need manual context.

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 fix it in the source tool or EPUB editor.

Matched

Upload scan

Use this when the broken anchor message is vague.

RSC_012 means the file before # exists, but the id after # is missing inside that target file. The report should show the source link, the target XHTML file, and whether the missing fragment belongs to a TOC entry, chapter link, footnote, endnote, or backlink.

Matched

Manual check

Use this for footnotes, backlinks, or repeated headings.

For footnotes, backlinks, or repeated headings, the correct fix depends on where the reader should land. Open the target XHTML file, compare the nearby text around the missing id, and only add or rename an id when the exact reading location is clear.

Matched

Repair summary

Use this when the export tool changed the id value.

The report can repair one capitalization or URL-encoding difference. If the id was renamed, shortened, moved, or replaced semantically, use the source file, target file, missing fragment, and nearby text for manual correction.

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.

Matched
Message: ERROR(RSC-012): OEBPS/nav.xhtml points to Text/chapter2.xhtml#SECTION-5
Report shows: file exists, missing id SECTION-5
Existing id: section-5
Fix: change only the fragment capitalization, then validate again

This can be automatic only because exactly one existing id differs by case. A different spelling, shortened id, or nearby heading still requires manual review.

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.

Matched

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.

Matched

Safe fix

One id differs only by case or URL encoding.

Update the fragment only when exactly one existing id is the same value after case-insensitive or URL-encoding comparison. Do not infer replacements from similar names or nearby content.

Start here

Split the link at the # symbol first.

In an EPUB report, RSC_012 is easy to misread as a missing chapter. Usually the XHTML file exists; the problem is the anchor after the #.

Matched

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.

Matched

Can it be fixed automatically?

EPUB Fixer can repair a fragment only when exactly one existing id in the target file differs from the requested fragment by capitalization, URL encoding, or both. The repaired EPUB must then pass EPUBCheck again.

Matched

What to check next

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

Matched

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.

Matched

A table of contents link points to a renamed heading.

The chapter file exists, but the heading id after # changed during export or editing, so the TOC opens a location that no longer exists.

Repair automatically only when exactly one existing id differs by case or URL encoding. Any real rename needs manual confirmation.

Matched

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, so adding the old id in the wrong place can send readers to the wrong note.

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

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.

Matched

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, check whether exactly one existing id differs only by capitalization or URL encoding.
  5. 5Treat renamed, shortened, moved, or semantically similar ids as manual even when nearby text looks related.
  6. 6Treat 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 exactly one existing id in the target file differs from the requested fragment by capitalization, URL encoding, or both. The repaired EPUB must then pass EPUBCheck again.

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 one id="section-5". After: correct only that capitalization difference and validate again. Before: a footnote backlink points to #fnref12 but the chapter has several note references; that stays manual.

Ready to retry?

Scan the EPUB before rewriting anchors.

The scan shows 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 fragment with id values inside the target XHTML file. Automatic repair requires exactly one existing id that differs only by capitalization or URL encoding. Any renamed, moved, footnote, backlink, or semantic replacement needs manual confirmation.

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 exactly one existing id differs from the missing fragment by capitalization, URL encoding, or both. Renamed or moved anchors, footnotes, backlinks, and duplicated headings 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