I upgraded from v6.10 to v6.11 using these steps (I could not find any upgrade documentation):

1- delete sites/all/modules/mollom/
2- unzip v6.11 tarball into sites/all/modules

The mollom configuration page now gives me this error:

user warning: Table 'cache5_cachekuni.mollom_form' doesn't exist query: SELECT form_id FROM mollom_form in /var/www/sites/all/modules/mollom/mollom.admin.inc on line 25.

Comments

Anonymous’s picture

Status: Active » Closed (fixed)

Ok, my bad. I reinstalled my old v6.10 Mollom and then removed it using the following steps:

1- Disable module in Drupal
2- uninstalled the module

I was then able to install v6.11 with no issues.

Perhaps worth noting somewhere in the release notes that Mollom require a 'proper' uninstall before an upgrade :)

benstallings’s picture

I agree, this is a very sloppy upgrade from such a professional development house!

dave reid’s picture

@totsubo You don't mention anything about running the required update.php script when upgrading modules, which was were the module's new table was created. There's no uninstall required.

The upgrade was tested by several people, so we're not sure why the one bug with the upgrade wasn't found. But we responded and fixed it very quickly. You can't change the fact that people are inherently human and sometimes don't see everything or make a mistake. We apologize if the update caused any problems and encourage you to try the latest code 6.x-1.x-dev. We'll have a bug-fix release out shortly I think.

zyxware’s picture

Title: Upgrading to 6.11 from 6.10 generates DB user warnings: Table mollom_form does not exist » Upgrading to 6.13 from 6.10 generates DB user warnings: Table mollom_form does not exist
Version: 6.x-1.11 » 6.x-1.13

I recently upgraded from 6.x-1.10 to 6.x-1.13 on a site and got a similar error.


user warning: Table 'drupal.mollom_form' doesn't exist query: SELECT * FROM mollom_form WHERE form_id = 'custom_content_node_form' LIMIT 0, 1 in /var/www/example.com/sites/all/modules/mollom/mollom.module on line 740.

I got the error for all the content types.

There were no pending updates on the site before I ran this mollom update.

Thanks
Anoop

zyxware’s picture

A bit more information about the errors. The same error was repeated three times for each of the content types. The update that was listed for mollom in while running update.php was 6105.

Thanks
Anoop

dave reid’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

The update function that was supposed to install the mollom_form table is mollom_update_6105. Did you get these errors after that update ran?

zyxware’s picture

Status: Postponed (maintainer needs more info) » Active

These are the updates that get run under mollom

mollom module
Update #6105

    * CREATE TABLE {mollom_form} ( `form_id` VARCHAR(255) NOT NULL DEFAULT '', `mode` TINYINT NOT NULL DEFAULT 0, `enabled_fields` TEXT DEFAULT NULL, `module` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (form_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */

Update #6106

    * ALTER TABLE {mollom} ADD `entity` VARCHAR(32) NOT NULL DEFAULT ''
    * ALTER TABLE {mollom} DROP PRIMARY KEY
    * ALTER TABLE {mollom} ADD PRIMARY KEY (entity, did)
    * UPDATE {mollom} SET entity = 'node' WHERE did LIKE 'node-%'
    * UPDATE {mollom} SET did = SUBSTR(did, 6) WHERE entity = 'node'
    * UPDATE {mollom} SET entity = 'comment' WHERE did LIKE 'comment-%'
    * UPDATE {mollom} SET did = SUBSTR(did, 9) WHERE entity = 'comment'
    * ALTER TABLE {mollom} CHANGE `did` `did` VARCHAR(32) NOT NULL DEFAULT ''

Update #6107

    * Link to Mollom's privacy policy on forms protected via textual analysis has been disabled.

Update #6108

    * UPDATE {permission} SET perm = REPLACE(perm, 'post with no checking', 'bypass mollom protection')

Update #6109

    * No queries

Update #6110

    * No queries

Update #6111

    * UPDATE {mollom_form} SET enabled_fields = '%s' WHERE mode = %d

Update #6112

    * ALTER TABLE {mollom} ADD `changed` INT NOT NULL DEFAULT 0

How do I know which updates the specific warnings come from? The warnings come in a separate container and not sequential with the list of updates. I still have the page kept open if you need more info.

dave reid’s picture

Those updates look like they executed correctly, you can even see the table being added in the first update results.

You got the warnings before you updated? During the update?

zyxware’s picture

Yes the table has been created in the database.

The warning messages came above the log messages above in the same page that comes up after the update batch process. I am not sure whether the warnings were generated before the creation of the table or after though. I guess it had to happen before the creation.

dave reid’s picture

If you haven't seen those error messages after the update, then I think you're fine. I think the update.php calls drupal_get_form() which calls the mollom code, causing the errors. I'm not sure, but I experience this once right before running update.php and had no problems afterwards.

zyxware’s picture

Yes it looks like that is the case. I think I missed to post the line number where the error occurred. It is line 740 inside mollom.module which corresponds to the function mollom_form_load($form_id). The error happens in the first statement in the function

$mollom_form = db_fetch_array(db_query_range("SELECT * FROM {mollom_form} WHERE form_id = '%s'", $form_id, 0, 1));

Why would mollom be loaded from update.php? What would be a non-expensive (run-only-during-upgrade) way to prevent this (or this kind of) errors?

damienmckenna’s picture

I've ran into this too.

sun’s picture

Status: Active » Needs review
StatusFileSize
new675 bytes

heh, sorry. We're bitten by Drupal's overly cool modular nature here. :)

Technically, Mollom could even block spam on the update.php forms. Isn't that nice? :P ;)

Overall however, there's nothing to worry about here. PHP warnings equaling those reported above on update.php can be safely ignored.

sun’s picture

Version: 6.x-1.13 » 7.x-1.x-dev
dries’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Can commit later.

sun’s picture

Title: Upgrading to 6.13 from 6.10 generates DB user warnings: Table mollom_form does not exist » Mollom also tries to protect update.php forms, leading to warnings if database is not yet updated

Preparing a slightly better commit message for you.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

sun’s picture

Version: 7.x-1.x-dev » 6.x-1.13
Status: Fixed » Reviewed & tested by the community
StatusFileSize
new690 bytes
dries’s picture

Version: 6.x-1.13 » 6.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to DRUPAL-6--1. Thanks.

Status: Fixed » Closed (fixed)

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

  • Commit 2c00671 on master, fai6, 8.x-2.x, fbajs, actions by Dries:
    - Patch #717966 by sun: Mollom also tries to protect update.php forms,...

  • Commit 2c00671 on master, fai6, 8.x-2.x, fbajs, actions by Dries:
    - Patch #717966 by sun: Mollom also tries to protect update.php forms,...