Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
To reproduce:
Go to Basic custom block type fields management and try to add an entityreference field...
Notice: Undefined index: type in Drupal\Core\TypedData\TypedDataManager->create() (line 131 of core/lib/Drupal/Core/TypedData/TypedDataManager.php).
InvalidArgumentException: Invalid data type <em class="placeholder"></em> has been given. in Drupal\Core\TypedData\TypedDataFactory->createInstance() (line 44 of /var/www/d8/core/lib/Drupal/Core/TypedData/TypedDataFactory.php).
Somehow in the $definition passed in TypedDataManager::create()
there are only the field settings:/
Comment | File | Size | Author |
---|---|---|---|
#5 | 1935974-before.png | 70.43 KB | andymartha |
#5 | 1935974-after.png | 49.62 KB | andymartha |
#4 | 1935974-test-only.patch | 2.41 KB | amateescu |
#4 | 1935974.patch | 3.95 KB | amateescu |
Comments
Comment #1
ParisLiakos CreditAttribution: ParisLiakos commentedthis is blocking #15266: Replace aggregator category system with taxonomy
Comment #2
blueminds CreditAttribution: blueminds commentedComment #3
ParisLiakos CreditAttribution: ParisLiakos commentedThis makes entity reference useless when all entities become NG
Comment #4
amateescu CreditAttribution: amateescu commentedIt seems that this issue was already fixed in #1818556-120: Convert nodes to the new Entity Field API. I've extracted the fix from there and added a temporary test.
Comment #5
andymartha CreditAttribution: andymartha commentedI can confirm that on a fresh installation of Drupal 8.x-dev on March 6th, the problem described (entity reference crashing) was valid (see screenshot).
After applying 1935974.patch found in #4 by amateescu, I was able to successfully save an entity reference field to a custom block. See screenshot.
Comment #6
ParisLiakos CreditAttribution: ParisLiakos commentedI can confirm that the patch fixes it:) that was quick, thanks all!
Comment #7
webchickMy sincere hope is that nodes as entity NG is just around the corner, so this is an important fix to get put away sooner than later.
Committed and pushed to 8.x. Thanks!
Comment #8
ParisLiakos CreditAttribution: ParisLiakos commentedthis was never pushed
Comment #9
webchickHuh, that's weird. And now that nodes as Entity NG is committed, this no longer applies. :(
Comment #10
amateescu CreditAttribution: amateescu commentedThat's because this fix was already included in the nodes conversion patch :)