ahah_helper_render doesn't include required page file properly
bpsommerville - June 3, 2009 - 05:09
| Project: | AHAH helper |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
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']);
}
#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!