Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:contentcheck

Content checks: build the reference index, list the unused assets and the broken relations below a node, list the missing files, scan the storage files (report only; --fix, --quarantine and --fix-permissions are a dry…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/contentcheck.md

On this page

exp:contentcheck

Content checks: build the reference index, list the unused assets and the broken relations below a node, list the missing files, scan the storage files (report only; --fix, --quarantine and --fix-permissions are a dry run unless --apply).

Script bin/php/contentcheck.php, code in kernel/private/classes/commands/contentcheck.php. Run it from the installation root, as the user the web server runs as:

./console exp:contentcheck --help
./console exp:content-check --help
php bin/php/contentcheck.php --help

Help text

Content checks (report only; --fix, --quarantine and --fix-permissions are a dry run unless --apply)

./console exp:content-check --build-index           build the reference index (also the cronjob part contentcheck)
./console exp:content-check --unreferenced --node=2  the unused assets below node 2
./console exp:content-check --broken --node=2        the broken relations below node 2, and the layouts'
./console exp:content-check --why=123,456           what uses objects 123 and 456
./console exp:content-check --storage               scan the storage files: orphans and file problems
./console exp:content-check --storage --quarantine            which orphans would be quarantined
./console exp:content-check --storage --quarantine --apply    move them to the quarantine
./console exp:content-check --storage --fix-permissions [--apply]   set owner and mode of used files
./console exp:content-check --missing-files --node=2  files missing from the storage, stale image aliases
./console exp:content-check --missing-files --fix=regenerate   what regenerating would do
./console exp:content-check --fix=restore --items=123-4,125-2 --apply  restore two field versions
./console exp:content-check --fix=replace --items=123-4 --replace-with=photo.jpg --apply

--fix (regenerate, restore, replace, remove, review), --quarantine and --fix-permissions are the only
options that change anything, and only with --apply: without it they show the plan and change nothing.
--dry-run means the same as no --apply; --apply together with --dry-run is a usage error (exit 2).
Without --items --fix takes every finding of --missing-files.
The lists are those of the user given by --login (default admin): what that user may read.
Exit code: 0 nothing found, 1 something found, 2 error.

Options

OptionValueHelp
--build-indexBuild the reference index and keep it in the cache
--unreferencedList the unused assets below --node
--brokenList the broken relations below --node (all pages) and in the layouts
--missing-filesList the fields below --node whose files are missing, and images with missing or stale aliases
--problemsrequiredWith --missing-files: missing,alias_missing,alias_stale,alias_absent (default: the first three)
--versionsrequiredWith --missing-files: published,draft (default: both)
--fixrequiredResolve: regenerate, restore, replace, remove or review (the findings of --missing-files, or --items)
--itemsrequiredWith --fix: field versions as <attribute id>-<version>, separated by commas
--replace-withrequiredWith --fix=replace: the file put at the expected path (one item)
--noderequiredThe node the lists start from (default: content.ini [NodeSettings] RootNode)
--whyrequiredObject ids: say what uses each of them
--loginrequiredThe user whose access the lists use (default admin)
--jsonOne JSON object instead of the text
--storageScan the storage files (all of it, in batches) and keep the result for the storage view
--quarantineWith --storage: move the orphan files of the scan to the quarantine (each checked again)
--fix-permissionsWith --storage: set the expected owner and mode of used files with a wrong one
--applyWith --fix, --quarantine or --fix-permissions: do it (the default is a dry run that shows the plan)
--dry-runThe default, kept for scripts that pass it: show what would be done, change nothing

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/contentcheck.php, kernel/private/classes/commands/contentcheck.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x