Posted by kaizerking on March 23, 2012 at 4:13pm
5 followers
Jump to:
| Project: | Module Builder |
| Version: | 7.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
I installed module builder on my local wamp, folder paths are given then i get a list of APIs then when i click on update "problem loading page with message "The connection was reset"
Comments
#1
Same issue here. XAMPP running on Windows 7.
#2
More info:
Going to admin/modules/module_builder
I get error message "No hooks were found. Please check the documentation path specified in the Administer >> Site configuration >> Development >> Module builder page."
And the page is blank other than the text "This page allows you to generate the files for a custom module with scaffolding code for hook implementations."
On going to admin/config/development/module_builder
The hooks folder is correct (and there are actually "*.api.php" files in /sites/default/files/hooks).
However, on going to admin/config/development/module_builder/update
I get the contradictory information:
The hook documentation has not yet been downloaded.
You have the following hook definition files saved in public://hooks:
When I click the Update button, I get "The connection was reset error".
#3
I tried running "drush mbdl" and that did work. It downloaded api files again, hooks_processed.php was successfully created and module builder now works as expected.
So, the above seems to be an issue just with the web interface when updating and processing hooks.
#4
Are you actually on 7 or on 6?
On 7 no downloading is actually done.
#5
Definitely Drupal 7.12 and Module Builder 7.x-2.x-dev (2012-Mar-19)
#6
I just rechecked /sites/default/files/hooks/
And the downloaded *.api.php files have the same timestamp as the generated hooks_processed.php
The files are being downloaded, as I didn't put them there. Maybe some legacy code or functions from the 6.x version?
#7
I came across this as well, from what I can gather 'system.api.php' is too big for the 'preg_match_all' call in the _module_builder_process_hook_file function.
I tested this by removing the file from $hook_files:
<?php
function module_builder_update_data() {
// Update the hook documentation.
module_builder_include('update');
$hook_files = module_builder_update_documentation();
//CHANGE: unset the large system.api.php
unset($hook_files['system.api.php']);
// Process the hook files.
module_builder_include('process');
module_builder_process_hook_data($hook_files);
return TRUE; // FTW!
}
?>
With it gone, everything seems to work. Well, except of course, system hooks are missing in the builder.
I think it must have something to do with PCRE setting in XAMPP. I tried adding some 0's to the following in php.ini
pcre.backtrack_limit=1000000pcre.recursion_limit=1000000
but it still crashed php. I'm just going to manually add any hooks I need from system.api.php and leave it at that.
#8
I had same issue.
According to this:
http://stackoverflow.com/questions/6382330/does-this-php-code-crash-apac...
you should decrease value of pcre.backtrack_limit .
I set it to 500, and it didn't crash.
For some reason now I get following error after this:
Notice: Undefined offset: 1 in module_builder_update_documentation() (line 82)
and module builder doesn't build any hooks except of hook_help. But at least update doesn't crash php.