diff --git a/libraries/legacy/form/field/componentlayout.php b/libraries/legacy/form/field/componentlayout.php index 70ac4a0b63c89..cddf57f7113ae 100644 --- a/libraries/legacy/form/field/componentlayout.php +++ b/libraries/legacy/form/field/componentlayout.php @@ -179,20 +179,10 @@ protected function getInput() // Add the layout options from the template path. if (is_dir($template_path) && ($files = JFolder::files($template_path, '^[^_]*\.php$', false, true))) { - // Files with corresponding XML files are alternate menu items, not alternate layout files - // so we need to exclude these files from the list. - $xml_files = JFolder::files($template_path, '^[^_]*\.xml$', false, true); - - for ($j = 0, $count = count($xml_files); $j < $count; $j++) - { - $xml_files[$j] = basename($xml_files[$j], '.xml'); - } - foreach ($files as $i => $file) { - // Remove layout files that exist in the component folder or that have XML files - if (in_array(basename($file, '.php'), $component_layouts) - || in_array(basename($file, '.php'), $xml_files)) + // Remove layout files that exist in the component folder + if (in_array(basename($file, '.php'), $component_layouts)) { unset($files[$i]); }