Issue #2030913 by jthorson, andypost, jaredsmith: Fixed Comment module WSOD due to old translation_entity() module name used.

8.0.x
Nathaniel Catchpole 2013-07-02 10:56:20 +01:00
parent c09d2791a7
commit ffa96ebf6d
3 changed files with 8 additions and 3 deletions

View File

@ -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');
} }
} }

View File

@ -38,7 +38,7 @@ class ContentTranslationSettingsTest extends WebTestBase {
$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 @@ class ContentTranslationSettingsTest extends WebTestBase {
$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');
} }
/** /**

View File

@ -25,7 +25,7 @@ use Drupal\Core\Language\Language;
* "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,