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.
Follow-up from #2021817-51: Make widgets / formatters work on EntityNG Field value objects.
+++ b/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php
@@ -130,6 +130,7 @@ public function __unset($name) {
$this->set($name, NULL);
+ unset($this->values[$name]);
This seems to be necessary, as otherwise there are bot fails, see #2014163-43: Bot checks for #2021817. So it looks like we've a problem in set().
Comment | File | Size | Author |
---|---|---|---|
#1 | remove-unset-2050201-1.patch | 439 bytes | Berdir |
Comments
Comment #1
BerdirThis means that this should then result in fails?
Comment #3
yched CreditAttribution: yched commented;-)
Comment #3.0
yched CreditAttribution: yched commentedfix context
Comment #4
fago1: remove-unset-2050201-1.patch queued for re-testing.
Comment #6
fagoLet's fix this as part of #2137309: Typed data does not handle set() and onChange() consistently