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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Issue tags: +Regression
Gábor Hojtsy’s picture

Title: Regression: comment module WSOD due to old module name used » Comment module WSOD due to old translation_entity module name used
jthorson’s picture

FileSize
846 bytes

So all you need is the function rename?

Not tested, but here's a patch!

jthorson’s picture

Status: Active » Needs review
jthorson’s picture

Incidently, there's another missed translation_entity reference located in EntityTestCache.php on line 28.

Gábor Hojtsy’s picture

Issue tags: +Needs tests

Well, since it it did not fail tests, it would need a test I think.

andypost’s picture

Added test and fixed unused definition of translation controller

Gábor Hojtsy’s picture

Priority: Major » Critical

How is the entity_test change related?

BTW critical for WSOD as discussed with @alexpott.

jaredsmith’s picture

FileSize
5.69 KB

I'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.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

That 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.

jibran’s picture

Issue tags: +RTBC July 1

This issue was RTBC and passing tests on July 1, the beginning of API freeze.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.