Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2021-03-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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));
}
@

Actions #1

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().

Actions #2

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.

Actions #3

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

Actions #4

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

Actions #5

Updated by Benni Mack over 3 years ago

  • Target version changed from 11.2 to 11.3
Actions #6

Updated by Benni Mack over 3 years ago

  • Target version changed from 11.3 to 11.4
Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

Updated by Oliver Bartsch over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF