This project is not covered by Drupal’s security advisory policy.

What this does:

This module provides an overview of all of your CTools objects (much like CTools' bulk_export module) and provides the ability to generate a 'diff' view to compare their in-code (default) and in-database (overridden) versions.

It lists all the objects at an overview screen at /admin/structure/ctex_diff and also inserts 'diff' links into most dedicated edit screens (for views, rules, panels, etc etc).

(It also provides a tiny bit more, but you likely don't need that.)

Why / who is this for:

This module is for developers, or experienced site builders, who

  • export their CTools objects to code
  • do not want to use Features when that's not needed (because really, Features is not needed for exporting views/rules/other CTools objects).
  • want control over their site / the objects they use. And are surprised that without Features, there seems to be no UI where differences between code/db objects can be viewed.

It's also for developers who are doing coding on (a module that uses) CTools objects, and are confronted with unexplained behavior. For instance, people who like to keep all their views/rules/etc cleanly in code, so they use hook_default_views_alter() etc to tweak default objects instead of making a full copy. If you have done so, then surely you have had a situation where Views kept saying the view was edited and you need to save it. How to solve this? You should save the view and inspect the differences between the saved one and your (altered) 'original' version.

Remember:

When you are looking at your object definitions in the website UI, often you will see that the status is 'Overridden', but the 'diff' link show no differences. This is how CTools objects work: if there is any object in the database, the status is 'Overridden', also if it is equal to the code object. The 'revert' action will just delete the object from the database - which makes no practical difference for your website's operation.

Patches:

The creation of this module has brought to light some minor bugs in other modules. If you want to be able to trust the output of this module, please review them.

Project information

Releases