When I create a new meta entity type, and I then try to create one of the meta entities through the UI using the default settings, I am getting the following error:
Error: Call to a member function getEntityTypeId() on null
/home/pieter/v/joinup-dev/web/modules/contrib/meta_entity/src/Plugin/Validation/Constraint/MappedTargetEntityValidator.php:45
This is because in the default configuration the entity reference to the target entity is hidden from the form display, and the entity is saved without referencing the target entity. The code does not account for the fact that the reference might be empty.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3080887-2-test-only.patch | 1.24 KB | pfrenssen |
#2 | 3080887-2.patch | 2.13 KB | pfrenssen |
|
Comments
Comment #2
pfrenssenHere's a patch and a test.
Comment #4
claudiu.cristeaThanks!
Comment #5
pfrenssenThanks for quick review!
The test result shows the error I was encountering:
Comment #6
pfrenssenComment #8
pfrenssen