After installing webform 6.x-3.2 and chaning settings, I get the following error on nodes on which I have enabled webform:

user warning: Table 'thoughttracks.webform_emails' doesn't exist query: SELECT * FROM webform_emails WHERE nid = 3 in C:\Domains\thoughttracks.com\wwwroot\sites\all\modules\webform\webform.module on line 1045.

Any help on resolving this? thank you

Comments

quicksketch’s picture

Are you upgrading from a previous version? This seems to indicate you did not run update.php after updating.

rebcorellc’s picture

No. I had tried to install previoulsy, but it failed for some reason. I removed the module directory, and reinstalled it again. I just ran update.php, still get the same error message.

To further muck things up,I got the genius idea to delete the database tables created by webform:

webform
webform_rules
webform_component
and a couple others I can't remember

I then reinstalled the module, and I get the same error message, just expanded with the absense of all the tables. It reads:

•user warning: Table 'thoughttracks.webform' doesn't exist query: SELECT * FROM webform WHERE nid = 12 in C:\Domains\thoughttracks.com\wwwroot\sites\all\modules\webform\webform.module on line 1035.
•user warning: Table 'thoughttracks.webform_roles' doesn't exist query: SELECT rid FROM webform_roles WHERE nid = 12 in C:\Domains\thoughttracks.com\wwwroot\sites\all\modules\webform\webform.module on line 1039.
•user warning: Table 'thoughttracks.webform_emails' doesn't exist query: SELECT * FROM webform_emails WHERE nid = 12 in C:\Domains\thoughttracks.com\wwwroot\sites\all\modules\webform\webform.module on line 1045.
•user warning: Table 'thoughttracks.webform_component' doesn't exist query: SELECT * FROM webform_component WHERE nid = 12 ORDER BY weight, name in C:\Domains\thoughttracks.com\wwwroot\sites\all\modules\webform\webform.module on line 1059.

And, checking PHPAdmin, those tables are, in fact, gone. There was never a webform_emails table to begin with, which I'm guessing is the table that generated the original error.

So, any ideas on how to back out of the module install completely and try from scratch, or repair what I have??

quicksketch’s picture

Category: bug » support

So, any ideas on how to back out of the module install completely and try from scratch, or repair what I have??

The build-in mechanism is to visit admin/build/modules, disable the module, then visit admin/build/modules/uninstall and uninstall the module. This "cleans-up" the module and removes all the database tables and variables.

Or, if you've already deleted all the tables, you can completely reinstall the module by removing the "webform" row from the "system" database table, which keeps track of which modules have been installed previously. Then you can install the webform module normally as if you'd never installed it before.

rebcorellc’s picture

OK. Went through the build-in mechanism for uninstall (after I tried another install), and I arrived back to where I started.

The error message now is:

user warning: Table 'thoughttracks.webform_emails' doesn't exist query: SELECT * FROM webform_emails WHERE nid = 13 in C:\Domains\thoughttracks.com\wwwroot\sites\all\modules\webform\webform.module on line 1045.

And, looking at my database, there is not a webform_emails table. If this is supposed to be generated on install, it's not happening.

rebcorellc’s picture

...and, if this helps, here's the error message I got right after install:

user warning: BLOB/TEXT column 'excluded_components' can't have a default value query: CREATE TABLE webform_emails ( `nid` INT unsigned NOT NULL DEFAULT 0, `eid` SMALLINT unsigned NOT NULL DEFAULT 0, `email` TEXT DEFAULT NULL, `subject` VARCHAR(255) DEFAULT NULL, `from_name` VARCHAR(255) DEFAULT NULL, `from_address` VARCHAR(255) DEFAULT NULL, `template` TEXT DEFAULT NULL, `excluded_components` TEXT NOT NULL DEFAULT '', PRIMARY KEY (nid, eid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\Domains\thoughttracks.com\wwwroot\includes\database.inc on line 555.

quicksketch’s picture

Ah, you've fallen victim to #894596: Upgrade from 2.x to 3.2 fails under IIS 7 with MySQL 5.1.x, which is an issue affecting users that run MySQL in strict mode. The problem has already been fixed in the development version. You could either apply the patch in that issue, use the development version, or disable strict mode within MySQL.

rebcorellc’s picture

Status: Active » Fixed

OK. Thank you!!! I found the fix you mentioned. I'm running Drupal 6, so the dev version for 7 won't work for me.

I made the following fix to webform.install, and uploaded this modified file along with a fresh install for webform - and now it's working great!

Appreciate your help!

======================================================
Ok... here's a quick fix which prevents webform from being installed (clean install)...

FIX:

Find "excluded_components" in webform.install, and remove " 'default' => '', "

Before:

'excluded_components' => array(
'description' => 'A list of components that will not be included in the %email_values token. A list of CIDs separated by commas.',
'type' => 'text',
'not null' => TRUE,
'default' => '',
),

after:

'excluded_components' => array(
'description' => 'A list of components that will not be included in the %email_values token. A list of CIDs separated by commas.',
'type' => 'text',
'not null' => TRUE
),

Status: Fixed » Closed (fixed)

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