Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- Enable devel
- Visit http://drupal.d8/node/3/devel
- Note
$node->*fieldDefinitions (array, 20 elements)</li> <li> Array ( [nid] => Drupal\Core\Field\FieldDefinition Object ( [type:protected] => integer [propertyDefinitions:protected] => [schema:protected] => [indexes:protected] => Array ( ) [itemDefinition:protected] => Drupal\Core\Field\TypedData\FieldItemDataDefinition Object ( [fieldDefinition:protected] => Drupal\Core\Field\FieldDefinition Object *RECURSION* [definition:protected] => Array ( [type] => field_item:integer [settings] => Array ( [unsigned] => 1 [min] => [max]
- Enable kint
- Visit http://drupal.d8/node/3/devel
- Note
protected fieldDefinitions -> NULL
Comment | File | Size | Author |
---|---|---|---|
#4 | node_field_definitions-2311557-4.patch | 1.08 KB | lussoluca |
| |||
#2 | node_field_definitions-2311557-1.patch | 847 bytes | lussoluca |
|
Comments
Comment #1
clemens.tolboomSame goes for using the core exporter: a nullified fieldDefinitions ... weird :-/
Comment #2
lussolucaIn the latest version of Devel/Core this field is empty regardless of dumper used. One way to force Drupal to compute the value is by calling the getFieldDefinitions() method on the entity.
Comment #3
willzyx CreditAttribution: willzyx commentedI think we need to add a comment that explains why is needed to call ::getFieldDefinitions() . Otherwise looks good +1
Comment #4
lussolucaSomething like that?
Comment #5
willzyx CreditAttribution: willzyx commentedYes, something like that . Or something like
Comment #7
lussolucaCommitted and pushed to 8.x
Comment #8
willzyx CreditAttribution: willzyx commented