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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3335499-the-customerprofiles-field.patch | 766 bytes | znerol |
Comments
Comment #2
znerol commentedComment #4
znerol commented