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

CommentFileSizeAuthor
#2 3335499-the-customerprofiles-field.patch766 bytesznerol

Comments

znerol created an issue. See original summary.

znerol’s picture

Status: Active » Needs review
StatusFileSize
new766 bytes

  • znerol committed a24fd21a on 1.0.x
    Issue #3335499 by znerol: The customer_profiles field on the user entity...
znerol’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.