Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
content_translation.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2018 at 18:00 UTC
Updated:
17 Apr 2018 at 17:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sylvainm commentedAttached patch fixes the error
Comment #3
berdirLooks correct, but how are we not testing this... definitely needs tests :)
Also at least major.
Comment #4
borisson_Adding needs tests per #3.
Comment #5
sylvainm commentedI will try to add tests this week
Comment #6
dravenkIf
$form_state->getFormObject()not return a entity. what is return from there? Sorry, I can't repeat it. Can you provide the more detailed reproduction steps.?Comment #7
sylvainm commentedWith some delay, I added this test.
Hope this is correct
Comment #9
borisson_This looks super solid, I like the test and it fails without the fix, so great work!
Comment #10
kala4ekJust checked at freshly 8.6.x
Works like a charm.
Comment #12
MixologicTemporary testbot hiccup.
Comment #13
catchIt looks to me like this would fail for untranslated user deletion too - should we add test coverage for that? (And also change the issue title?)
Comment #14
berdirWe have lots of tests for deleting untranslated users IMHO.
This is in the content translation handler, that thing is never called if it is not translatable. It is called by \Drupal\content_translation\ContentTranslationHandler::entityFormAlter() as a delete submit callback, which in turn is called by content_translation_form_alter() if the entity type is marked as translatable.
Comment #15
catchGood point.
Committed/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!