Commit ffa96ebf authored by catch's avatar catch

Issue #2030913 by jthorson, andypost, jaredsmith: Fixed Comment module WSOD...

Issue #2030913 by jthorson, andypost, jaredsmith: Fixed Comment module WSOD due to old translation_entity() module name used.
parent c09d2791
...@@ -1024,7 +1024,7 @@ function comment_form_node_type_form_alter(&$form, $form_state) { ...@@ -1024,7 +1024,7 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
if (module_exists('content_translation')) { if (module_exists('content_translation')) {
$comment_form = $form; $comment_form = $form;
$comment_form_state['content_translation']['key'] = 'language_configuration'; $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); $form['comment'] += content_translation_enable_widget('comment', 'comment_node_' . $node_type->id(), $comment_form, $comment_form_state);
array_unshift($form['#submit'], 'comment_translation_configuration_element_submit'); array_unshift($form['#submit'], 'comment_translation_configuration_element_submit');
} }
} }
......
...@@ -38,7 +38,7 @@ function setUp() { ...@@ -38,7 +38,7 @@ function setUp() {
$this->drupalCreateContentType(array('type' => 'article')); $this->drupalCreateContentType(array('type' => 'article'));
$this->drupalCreateContentType(array('type' => 'page')); $this->drupalCreateContentType(array('type' => 'page'));
$admin_user = $this->drupalCreateUser(array('administer languages', 'administer content translation')); $admin_user = $this->drupalCreateUser(array('administer languages', 'administer content translation', 'administer content types'));
$this->drupalLogin($admin_user); $this->drupalLogin($admin_user);
} }
...@@ -96,6 +96,11 @@ function testSettingsUI() { ...@@ -96,6 +96,11 @@ function testSettingsUI() {
$language_configuration = language_get_default_configuration('comment', 'comment_node_article'); $language_configuration = language_get_default_configuration('comment', 'comment_node_article');
$this->assertEqual($language_configuration['langcode'], 'current_interface', 'The default language for article comments is set to the current interface language.'); $this->assertEqual($language_configuration['langcode'], 'current_interface', 'The default language for article comments is set to the current interface language.');
$this->assertTrue($language_configuration['language_show'], 'The language selector for article comments is shown.'); $this->assertTrue($language_configuration['language_show'], 'The language selector for article comments is shown.');
// Verify language widget appears on node type form.
$this->drupalGet('admin/structure/types/manage/article');
$this->assertField('content_translation');
$this->assertFieldChecked('edit-content-translation');
} }
/** /**
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* "form" = { * "form" = {
* "default" = "Drupal\entity_test\EntityTestFormController" * "default" = "Drupal\entity_test\EntityTestFormController"
* }, * },
* "translation" = "Drupal\translation_entity\EntityTranslationControllerNG" * "translation" = "Drupal\content_translation\ContentTranslationControllerNG"
* }, * },
* base_table = "entity_test", * base_table = "entity_test",
* fieldable = TRUE, * fieldable = TRUE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment