Entity storage exception during module install missing @message parameter in watchdog_exception() call.

Created on 28 September 2020, about 4 years ago
Updated 3 March 2023, over 1 year ago

Problem/Motivation

If there is an entity storage exception thrown during module install, the watchdog_exception() is missing a replacement for the !message placeholder, so the exception message is not shown or logged.

Steps to reproduce

Using drush, install Drupal using a profile (such as Lighting https://www.drupal.org/project/lightning ) that installs Contact Storage 8.x-1.1.
Note error messages:

[error]  An error occurred while notifying the creation of the id field storage definition: "!message" in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1615 of /vagrant/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
 [error]  An error occurred while notifying the creation of the created field storage definition: "!message" in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1615 of /vagrant/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
 [error]  An error occurred while notifying the creation of the uid field storage definition: "!message" in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1615 of /vagrant/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
 [error]  An error occurred while notifying the creation of the ip_address field storage definition: "!message" in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1615 of /vagrant/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Proposed resolution

Set exception message $e->getMessage() as replacement for !message placeholder.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

9.5

Component
Extension 

Last updated 3 days ago

No maintainer
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