DOCUMENTATION

  • Deprecated
Search »

Database Integrity

Hook Verification test
Hook Verification test

The Hook Verification test was added in version 2.1.0 of the Database Integrity module (Oct 2011).

Modules interact with the Core script by registering the code that needs to run when particular hooks execute. For example, the File Upload module registers a function to handle file uploads which gets called when the main "update submission function" runs. This allows the function to actually upload files. As another example, the Extended Client Fields module registers a function that gets called in the Edit Client pages, letting the module display the extra fields.

This technique of "Hook registration" is an essential part of Form Tools. This test examines the contents of the [prefix]hook_calls table to check that what's being called is in fact what should be being called for each module. In other words, it checks that the modules are able to function properly.

Results

The test is very simple: it checks that there are exactly the right number of hooks and that each one exactly maps what should be in the table.

Errors? Don't panic!

First off, just because errors are found, it doesn't mean that there may have been problems in your installation. For users that have been using older versions of the script, chances are that it will find errors in all or more of the modules listed. This is due to a problem with the way the Core script handled upgrading modules: it occasionally made hooks get registered multiple times (this will be fixed in Core 2.1.5). This doesn't cause any actual problems with the module, but it's good to keep the database nice and tidy.

To fix the errors, just click the "repair modules" link that appears. Then re-run the test. No problems listed? You're done!