Bug #93718
closedPage doktype check missing in recordlist on view tt_content
100%
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));
}
@
Updated by Guido Schmechel over 3 years ago
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().
Updated by Sebastian Fischer over 3 years ago
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.
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68531
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68531
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69959
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69959
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70015
Updated by Oliver Bartsch over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3b3321bad07a2817e8928bf0d451bff8f1288cf7.