EPUBCheck RSC-033: query string in a URL
Updated:
EPUBCheck RSC-033 is an error message: “Relative URL strings must not have a query component, but found one in "…".” A relative URL contains a query string (?key=value), which EPUB does not allow because there is no server to answer it. The reading app looks for a file whose name includes the query and does not find it.
The official message
Relative URL strings must not have a query component, but found one in "%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
- Links copied from a website, such as page.xhtml?id=3.
- Cache-busting parameters such as style.css?v=2 added by a build tool.
How to fix it
- Find the URL named in the message.
- Remove the query part from the URL; use a #fragment to point inside a document.
- If a build step adds it, change the step, then validate again.
When it's not this
A #fragment on a stylesheet link is only the usage message RSC-013.
Terms used here
Other RSC messages
RSC-032Fallback must be provided for foreign resources, but found none for resource "…" of type "…".RSC-034Scripts must have a JavaScript media type.RSC-031Remote resource references should use HTTPS, but found "…".RSC-035"…" is a legacy media type for JavaScript. Consider using 'text/javascript' instead.RSC-030File URLs are not allowed in EPUB, but found "…".RSC-029Data URL is not allowed in this context.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.