Commit f8088b41 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Prevent JavaScript error on changing single option group fields

A check in the FormEngine JavaScript component
is fixed, preventing a corresponding error when
changing the value of a single option group field,
e.g. the "content_from_pid" field in pages.

Additionally, a wrong selector, leading to a
ReferenceError, is fixed as well.

Resolves: #97342
Related: #95137
Releases: main, 11.5
Change-Id: I8c27f9ee4eddb032ec51ef66db99da3bf3c5a8d3

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
parent bc4093af
......@@ -165,8 +165,8 @@ define(['jquery',
// If multiple values are not allowed, clear anything that is in the control already
if (!isMultiple) {
$fieldEl.find('option').each(function() {
const $option = $availableFieldEl.find('option[value="' + $.escapeSelector($(el).attr('value')) + '"]');
if ($option) {
const $option = $availableFieldEl.find('option[value="' + $.escapeSelector($(this).attr('value')) + '"]');
if ($option.length) {
$option.removeClass('hidden').prop('disabled', false);
Supports Markdown
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