Bug #93718
closed
Page doktype check missing in recordlist on view tt_content
Added by Sebastian Fischer over 3 years ago.
Updated about 3 years ago.
Category:
Backend User Interface
Description
In \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::makeControl when rendering the "Show" link a check on the doktype of parent page is missing when table is 'tt_content'. This leads to an error, when the content element is created on in a storage folder.
Something like ($table === 'tt_content' && $this->pageIsNotInNoViewWithDokTypes($row, $tsConfig)) could fix the condition.
@
protected function pageIsNotInNoViewWithDokTypes(array $row, $tsConfig): bool
{
static $pages = [];
if (isset($pages[$row['pid']])) {
$page = $pages[$row['pid']];
} else {
$page = BackendUtility::getRecord('pages', $row['pid']);
$pages[$row['pid']] = $page;
}
return !in_array($page['doktype'] ?? null, $this->getNoViewWithDokTypes($tsConfig));
}
@
A quick test. It works in the record list. Sebastian: Would you like to contribute the patch as a kick-off? We probably need the logic a little more abstractly, since we also need the check for the ContextMenu in typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php:canBeViewed().
I'm working on a more general solution, but cant push it because of error:
⇡1 ❯ LC_ALL=en_GB git push origin HEAD:refs/for/master 17:40:52
ERROR: Permission to TYPO3/TYPO3.CMS.git denied to garbast.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So I'm a little lost with it.
- Status changed from New to Under Review
- Target version changed from 11.2 to 11.3
- Target version changed from 11.3 to 11.4
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF