The customer_profiles field on the user entity has no field storage definition

Created on 22 January 2023, about 2 years ago

Problem/Motivation

The customer_profiles field on the user entity has no field storage definition. As a result ToneExtraFields::containsToneReference() crashes when attempting to traverse entity references with the following error:

TypeError: Drupal\tone\ToneExtraFields::containsToneReference(): Argument #1 ($definition) must be of type Drupal\Core\Field\FieldStorageDefinitionInterface, null given, called in modules/contrib/tone/src/ToneExtraFields.php on line 172 in Drupal\tone\ToneExtraFields->containsToneReference() (line 153 of modules/contrib/tone/src/ToneExtraFields.php).

Steps to reproduce

Attempt to use tone module on a commerce site.

Proposed resolution

Guard against null in $definitions[$fieldName].

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland znerol

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

Comments & Activities

Production build 0.71.5 2024