Skip to content

Commit

Permalink
[BUGFIX] Avoid bogus title in new record controller
Browse files Browse the repository at this point in the history
NewRecordController (+ icon in doc header of list
module) renders "Create a new page" on top. This
is not a link and looks misplaced.

It is a 'section header' for optional content that can
be enabled via pageTS.

mod.wizards.newRecord.pages.show.pageSelectPosition = 1
mod.wizards.newRecord.pages.show.pageInside = 1
mod.wizards.newRecord.pages.show.pageAfter = 1

When at least one of these are enabled, the header
makes sense, but should be avoided otherwise.

Resolves: #96505
Releases: main, 11.5
Change-Id: I6468cda44e719f268f6b59d7e61f240737da6f33
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72962
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
  • Loading branch information
lolli42 authored and andreaskienast committed Jan 11, 2022
1 parent 0e0524b commit 9ce15af
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions typo3/sysext/backend/Classes/Controller/NewRecordController.php
Expand Up @@ -452,11 +452,13 @@ protected function renderNewRecordControls(): void
// Link to page-wizard
$newPageLinks[] = $this->renderPageSelectPositionLink();
}
$groupedLinksOnTop['pages'] = [
'title' => $lang->getLL('createNewPage'),
'icon' => 'actions-page-new',
'items' => $newPageLinks,
];
if (!empty($newPageLinks)) {
$groupedLinksOnTop['pages'] = [
'title' => $lang->getLL('createNewPage'),
'icon' => 'actions-page-new',
'items' => $newPageLinks,
];
}
break;
case 'tt_content':
if (!$this->newContentInto || !$this->isRecordCreationAllowedForTable($table) || !$this->isTableAllowedOnPage($table, $this->pageinfo)) {
Expand Down

0 comments on commit 9ce15af

Please sign in to comment.