I got this problem when I enable webform on modules.
I just created webform manually on phpMyAdmin.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.dr_webform' doesn't exist: CREATE TABLE {webform} ( `nid` INT unsigned NOT NULL COMMENT 'The node identifier of a webform.', `confirmation` TEXT NOT NULL COMMENT 'The confirmation message or URL displayed to the user after submitting a form.', `confirmation_format` TINYINT NOT NULL DEFAULT 0 COMMENT 'The input format used by the confirmation message.', `redirect_url` VARCHAR(255) DEFAULT '' COMMENT 'The URL a user is redirected to after submitting a form.', `status` TINYINT NOT NULL DEFAULT 1 COMMENT 'Boolean value of a webform for open (1) or closed (0).', `block` TINYINT NOT NULL DEFAULT 0 COMMENT 'Boolean value for whether this form be available as a block.', `teaser` TINYINT NOT NULL DEFAULT 0 COMMENT 'Boolean value for whether the entire form should be displayed on the teaser.', `allow_draft` TINYINT NOT NULL DEFAULT 0 COMMENT 'Boolean value for whether submissions to this form be saved as a draft.', `submit_notice` TINYINT NOT NULL DEFAULT 1 COMMENT 'Boolean value for whether to show or hide the previous submissions notification.', `submit_text` VARCHAR(255) DEFAULT NULL COMMENT 'The title of the submit button on the form.', `submit_limit` TINYINT NOT NULL DEFAULT -1 COMMENT 'The number of submissions a single user is allowed to submit within an interval. -1 is unlimited.', `submit_interval` INT NOT NULL DEFAULT -1 COMMENT 'The amount of time in seconds that must pass before a user can submit another submission within the set limit.', PRIMARY KEY (`nid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Table for storing additional properties for webform nodes.'; Array ( ) in db_create_table() (line 2588 of F:\Web Development File\www\drupal7\includes\database\database.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Webform Create Database Table Manually.txt | 7.01 KB | mjgruta |
Comments
Comment #1
mjgruta commentedComment #2
mjgruta commentedSo I created the database manually and get the following error. when I enable webform.
DatabaseSchemaObjectExistsException: Table webform already exists. in DatabaseSchema->createTable() (line 630 of F:\Web Development File\www\drupal7\includes\database\schema.inc).
Comment #3
quicksketchI need more information on how to reproduce this problem. Hundreds of people are already using Webform on D7 and this problem does not come up for others (or myself).
Comment #4
mjgruta commentedI don't know what causing the problem.
what kind of information do you need?
This are the modules I enabled.
I'm using Drupal core 7.0
Block,Color, Comment, Contextual links, Dashboard, Database logging,
Field, Field SQL storage, Field UI, File, Filter, Help, Image, List, Menu, Node, Number, Overlay, Path,
RDF, Search, Shortcut, System, Taxonomy, Text, Toolbar, Update Manager, User
Custom content panes 7.x-1.0-alpha2
Custom rulesets 7.x-1.0-alpha2
Page manager 7.x-1.0-alpha2
Views content panes 7.x-1.0-alpha2
Drupal for Firebug Preprocessor 7.x-1.x-dev
Theme developer 7.x-1.x-dev
Advanced help example 7.x-1.0-beta1
Custom Breadcrumbs 7.x-1.0-alpha1
DHTML Menu 7.x-1.0-beta1
Entity API 7.x-1.x-dev
Entity Metadata 7.x-1.x-dev
Entity tokens 7.x-1.x-dev
LoginToboggan 7.x-1.1
LoginToboggan Rules Integration 7.x-1.1
Menu Block 7.x-2.0
Menu Firstchild 7.x-1.0
Pathauto 7.x-1.0-beta1
Token 7.x-1.0-beta1
Rules 7.x-2.0-alpha4
Rules UI 7.x-2.0-alpha4
Taxonomy Menu 7.x-1.1
CKEditor 7.x-1.0
Views 7.x-3.0-alpha1
Views UI 7.x-3.0-alpha1
Comment #5
mjgruta commentedWhen I tried creating the table manually on phpMyAdmin I get table doesn't exist but when I remove some letters to the table name, the query is successful. So my work around is to rename the table after I query it. then remove all the webform tables & enable the webform module.
I still don't know what causes this problem.
I attached the Database query for others who want to create the tables manually.
Comment #6
quicksketchI'm going to mark this fixed as it sure seems like an installation-specific problem. Thousands of users have now installed Webform on D7 without this problem. Webform doesn't even install it's own tables in D7, it's done automatically by Drupal core.
Comment #8
Lloyd commentedI'm getting the same message when upgrading from webform 7.x-3.6 to 7.x-4.0 via drush. It happens when I'm running the updatedb command. Interestingly, run I run update.php within the site it's saying there are no updates available. Here's the output:
Comment #9
Brian294 commentedI agree with quicksketch, this is a localized issue at the time of installation. I experienced all kinds of PDOExceptions with a new Drupal 7 installation. The issue was that I had forgotten to increase the PHP memory limit when setting up a new website. So anytime I tried to install a module, I was getting white screen of death on the admin/module/list/confirm page. According to the /admin/modules page and the module was checked (installed), however some or none of the required tables were created.
For me, the fix was to:
1. Remove the webform folder from the modules folder.
2. Refresh your /admin/modules page so it rebuilds its cache of known modules.
3. Add some code to increase the PHP memory of your server: http://drupal.org/node/207036
4. Put the webform module folder back into the modules folder.
5. Attempt installation again.
If you get a white screen, you probably don't have enough memory. If it redirects you back to the module listing page, you should be good to go.
Peace,
Brian
Comment #10
zjoriz commentedBrian, thanks a ton. The memory limit thing is a good one to remember for other missing tables I may encounter -- and I should override memory settings before installing contributed modules from now on.