Database error on module install

Created on 26 February 2018, over 6 years ago
Updated 29 September 2023, about 1 year ago

Hello,
I get a white page with the following text when I install the module "commerce_shipping" in version (dev-2.x) or (2.0-beta4) :
Le site Web a rencontré une erreur inattendue. Veuillez essayer de nouveau plus tard.The website encountered an unexpected error. Please try again later.<br />

I do not know why I get this error, drush command return me this:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd8_gcp.commerce_store__shipping_countries' doesn't exist:      [error]
SELECT t.*
FROM 
{commerce_store__shipping_countries} t
WHERE (entity_id IN (:db_condition_placeholder_0)) AND (deleted = :db_condition_placeholder_1) AND (langcode IN (:db_condition_placeholder_2,
:db_condition_placeholder_3, :db_condition_placeholder_4))
ORDER BY delta ASC; Array
(
    [:db_condition_placeholder_0] => 1
    [:db_condition_placeholder_1] => 0
    [:db_condition_placeholder_2] => fr
    [:db_condition_placeholder_3] => und
    [:db_condition_placeholder_4] => zxx
)
 in Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables() (line 1165 of
/home/sites/D8_commerce/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php) #0
/home/sites/D8_commerce/web/core/lib/Drupal/Core/Database/Connection.php(650): Drupal\Core\Database\Connection->handleQueryException(Object(PDOException), 'SELECT
t.*\nFROM...', Array, Array)
#1 /home/sites/D8_commerce/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(87): Drupal\Core\Database\Connection->query('SELECT t.*\nFROM...', Array, Array)
#2 /home/sites/D8_commerce/web/core/lib/Drupal/Core/Database/Query/Select.php(510): Drupal\Core\Database\Driver\mysql\Connection->query('SELECT t.*\nFROM...', Array,
Array)
#3 /home/sites/D8_commerce/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1165): Drupal\Core\Database\Query\Select->execute()
#4 /home/sites/D8_commerce/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(510):
....

I need to do:

composer remove drupal/commerce_shipping
drush pmu commerce_shipping
drush cr

to make it works again, but I really need the shipping...

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

🇫🇷France steveoriol Grenoble 🇫🇷

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom ippy

    I ran into similar install/uninstall issues and wanted to thank contributors for their notes, especially @curt2199 for quick reference to table CREATE statements. I only needed two in this use-case: commerce_shipping_method and commerce_shipment.

    8.x-2.6 on 9.5.9. Store already existed and the module had previously been installed and uninstalled (dev site/testing).

Production build 0.71.5 2024