Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
entity system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jan 2018 at 10:05 UTC
Updated:
22 Feb 2018 at 10:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersPlease credit @hchonov and @plach.
Comment #3
wim leersComment #4
sam152 commentedComment #5
plachHere's some initial work
Comment #6
wim leerss/translation/form/
Or better yet:
revisionable entity forms
Why
10? Can't this be0? If not, let's document why.Comment #8
plachComment #10
plachThis should fix the last test failures by moving unit test coverage to a dedicated test.
Comment #11
wim leersThe class is marked
@internal, great. Can we also setpublic: falsethen?So … whenever a
Workflowentity is updated, we must rebuild routes.First: this should use
::setRebuildNeeded()AFAICT.Second: why do we even need to do this? Why is the route subscriber alone not enough? I think it's because the route subscriber only sets that
load_latest_revisionflag on entity types for which aWorkflowentity exists that dictates acontent_moderation-powered workflow, right? It is not trivial to connect those dots. It'd be good to have a@see \F\Q\C\N::getEntityTypes(), that'd help connect those dots.Still not accurate, apparently it's only for
moderated revisionable entity forms?getModeratedEntityTypes()This is highly unusual. A
::setUp()with a@covers. Is this really correct?Nice edge case, I didn't even realize this was possible!
Glad to see this edge case tested.
But I'm not seeing test coverage for an entity form for a non-moderated entity type?
Comment #12
plachThis should address the review above.
Comment #13
wim leersWe're testing that they're not affected. In other test cases where we're testing that a case is unaffected, we don't pass that final array, because it is the same. We should do the same here.
Other than that, this looks great.
Comment #14
plachAddressed that, I also realized I was owing you a dots-connecting comment :)
Comment #15
wim leers👍
Comment #16
effulgentsia commentedThe patch looks great to me. +1 from me on committing this to 8.6 and 8.5. But why is this prioritized as Critical? Related to the priority question, is it important (with respect to known contrib modules) for this to land before beta, or would between beta and RC be ok? My preference would be before, since it's good to minimize behavior changes between beta and RC, but I'm not currently thinking of a reason that it would be hugely problematic to do it after.
I pinged other committers for their thoughts, and also posted #2865616-92: Add an option for EntityConverter to load the latest entity revision and fix all entity forms to use this option. to get feedback from the people who intentionally introduced the behavior that this is now proposes to partially undo.
Comment #18
effulgentsia commentedCrediting @hchonov per #2.
Comment #19
wim leersBecause without this landing before 8.5.0, we'll have shipped a behavior change and hence a BC break.
Comment #22
catchRight. The bc break is allowable, but given we've decided we don't want to make it, we shouldn't ship it, then change it back again later.
Committed/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!