Skip to content
Snippets Groups Projects
Verified Commit f4d6cdf6 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3416304 by sleitner, RoloDMonkey, smustgrave: Javascript warning from...

Issue #3416304 by sleitner, RoloDMonkey, smustgrave: Javascript warning from content language and translation page

(cherry picked from commit 6923b1a6)
(cherry picked from commit 5cf244cb)
parent 5ab704c2
No related branches found
No related tags found
6 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...
......@@ -61,7 +61,10 @@
$element = $fields.filter(filterFieldsList);
}
if ($element[0].matches(`input[value="${column}"]:checked`)) {
if (
$element.length &&
$element[0].matches(`input[value="${column}"]:checked`)
) {
$fields.prop('checked', true).not($element).prop('disabled', true);
} else {
$fields.prop('disabled', false);
......
<?php
declare(strict_types=1);
namespace Drupal\Tests\content_translation\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
/**
* Tests that the content translation configuration javascript does't fail.
*
* @group content_translation
*/
class ContentTranslationConfigUITest extends WebDriverTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['content_translation', 'node'];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Use the minimal profile.
*
* @var string
*/
protected $profile = 'standard';
/**
* Tests that the content translation configuration javascript does't fail.
*/
public function testContentTranslationConfigUI() {
$content_translation_manager = $this->container->get('content_translation.manager');
$content_translation_manager->setEnabled('node', 'article', TRUE);
$this->rebuildContainer();
$admin = $this->drupalCreateUser([], NULL, TRUE);
$this->drupalLogin($admin);
$this->drupalGet('/admin/config/regional/content-language');
$this->failOnJavaScriptErrors();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment