Skip to content
Snippets Groups Projects
Verified Commit b15792cf authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3256922 by danflanagan8, GaëlG: Warning on AJAX call when changing the...

Issue #3256922 by danflanagan8, GaëlG: Warning on AJAX call when changing the breakpoint_group field value of a responsive image style

(cherry picked from commit 9dc6f60e)
parent 74d974a0
No related branches found
No related tags found
12 merge requests!8394[warning] array_flip(): Can only flip STRING and INTEGER values, when saving a non-revisionable custom content entity,!7780issue 3443822: fix for 'No route found for the specified format html. Supported formats: json, xml.',!5013Issue #3071143: Table Render Array Example Is Incorrect,!4848Issue #1566662: Update module should send notifications on Thursdays,!4792Issue #2230689: Remove redundant "Italic" style,!4220Issue #3368223: Link field > Access to internal links is not checked on display.,!3884Issue #3356842,!3812Draft: Issue #3339373 by alexpott, andypost, mondrake:...,!3686Issue #3219967 against 9.5.x,!2205Quote all names in the regions section.,!1459Issue #3087632: menu_name max length is too long,!866Issue #2845319: The highlighting of the 'Home' menu-link does not respect query strings and fragment identifiers
......@@ -225,6 +225,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
if ($form_state->getValue('breakpoint_group') != $form_state->getCompleteForm()['breakpoint_group']['#default_value']) {
// Remove the image style mappings since the breakpoint ID has changed.
$form_state->unsetValue('keyed_styles');
return;
}
// Check that at least 1 image style has been selected when using sizes.
......
......@@ -55,7 +55,7 @@ public function testResponsiveImageAdmin() {
$edit = [
'label' => 'Style One',
'id' => 'style_one',
'breakpoint_group' => 'responsive_image_test_module',
'breakpoint_group' => 'responsive_image',
'fallback_image_style' => 'thumbnail',
];
$this->drupalGet('admin/config/media/responsive-image-style/add');
......@@ -67,6 +67,15 @@ public function testResponsiveImageAdmin() {
$this->assertSession()->pageTextNotContains('There are no responsive image styles yet.');
$this->assertSession()->pageTextContains('Style One');
// Edit the breakpoint_group.
$this->drupalGet('admin/config/media/responsive-image-style/style_one');
$this->assertSession()->fieldValueEquals('label', 'Style One');
$this->assertSession()->fieldValueEquals('breakpoint_group', 'responsive_image');
$edit = [
'breakpoint_group' => 'responsive_image_test_module',
];
$this->submitForm($edit, 'Save');
// Edit the group.
$this->drupalGet('admin/config/media/responsive-image-style/style_one');
$this->assertSession()->fieldValueEquals('label', 'Style One');
......
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