Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Oct 2017 at 10:20 UTC
Updated:
18 Dec 2017 at 19:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mallezieComment #3
mallezieAnd a patch
Comment #4
timmillwoodI guess this shows we didn't have suitable test coverage for this.
Also, maybe this should be abstracted out of Node and added for all translatable entities.
Comment #5
mallezieNot sure about the test-coverage.
It's actually just dead code. There is no publish and unpublish button anymore so the value is never adjusted of that button.
I actually found out about the code through #2915231: Deprecated action buttons in node form which is a 'bug' in rabbit_hole wich assumes those buttons are their, and adds some elements to it, making the above code do run and throw a warning.
About the abstraction, seems we can up that to the ContentTranslationHandler class, but then we would add that label to all translatable content entities, which doesn't sound bad, but is a change if i'm not wrong.
It was done in the nodetranslationhandler since that was the one with all 3 buttons (submit / publish / unpublish) at least before the drop button removal.
Comment #6
timmillwoodI guess we can add a follow up for the abstraction part.
Comment #7
catchCommitted 1a7ba41 and pushed to 8.5.x. Thanks!
Comment #9
timmillwoodI think this should be cherry picked to 8.4.x because we're seeing bug reports of the same issue. For example #2918433: Notice: Undefined index: #value in Drupal\node\NodeTranslationHandler->entityFormAlter().
Comment #11
amateescu commentedIf this patch is fixing #2918433: Notice: Undefined index: #value in Drupal\node\NodeTranslationHandler->entityFormAlter() than this is bug, not a task, so we have to treat it as such and backport it to 8.4.x.
Comment #13
slydevil commentedIssue #2918433 can also use the attached patch as it applies to the 8.4 code base cleanly. Setting this to fixed again.
Comment #14
timmillwoodI still think we should cherry pick this issue back to 8.4.x
Comment #15
slydevil commentedOk, I've added the exact same patch to the other issue...and re-opened.
Comment #16
xjmCherry-picked to 8.4.x. Thanks!
Comment #17
timmillwoodThank you @xjm.