Bug #93718

Page doktype check missing in recordlist on view tt_content

Added by Sebastian Fischer 9 months ago. Updated 3 months 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));
}
@

#1

Updated by Guido Schmechel 9 months 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().

#2

Updated by Sebastian Fischer 9 months 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.

#3

Updated by Gerrit Code Review 9 months 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

#4

Updated by Gerrit Code Review 8 months 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

#5

Updated by Benni Mack 7 months ago

  • Target version changed from 11.2 to 11.3
#6

Updated by Benni Mack 5 months ago

  • Target version changed from 11.3 to 11.4
#7

Updated by Gerrit Code Review 5 months 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

#8

Updated by Gerrit Code Review 5 months 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

#9

Updated by Gerrit Code Review 5 months 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

#10

Updated by Oliver Bartsch 5 months ago

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

Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF