Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-031: guide link to missing file

Updated:

EPUBCheck OPF-031 is an error message: “File listed in reference element in guide was not declared in OPF manifest: ….” A reference in the EPUB 2 guide element points to a file that is not in the manifest. The guide is a legacy list of key places (cover, table of contents, start), and its targets must be declared files.

The official message

File listed in reference element in guide was not declared in OPF manifest: %1$s.

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • A guide entry left after a file was removed or renamed.
  • A wrong path or wrong case in the href of a reference element.
  • A guide copied from another book.

How to fix it

  1. Find the reference element EPUBCheck points to in the guide.
  2. Correct its href to a file declared in the manifest, or delete the entry.
  3. In EPUB 3 the landmarks nav in the navigation document replaces the guide, so you can remove the guide if you do not target EPUB 2 reading systems.

When it's not this

If the file is in the manifest but is not a content document, EPUBCheck reports OPF-032.

Terms used here

Other OPF messages

  • OPF-030 The unique-identifier "…" was not found.
  • OPF-032 Guide references "…" which is not a valid "OPS Content Document".
  • OPF-029 The file "…" does not appear to match the media type …, as specified in the OPF file.
  • OPF-033 The spine contains no linear resources.
  • OPF-028 Undeclared prefix: "…".
  • OPF-034 The spine contains multiple references to the manifest item with id "…".

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck OPF-031 mean?

EPUBCheck OPF-031 is an error message: “File listed in reference element in guide was not declared in OPF manifest: ….” A reference in the EPUB 2 guide element points to a file that is not in the manifest. The guide is a legacy list of key places (cover, table of contents, start), and its targets must be declared files.

Is OPF-031 an error?

OPF-031 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.