Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
inteja CreditAttribution: inteja commentedSame issue here. XAMPP running on Windows 7.
Comment #2
inteja CreditAttribution: inteja commentedMore 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".
Comment #3
inteja CreditAttribution: inteja commentedI 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.
Comment #4
joachim CreditAttribution: joachim commentedAre you actually on 7 or on 6?
On 7 no downloading is actually done.
Comment #5
inteja CreditAttribution: inteja commentedDefinitely Drupal 7.12 and Module Builder 7.x-2.x-dev (2012-Mar-19)
Comment #6
inteja CreditAttribution: inteja commentedI 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?
Comment #7
Jon Nunan CreditAttribution: Jon Nunan commentedI 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:
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
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.
Comment #8
terikon CreditAttribution: terikon commentedI 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.
Comment #9
mlg4035 CreditAttribution: mlg4035 commentedI had this same exact issue (Windows 7 with XAMPP, Drupal 7.55) and setting pcre.backtrack_limit and pcre.recursion_limit to 500 as terikon suggested in #8 resolved the problem for me!
Thx all!