Skip to content

Commit

Permalink
Bugfix, when no categories are assigned to services
Browse files Browse the repository at this point in the history
  • Loading branch information
Achim Strohm committed Aug 28, 2024
1 parent a5a95c5 commit 0b259fd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
14 changes: 8 additions & 6 deletions Classes/Controller/ConsentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,14 @@ private function klaroConfigBuild(\TYPO3\CMS\Extbase\Persistence\Generic\QueryRe
}
}

// Sort the sys_categories alphabetically and add a last category 'unknown' for uncategorized services.
// Only relevant if option 'groupByPurpose' is set to true.
ksort($klaroConfig['purposeOrder']);
$result = array_values($klaroConfig['purposeOrder']);
$klaroConfig['purposeOrder'] = $result;
$klaroConfig['purposeOrder'][] = 'unknown';
if($klaroConfig['purposeOrder']) {
// Sort the sys_categories alphabetically and add a last category 'unknown' for uncategorized services.
// Only relevant if option 'groupByPurpose' is set to true.
ksort($klaroConfig['purposeOrder']);
$result = array_values($klaroConfig['purposeOrder']);
$klaroConfig['purposeOrder'] = $result;
$klaroConfig['purposeOrder'][] = 'unknown';
}

return $klaroConfig;
}
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [2.4.0] - 2024-08-28 - AS
### Fixed
- Bugfix, when no categories are assigned to services

## [2.3.9] - 2024-08-27 - RL
### Fixed
- Undo: GTM-Service Partial - Tag loading from v2.3.8
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'uploadfolder' => false,
'clearcacheonload' => false,
'clearCacheOnLoad' => 0,
'version' => '2.3.9',
'version' => '2.4.0',
'constraints' =>
array (
'depends' =>
Expand Down

0 comments on commit 0b259fd

Please sign in to comment.