Skip to main content

[en] Theme validation messages

[en] Paligo checks a theme twice when you upload it. The first check is done while the file uploads: if it fails, the upload is refused and nothing changes. The second check renders every template with sample content, and its result is shown in the Layout Editor as Theme validation passed or Theme validation failed.

[en] When uploading

[en] Message

[en] What to do

[en] The theme ZIP is too large (…); the limit is …

[en] Make the theme smaller than 20 MB, such as by compressing images.

[en] The theme ZIP has too many files (…); the limit is …

[en] A theme can have at most 5,000 files and folders.

[en] The theme is too large uncompressed (…); the limit is …

[en] The files can take up at most 100 MB unzipped.

[en] The uploaded file is not a valid ZIP archive.

[en] Compress the theme again as a ZIP file.

[en] The theme's files are not at the top of the ZIP (they are inside "…").

[en] Compress the contents of the theme folder, not the folder. See [en] Theme package structure.

[en] Required file is missing from the theme: …

[en] The theme must have theme.json and templates/page.html.twig.

[en] File type not allowed in a theme (rejected): …

[en] Remove the file. See the allowed file types in [en] Theme package structure.

[en] Symlinks are not allowed in a theme (rejected): …

[en] Replace the symbolic link with the file itself.

[en] Unsafe path in ZIP (rejected): …

[en] A file's path starts with / or a drive letter or contains ... Compress the theme again from its folder.

[en] Duplicate entry in ZIP (rejected): …

[en] The ZIP file contains the same path twice. Compress the theme again.

[en] theme.json is not valid JSON.

[en] Correct the syntax of theme.json, such as a missing comma or quote.

[en] theme.json is missing a "name". (or "version", or "contract" version range)

[en] Add the field. See [en] The theme manifest.

[en] These are warnings, and the upload still succeeds:

[en] Message

[en] Means

[en] The theme's files are inside a folder in the ZIP ("…"); it was ignored.

[en] The ZIP file had a folder around the theme. Paligo used its contents.

[en] theme.json "version" ("…") is not a semver version.

[en] Use a version number such as 1.0.0.

[en] theme.json "author" is ignored (not a string).

[en] Write the author as text.

[en] When checking the templates

[en] Each message names the template and the line, where there is one.

[en] Message

[en] What to do

[en] Theme "…" requires contract "…", but this renderer implements contract 1.0.

[en] Set contract to "^1.0" in theme.json.

[en] Theme is missing the required template "page.html.twig"

[en] Add templates/page.html.twig.

[en] Function "…" is not allowed. (or Filter, or Tag)

[en] The template uses something themes can't use. See [en] What theme templates can use.

[en] Unknown "…" function. (or filter, or tag)

[en] The name is misspelled, or it isn't part of Twig.

[en] Unexpected token, Unclosed "…", and other syntax errors

[en] Correct the Twig syntax on the line given.

[en] Template "…" exceeded the per-template render time limit …

[en] The template took too long. This is almost always a loop that never ends, or a template that includes itself.

[en] Theme template nesting exceeded the maximum depth of 128.

[en] A template includes or embeds itself, or a macro calls itself without stopping.

[en] The search box's markup messages, such as a missing site-search__input

[en] See [en] Search in a theme.

[en] The check uses sample content, so a template can still fail with real content, for example on a value that the sample doesn't have. Preview the theme on your own content with [en] Paligo Theme Studio before you publish with it.