When I try to change the "Text analysis accuracy" on a specific form (admin/config/content/mollom/manage/webform_client_form_17) to a different setting and click save, sometimes it saves just fine, sometimes it throws an error:
The website encountered an unexpected error. Please try again later.

And this shows up in dblog:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity' in 'field list':
UPDATE {mollom_form} SET
entity = :db_update_placeholder_0,
bundle = :db_update_placeholder_1,
mode =   :db_update_placeholder_2,
checks = :db_update_placeholder_3,
unsure = :db_update_placeholder_4,
discard = :db_update_placeholder_5,
moderation = :db_update_placeholder_6,
enabled_fields = :db_update_placeholder_7,
strictness = :db_update_placeholder_8,
module = :db_update_placeholder_9
WHERE (
  form_id = :db_condition_placeholder_0
);
Array (
[:db_update_placeholder_0] => webform
[:db_update_placeholder_1] =>
[:db_update_placeholder_2] => 2
[:db_update_placeholder_3] => a:2:{i:0;s:4:"spam";i:1;s:9:"profanity";}
[:db_update_placeholder_4] => captcha
[:db_update_placeholder_5] => 1
[:db_update_placeholder_6] => 0
[:db_update_placeholder_7] => a:9:{i:0;s:15:"submitted][name";i:1;s:24:"submitted][email_address";i:2;s:23:"submitted][phone_number";i:3;s:32:"submitted][street_address_line_1";i:4;s:32:"submitted][street_address_line_2";i:5;s:15:"submitted][city";i:6;s:36:"submitted][state___province___region";i:7;s:28:"submitted][zip___postal_code";i:8;s:18:"submitted][message";}
[:db_update_placeholder_8] => relaxed
[:db_update_placeholder_9] => webform
[:db_condition_placeholder_0] => webform_client_form_17
)
in drupal_write_record() (line 7106 of /mnt/www/hcl/includes/common.inc).

It happens with multiple forms, not just one.

Comments

Status:Active» Postponed (maintainer needs more info)

Unknown column 'entity' (mollom_form)

Hm, that's weird. Does the {mollom_form} table in your database contain an 'entity' column?

If not, when did you install the Mollom module? Did you upgrade from the 1.x series? Or perhaps even from D6?

No, I don't have an 'entity' column in the {mollom_form} table. I have 'form_id', 'mode', 'checks', 'discard', 'enabled_fields', 'strictness', and 'module'.

It's a D7 site but I just upgraded from 1.1 to 2.4-- yes, I know, long overdue. My apologies for leaving that detail out of the original post, I submitted this at the end of a very long day.

Issue summary:View changes

Updated issue summary.

Which version of Webform do you have installed?

You need Webform 3.x for Mollom compatibility.

A more fundamental question: Did you run update.php?

We're using Webform 3.18 and yes, all database updates have been applied via update.php, I remember seeing quite a few Mollom updates when it ran.

Hm. Are you sure that update.php completed all updates?

The second to last Mollom module update definitely creates the 'entity' and 'bundle' columns:
http://drupalcode.org/project/mollom.git/blob/HEAD:/mollom.install#l997

Since the 'moderation' column is also missing in your schema, it looks like the update 7202 was not executed either yet:
http://drupalcode.org/project/mollom.git/blob/HEAD:/mollom.install#l944

What happens if you run update.php again?

Yeah, when I go to update.php it says "No pending updates" and there weren't any errors when it ran the first time.

Would it be easiest to just uninstall and reinstall the module?

Sorry for the late reply!

Yes, if that is an option for you (i.e., if you don't have too many form protections configured), then uninstalling and re-installing the module would be easiest/fastest.

I'm not sure at which point the upgrade from 1.x and 2.x failed for you. It's also odd that you do not see any remaining updates when running update.php, because some later updates clearly have not been executed. update.php normally halts the update process entirely in case of (any) errors, so this is a bit hard to debug, and might even be caused by something else on your site.

We only have 9 forms so I just reinstalled it to save time and get this resolved. Now I have all the columns and was able to save every form without errors. I have no idea what happened with the database update, very strange. I really appreciate your quick responses, thank you!

Issue summary:View changes

Updated issue summary.

Issue summary:View changes
Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)

I was running Webform 4.x with the Mollum module on Drupal 7.22 and was receiving the same error message when attempting to save a webform.

I tried the suggestion in #3 -- reverted back to Webform 3.x -- and the problem is fixed.

Thanks!