Skip to content
An Addon for Cockpit CMS that checks for common errors in the content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Cockpit CMS Content Validation Addon

This addon examines all collection items for common error patterns and displays a list of errors/warnings.


  1. Confirm that you have Cockpit CMS (Next branch) installed and working.
  2. Download zip and extract to 'your-cockpit-docroot/addons' (e.g. cockpitcms/addons/ContentValidation, the addon folder name must be ErrorCheck)
  3. Confirm that the ContentValidation icon appears on the top left of the modules menu.


To Implement


The AddOn adds a new menu item item "Content Validation". Navigating to it you will see a list of errors identified

Alt text

Currently the plugin detects the following errors:

  • Required fields that are empty (can happen if the required attribute was added later)
  • CollectionLink field values that link to collection types that no longer exist
  • CollectionLink field values that link to collection items that no longer exist
  • Image fields with values(urls) that are no longer valid

Additionally it will warn if a GIF image is used since gatsby-image-sharp cannot process GIF images.


The current plugin is a quick prototype that I hacked together in a few hours on the weekend. But while the code needs some major cleanup it is already pretty useful and helped me identify a number of errors. I hope

  1. Code cleanup/follow coding patters used for other addons
  2. Add support for Singletons
  3. Add support for Regions
  4. Add support for set type
  5. Add support for repeater type
  6. Add support for asset fields
  7. Add support for gallery fields
  8. Settings page to enable/disable validations

There is also some other functionality that I might consider adding to the plugin

  1. Data cleanup; when removing a field the corresponding values stay in the data object which might cause confusion later on.
  2. Collection Link name update: when changing the name of a linked collection item this change isn't reflected in the link itself which can lead to some confusion down the line.

Ideally this sort of cleanup can optionally happen automatically using a cron job every night.

Copyright and license

Copyright 2019 Markus Oehler under the MIT license.

You can’t perform that action at this time.