Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
sunHm, 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?
Comment #2
OldAccount CreditAttribution: OldAccount commentedNo, 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.
Comment #2.0
sunUpdated issue summary.
Comment #3
sunWhich version of Webform do you have installed?
You need Webform 3.x for Mollom compatibility.
Comment #4
sunA more fundamental question: Did you run update.php?
Comment #5
OldAccount CreditAttribution: OldAccount commentedWe'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.
Comment #6
sunHm. 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?
Comment #7
OldAccount CreditAttribution: OldAccount commentedYeah, when I go to update.php it says "No pending updates" and there weren't any errors when it ran the first time.
Comment #8
OldAccount CreditAttribution: OldAccount commentedWould it be easiest to just uninstall and reinstall the module?
Comment #9
sunSorry 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.
Comment #10
OldAccount CreditAttribution: OldAccount commentedWe 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!
Comment #10.0
OldAccount CreditAttribution: OldAccount commentedUpdated issue summary.
Comment #11
eshta CreditAttribution: eshta commentedComment #12
arlingtonvoicellc CreditAttribution: arlingtonvoicellc commentedI 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!