diff --git a/Classes/DataHandler/AfterDatabaseOperations.php b/Classes/DataHandler/AfterDatabaseOperations.php index 582a7d0..7c40981 100644 --- a/Classes/DataHandler/AfterDatabaseOperations.php +++ b/Classes/DataHandler/AfterDatabaseOperations.php @@ -380,7 +380,7 @@ public function getAvailableColumns($layout = '', $table = '', $id = 0) } } // Implode into a CSV string as BackendLayoutView->getColPosListItemsParsed returns an array - $tcaColumns = '-2,-1,' . implode(',', $temp); + $tcaColumns = rtrim('-2,-1,' . implode(',', $temp), ','); } return $tcaColumns; } diff --git a/Classes/Plugin/Gridelements.php b/Classes/Plugin/Gridelements.php index 3f61efb..9e6449e 100644 --- a/Classes/Plugin/Gridelements.php +++ b/Classes/Plugin/Gridelements.php @@ -100,7 +100,7 @@ public function main($content = '', $conf = []) $layoutSetup->init($this->cObj->data['pid'], $conf); $availableColumns = $layoutSetup->getLayoutColumns($layout); - $csvColumns = str_replace('-2,-1,', '', $availableColumns['CSV']); + $csvColumns = ltrim(str_replace('-2,-1', '', $availableColumns['CSV']), ','); $this->getChildren($element, $pid, $csvColumns); // and we have to determine the frontend setup related to the backend layout record which is assigned to this container