Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
workspaces.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2018 at 23:16 UTC
Updated:
27 Nov 2018 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sam152 commentedI imagine this is because of #2880149: Convert taxonomy terms to be revisionable. But more broadly speaking, there should probably be some validation for auto-created entities that aren't supported.
Comment #3
sam152 commentedHow about something like this?
Comment #4
amateescu commentedThe patch looks great! I only found a few minor points:
Alters ... :)
Let's add an early return if
$valueis empty.Let's use
assertCount()here :)Comment #5
dhirendra.mishra commentedComment #6
dhirendra.mishra commentedThanks for highlighting correction. I am uploading interdiff with #3 and patch which includes correction from #4. Please review and merge my patch.
Comment #8
sam152 commentedNot sure what happened with the patch in #6, looks like it messed up somehow.
I looked into the empty check and it doesn't seem necessary, our validator isn't called when the list is empty:
\Drupal\Core\TypedData\Validation\RecursiveContextualValidator::validateNodeEdit: Just to expand on that, our constraint is on the field item level and the field item list doesn't recurse when empty.
Comment #9
amateescu commentedLooks great now!
Comment #10
alexpottNeeds a re-roll :(
Creditting @Eli-T for creating the issue with clear steps to reproduce and @amateescu for patch review.
Comment #11
amateescu commentedRerolled.
Comment #12
alexpottCommitted and pushed e417c7f2fd to 8.7.x and 8e94ef486c to 8.6.x. Thanks!