Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
content_translation.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 May 2015 at 14:58 UTC
Updated:
26 Jun 2015 at 00:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirloadContentLanguageSettings() returns NULL if there's no entity_type_id or $bundle. Which looks a bit strange, as those are required arguments. Removing that might actually give you a better error. And if not that, then it should throw an exception instead, again to give you a better error.
Apparently content_translation_language_configuration_element_submit() is unable to extract the correct context, i guess you also get some php notices logged about undefined keys and so on.
Comment #2
pfrenssenThe bundle is NULL because we are creating a new entity type. I can replicate this very easily now, just create a new vocabulary and tick the "Enable translation" checkbox. I'll update the issue summary.
Comment #3
pfrenssenComment #4
pfrenssenFor some reason the
content_translation_language_configuration_element_submitsubmit handler is present twice in the list of submit handlers. The first one runs beforelanguage_configuration_element_submithas the chance to set the bundle on the form state.Comment #5
pfrenssenWoops.
Comment #6
pfrenssenThe first time the
content_translation_language_configuration_element_submithandler is added happens inVocabularyForm::actions():The second time occurs in
content_translation_language_configuration_element_process():The second was added in #2408439: Language / Translation settings are not saved when adding a new bundle. which makes it look like the first one was never functional.
Let's see if anything breaks if we simply remove the first one.
Comment #7
plachLooks quite reasonable to me, thanks. That submit handler was never meant to be added manually. We just need some test coverage now.
Comment #8
pfrenssenAdded a test.
Comment #10
plachAwesome, thanks!
Comment #11
pfrenssenComment #12
alexpottCommitted 6531264 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.