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']);
  }
CommentFileSizeAuthor
#1 ahah_helper-480472.patch780 bytessvendecabooter
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

svendecabooter’s picture

FileSize
780 bytes

I encountered the same problem.
Attached a patch that fixes this.

Rok Žlender’s picture

Status: Active » Reviewed & tested by the community

Patch works fine for me.

chaps2’s picture

Patch works for me too.

jefkin’s picture

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!

pounard’s picture

I have some error message with 2.0 version, I would have done something like this:

  if (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).

hadsie’s picture

this patch works for me as well.

lslinnet’s picture

worked fine for me as well

pounard’s picture

@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.

Cristhian’s picture

Status: Reviewed & tested by the community » Fixed

released branch 2.x-dev branch, patch commited there

pounard’s picture

@Cristhian #9 Does the #1 patch will be commited to 1.x branch?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pounard’s picture

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.