Mollom rocks, like the rest of Drupal. ;) I think I have found a situation whereby Mollom gets bypassed. I have to override the node edit form to provide some default values and related node lookups (I would have done it all w/css and cck defaults if possible but it wasn't). This is happening in a production site with a ton of modules, so I isolated it down to a fresh install of core + mollom to verify.

I have created a custom content type called custom_type. I copied the garland theme to /sites/all/themes and used the following code to provide the name of an override for the node edit form:


function garlando_theme() {
  return array(
    'custom_type_node_form' => array(
      'arguments' => array('form' => NULL),
    ),
  );
}

function garlando_custom_type_node_form($form) {
  $form['buttons']['submit']['#value'] = t("Anything");
  return drupal_render($form);
}

The line $form['buttons']['submit']['#value'] = t("Anything"); will cause Mollom to be bypassed when I submit a new custom_type node with spammy content. I can literally change the text to anything for this to happen. IF I comment out the line $form['buttons']['submit']['#value'] = t("Anything"); then Mollom begins to work again. Whatever other mayhem I do with the form does NOT affect Mollom -- just changing the button text.

Very strange. Perhaps I shouldn't change the text of the button in this fashion anyway? Thanks!

Comments

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Can you confirm this behavior on the latest 6.x-1.9? There were some major fixes to the form submit detection.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

No response so marking as fixed.

swellbow’s picture

My apologies for not getting back forever. Confirmed that changing the button text in theme or in module hooks works great. Thanks so much!

Status: Fixed » Closed (fixed)

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