Fields cannot be created when installing

Created on 1 January 2023, almost 2 years ago
Updated 7 February 2023, almost 2 years ago

Problem/Motivation

I am using Drupal 9.5.0, PHP 8.1, MariaDB 10.3

Errors reported whilst enabling module indicate that the following fields cannot be created:

  • contact_message.id
  • contact_message.created
  • contact_message.uid
  • contact_message.ip_address
drush en contact_storage
 [error]  An error occurred while notifying the creation of the id field storage definition: "Exception thrown while performing a schema update. Cannot add field 'contact_message.id': table doesn't exist." in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1594 of /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 
 [error]  An error occurred while notifying the creation of the created field storage definition: "Exception thrown while performing a schema update. Cannot add field 'contact_message.created': table doesn't exist." in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1594 of /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 
 [error]  An error occurred while notifying the creation of the uid field storage definition: "Exception thrown while performing a schema update. Cannot add field 'contact_message.uid': table doesn't exist." in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1594 of /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 
 [error]  An error occurred while notifying the creation of the ip_address field storage definition: "Exception thrown while performing a schema update. Cannot add field 'contact_message.ip_address': table doesn't exist." in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1594 of /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 
 [success] Successfully enabled: contact_storage

Steps to reproduce

composer require 'drupal/contact_storage:^1.3'
drush en contact_storage

This is probably unrelated but when I uninstalled the module the contact_message table in the database was not removed.

πŸ› Bug report
Status

Closed: duplicate

Version

1.3

Component

Code

Created by

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.

Production build 0.71.5 2024