When "Update" is clicked on the "Update Hooks" tab, the following errors are returned:
Notice: Undefined index: path in module_builder_process_hook_data() (line 196 of /home/gippy/opviews.com/sites/all/modules/module_builder/includes/process.inc).
Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in _module_builder_process_hook_file() (line 303 of /home/gippy/opviews.com/sites/all/modules/module_builder/includes/process.inc).
Notice: Undefined index: group in module_builder_process_hook_data() (line 199 of /home/gippy/opviews.com/sites/all/modules/module_builder/includes/process.inc
I have done the following:
- Made sure that on the Settings tab I have the good values in "Path to Hook Documentation" and "Path to write module files." These directories actually exist and are writable (0775).
- Double checked my configuration of the File module setting for "Public File System Path" (it's the default sites/default/files)
- Tried this with two different development installations and got the same result. They are fairly fresh and simple installs.
After clicking, the hook documentation files are properly downloaded. It just stops at the point where it tries to build a list of what was downloaded. The value in 'path' on line 196 is apparently not good:
foreach ($hook_file_data as $file => $file_data) {
$hook_data_raw = _module_builder_process_hook_file($file_data['path']);I'm new at this but I can code a little. If you give me a way to inspect 'path' I'll try to see what value it is returning.
I hope it's just something I haven't properly set.
Thanks for your help.
Comments
Comment #1
joachim commentedCan you install devel module, and then do this:
You can just change the commented-out ' //print_r($hook_file_data);' at line 184.
I'm really not sure how this could be going wrong -- are you on the latest version of Drupal core?
Comment #2
gippy commentedThank you for giving me the opportunity to learn something about devel. Yes, I am on 7.10.
dsm($hook_file_data); returns an array with 32 elements. There are two strange things:
(1) The array element rules_api.php has a different structure from all the others (there is no 'path' string, so this is probably what is causing the error). Here is what dsm() returns for this element:
rules.api.php (Array, 1 element)
hook_destinations (Array, 2 elements)
hook_rules_action_info (String, 17 characters ) %module.rules.inc
hook_default_rules_configuration (String, 25 characters ) %module.rules_default.inc
Also, there is no file in the hooks directory with the name rules.api.php. This is another special thing about this element.
(2) There is a file that appears in the hooks directory that is not listed in the dsm() output and it is named hooks_processed.php. The content of this file looks like a dump from a serialize() function. Here's a clip from the start of the file:
a:29:{s:10:"aggregator";a:7:{i:0;a:7:{s:4:"name";s:21:"hook_aggregator_fetch";s:10:"definition";
I hope this helps.
Comment #3
joachim commentedThat's perfect thanks!
The problem is that I recently added support for Rules hooks. Which is great, except the data for those gets chucked in even if your local site doesn't have Rules installed.
I'll get this fixed in fairly soon, though the quickie workaround for you is to install Rules ;)
> hooks_processed.php
That's normal -- that's where all the processed data gets saved. But I appreciate your being so thorough! :D
Comment #4
joachim commentedFixed!
Thanks for reporting and debugging. I wish all bug reports were this good!
Comment #5
gippy commentedAnd I wish all fixes came out so fast - ;) - Thanks a bunch.