Commit 12b8c3a9 authored by Georg Ringer's avatar Georg Ringer
Browse files

[BUGFIX] Show 1st constants section if no category selected

If the admin visits the constants editor the 1st time or the user
settings are resetted, the constants editor must show the constants of
the 1st category.

Resolves: #97603
Releases: main
Change-Id: Ib05ed79a4e79859f5bc5229fd4a50a24f4ce1805

Reviewed-by: Oliver Klee's avatarOliver Klee <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <>
Tested-by: core-ci's avatarcore-ci <>
Tested-by: Stefan Bürk's avatarStefan Bürk <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: Georg Ringer's avatarGeorg Ringer <>
parent 9f0faa43
......@@ -115,6 +115,9 @@ class ConstantEditorController extends AbstractTemplateModuleController
$availableCategories = $this->getCategoryLabels($this->categories);
$currentCategory = (string)$moduleData->get('constant_editor_cat');
if (!empty($availableCategories)) {
if ($currentCategory === '') {
$currentCategory = array_key_first($availableCategories);
$view->assign('constantsMenu', BackendUtility::getDropdownMenu($pageId, 'constant_editor_cat', $currentCategory, $availableCategories, '', '', ['id' => 'constant_editor_cat']));
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