Drupal cannot find a hook

4 Oct 2012

Try resetting its cache with `module_implements('webform_component_info', FALSE, TRUE);`.

And here is my code:

function multilevel_webform_component_info() { return array( 'multilevel' => array( 'label' => t('Multi-level selectbox'), 'description' => t('Allows hierachical selection'), 'features' => array( 'default_value' => FALSE, ), 'file' => 'multilevel.inc', ) ); } module_implements('webform_component_info', FALSE, TRUE); // Reset module_implements' cache, otherwise it wouldn't see the new hook

The above method is not really reliable

I have found that Drupal caches some certain stuffs.

Anyway, Disabling and enabling helps Drupal find the hook.

Give it a kudos