Base table or view not found: 1146 Table 'mysite.webform_submission' doesn't exist

Created on 8 February 2023, over 1 year ago
Updated 11 April 2023, about 1 year ago

Problem/Motivation

Base table or view not found: 1146 Table 'mysite.webform_submission' doesn't exist

Steps to reproduce

I'm using Drupal 9.5.2
PHP 8.1.0
Using composer require "drupal/webform:^6.1" install the module

Proposed resolution

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.webform_submission' doesn't exist: SELECT "base_table"."sid" AS "sid", "base_table"."sid" AS "base_table_sid"
FROM
"webform_submission" "base_table"
LIMIT 1 OFFSET 0; Array
(
)

๐Ÿ’ฌ Support request
Status

Closed: cannot reproduce

Version

6.1

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshreddymathuku Bangalore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dineshreddymathuku
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    Did additional errors occur when you enabled the module in Drupal?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    Is the database copied from another siteโ€™s?

  • ๐Ÿ‡ง๐Ÿ‡ทBrazil RenatoG Campinas

    @dineshreddymathuku put the field "version" as 6.2.x-dev but in the Steps to reproduce you put 6.1. So based on your steps to reproduce I'm updating the version field

  • ๐Ÿ‡ง๐Ÿ‡ทBrazil RenatoG Campinas

    I tested in both versions 6.1.x-dev and 6.2.x-dev and worked fine in both

    In your steps to reproduceI didn't see a step to enable the webform. Which give in my mind if was tried to just download the webform code in a database that had the webform enabled previously as asked in #3

    If the answer for this question is yes, I'd recommend downloading the same version that was installed previously. Just remembering that the command that you put in the steps to reproduce composer require "drupal/webform:^6.1" isn't fixed as you can see in the ^, so it can download a version more updated than your previous version

    Last but not least, in the field Category was Task but for now seems more related with Support Request, so I'm converting this

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dineshreddymathuku Bangalore

    HI RenatoG
    as you menctioned using composer require "drupal/webform:^6.1" imported module and enabled,then getting site error
    Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite.webform_submission' doesn't exist: SELECT "base_table"."sid" AS "sid", "base_table"."sid" AS "base_table_sid" FROM "webform_submission" "base_table" LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 272 of core\lib\Drupal\Core\Entity\Query\Sql\Query.php).

    when i try to uninstall using drush also getting same error ,attached below please look once

    thanks

  • ๐Ÿ‡ง๐Ÿ‡ทBrazil RenatoG Campinas

    Strange. For me looks well

    renatog@macbook: composer require "drupal/webform:^6.1"
    
    ./composer.json has been updated
    Running composer update drupal/webform
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 1 install, 0 updates, 0 removals
      - Locking drupal/webform (6.2.0-beta5)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
      - Downloading drupal/webform (6.2.0-beta5)
      - Installing drupal/webform (6.2.0-beta5): Extracting archive
    2 package suggestions were added by new dependencies, use `composer suggest` to see details.
    Generating autoload files
    85 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    phpstan/extension-installer: Extensions installed
    No security vulnerability advisories found
    
    
    
    renatog@macbook: drush en webform -y
    
     [success] Successfully enabled: webform
    
    renatog@macbook: drush pmu webform -y
    [success] Successfully uninstalled: webform
    

    Could you answer #3 please? I'm curious about it as well

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    You did not acknowledge my questions.

  • Status changed to Postponed: needs info over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen
  • I experienced this same issue.

    Installed latest 6.1.4 version to an existing website and instantly ran into this error. No matter what I did the error kept on showing up.

    I was able to resolve the issue by creating the tables manually. After the table was created, I was able to uninstall the module and re-install it again. Everything seems to be working fine.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY

    Because there is no easy way to reproduce this issue, I think this is an edge case bug related to database configuration.

  • Status changed to Closed: cannot reproduce about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jrockowitz Brooklyn, NY
Production build 0.69.0 2024