Follow-up of #1957748: hook_field_prepare_view() is passed empty field values for EntityNG Entities
Right now, only field_attach_view() and field_attach_prepare_view() functions make sure they are working with a BC entity, the others have to be called with one, so the caller needs to make sure.
It would be easier to convert and later on remove it again when the other field attach functions would ensure this, as there are dozens if not hundreds of direct calls t those functions in the field tests, that I am converting in #1822000: Remove Drupal\field_test\Plugin\Entity\Type\TestEntity in favor of EntityTest.
Comment | File | Size | Author |
---|---|---|---|
#13 | ensure-bc-entity-1974474-12.patch | 8.96 KB | Berdir |
#5 | ensure-bc-entity-1974474-5.patch | 7.37 KB | Berdir |
#5 | ensure-bc-entity-1974474-5-interdiff.txt | 851 bytes | Berdir |
#3 | ensure-bc-1974474-3.patch | 7.48 KB | Berdir |
#3 | ensure-bc-1974474-3-interdiff.txt | 594 bytes | Berdir |
Comments
Comment #1
BerdirEasy as that... I think ;)
Comment #3
BerdirWell. me = fail.
Comment #5
BerdirI've messed up field_attach_load(), this should be better.
Comment #6
BerdirTagging.
Comment #7
dawehnerI guess it would be helpful to explain why it's done here.
Comment #8
BerdirCan easily change that within the patch, but to what? I just took the existing comment and copied to all other places.
Comment #9
BerdirComment #10
dawehnerWhat about:
Enable BC if the entity is NG.
?Comment #11
BerdirDoesn't seem to explain something either :)
"Field API needs a BC mode entity" or "Ensure we are working with a BC mode entity" maybe?
Comment #12
dawehnerI like the second one.
Comment #13
BerdirHere's a patch with that, then :) No interdiff, not really necessary I think ;)
Comment #14
dawehnerThanks!
Comment #15
dawehnerA somehow related issue is #1977464: The custom field which add for comment con't show in views which caused a bug with all EntityNGs, though I think it's valid to have these two issues separated.
Comment #16
alexpott#13: ensure-bc-entity-1974474-12.patch queued for re-testing.
Comment #17
alexpottCommitted 0be9849 and pushed to 8.x. Thanks!