Posted by bpsommerville on June 3, 2009 at 5:09am
| Project: | AHAH helper |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
On line 145 of ahah_helper.module the ahah_helper_render function tries to include the page file that was referenced in the menu entry.
This fails because the require_once call uses form_state['storage']['#ahah_helper']['#file'] instead of form_state['storage']['#ahah_helper']['file']
Current code
// $form_state['storage']['#ahah_helper']['file'] has been set, to know
// which file should be loaded. This is necessary because we'll use the form
// definition itself rather than the cached $form.
if (isset($form_state['storage']['#ahah_helper']['file'])) {
require_once($form_state['storage']['#ahah_helper']['#file']);
}Should be
// $form_state['storage']['#ahah_helper']['file'] has been set, to know
// which file should be loaded. This is necessary because we'll use the form
// definition itself rather than the cached $form.
if (isset($form_state['storage']['#ahah_helper']['file'])) {
require_once($form_state['storage']['#ahah_helper']['file']);
}
Comments
#1
I encountered the same problem.
Attached a patch that fixes this.
#2
Patch works fine for me.
#3
Patch works for me too.
#4
I discovered this on my own, repaired as the patch does, and was about to report it when I found this! ... so patch works. More than 3 months now. push this one through!
#5
I have some error message with 2.0 version, I would have done something like this:
<?phpif (isset($form_state['storage']['#ahah_helper']['file'])) {
if (! empty($form_state['storage']['#ahah_helper']['file'])) {
require_once($form_state['storage']['#ahah_helper']['file']);
}
}
?>
In some cases, it seems that the 'file' key is defined, but data is empty (I'm unable to know why).
#6
this patch works for me as well.
#7
worked fine for me as well
#8
@Wim Leers (or any other module's maintainer)
I have some large pieces of code in modules that'll get on d.o based on this module. Could you commit the #1 patch to 1.x branch and make a new maintenance release please?
I can't let the ahah_helper module patching instructions in my readme file, that's so ugly.
#9
released branch 2.x-dev branch, patch commited there
#10
@Cristhian #9 Does the #1 patch will be commited to 1.x branch?
#11
Automatically closed -- issue fixed for 2 weeks with no activity.
#12
What about this issue, when is it going to be released? Could you make a bugfix release for this please? It would avoid that hundreds of site mainteners have to patch the module at each site install.