After installing this module I realized that my cron.php wouldn't run, but instead it redirected itself back to one of my webform associated nodes. After much research I found out that drupal_goto is usually the culprit so I went in and added a conditional to the line that was doing the redirect.

NOTE
This patch was made using the most recent dev version

CommentFileSizeAuthor
#1 webform_associate-453296.patch829 bytesjdwfly

Comments

jdwfly’s picture

StatusFileSize
new829 bytes
jim kirkpatrick’s picture

Priority: Normal » Critical

This is a CRITICAL bug because it breaks site search indexing and cron runs when webform associations are in use.

The patch in #1 didn't work for me because $_SERVER['SCRIPT_NAME'] was not /cron.php when I checked its value - it might be on a proper cron run, but when choosing 'Run cron' it was not.

So I think the line top of function webform_associate_nodeapi should look like this instead:

function webform_associate_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if ($node->type == 'webform' && $op == 'view') {
    $ids = webform_associate_lookup($node->nid, 'wid');
=>  if ($ids && $_SERVER['REQUEST_URI'] != '/admin/reports/status/run-cron') {
      drupal_goto('node/' . $ids->nid);
    }
  }

...Or is there a better/correct way of knowing we're in a cron run?

GreyHawk’s picture

@Jim -- hope you hear back soon...this may be useful for something I'm working on.

eclipsegc’s picture

Status: Needs review » Closed (won't fix)

The features of this module are now included IN webform 3.x. This module is now obsolete.