Problem
#111715: Convert node/content types into configuration introduced a regression by calling the old translation_entity module code in comment_form_node_type_form_alter(). In this code snippet:
if (module_exists('content_translation')) {
$comment_form = $form;
$comment_form_state['content_translation']['key'] = 'language_configuration';
$form['comment'] += translation_entity_enable_widget('comment', 'comment_node_' . $node_type->id(), $comment_form, $comment_form_state);
array_unshift($form['#submit'], 'comment_translation_configuration_element_submit');
}
Note the module_exists() uses the new name, the call on the line before the last uses the old name. The report came from @jsmith on IRC.
Steps to reproduce
[9:36pm] jsmith: So, with the latest code from Git, I did a quick installation in Spanish
[9:36pm] jsmith: Then added English as a second language
[9:36pm] jsmith: I've added a new node (in Spanish)
[9:36pm] jsmith: and I can see it when I switch to English
[9:36pm] jsmith: (/en/node/1)
[9:36pm] jsmith: but if I try to edit it in English (/en/node/1/edit), I get a WSOD and a nice traceback in the error log
Comment | File | Size | Author |
---|---|---|---|
#9 | error_log.txt | 5.69 KB | jaredsmith |
#7 | interdiff.txt | 2.4 KB | andypost |
#7 | 2030913-con-trans-7-fail.patch | 2.4 KB | andypost |
#7 | 2030913-con-trans-7.patch | 3.23 KB | andypost |
#3 | 2030913-3.patch | 846 bytes | jthorson |
Comments
Comment #1
Gábor HojtsyComment #2
Gábor HojtsyComment #3
jthorson CreditAttribution: jthorson commentedSo all you need is the function rename?
Not tested, but here's a patch!
Comment #4
jthorson CreditAttribution: jthorson commentedComment #5
jthorson CreditAttribution: jthorson commentedIncidently, there's another missed translation_entity reference located in EntityTestCache.php on line 28.
Comment #6
Gábor HojtsyWell, since it it did not fail tests, it would need a test I think.
Comment #7
andypostAdded test and fixed unused definition of translation controller
Comment #8
Gábor HojtsyHow is the entity_test change related?
BTW critical for WSOD as discussed with @alexpott.
Comment #9
jaredsmith CreditAttribution: jaredsmith commentedI've tried the patches in both comment three and comment seven, but I still get a WSOD with the following error:
Call to a member function bundle() on a non-object in /var/www/html/drupal/core/modules/node/node.module on line 136.
I'll attach the full traceback.
Comment #10
BerdirThat is an existing, separate issue, does not have to do with this bug. It has to do with the combination of help.module and multi-lingual.
The fix looks ok to me, the entity_test_cache change is a bit off-topic, that probably got in more or less together, nothing uses that, it's just a test entity that is used in one case to test field cache handling, would be strange to add tests for that. Will probably be removed and set to the default when NG suffix is removed.
Comment #11
jibranThis issue was RTBC and passing tests on July 1, the beginning of API freeze.
Comment #12
catchCommitted/pushed to 8.x, thanks!