Project

General

Profile

Actions

Bug #88054

closed

A content element visible in a workspace, is not visibile when it's hidden in LIVE

Added by Gianluca Strafella about 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2019-04-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
workspace sorting
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,
in these conditions:

1) Two (or more) content elements in a standard page, in LIVE:
Content-1: sorting=1, hidden=0
Content-2: sorting=2, hidden=1 (this content is not visibile in LIVE)

2) A user, in a workspace, actives "Content-2":
Content-1: sorting=1, hidden=0
Content-2: sorting=2, hidden=0 (content now showed in current workspace)

3) The same user, moves Content-2 above Content-1:
Content-1: sorting=2, hidden=0
Content-2: sorting=1, hidden=0 (content now showed in current workspace)

At this point, "Content-2" is not more visibile on frontend, also if is still visible (hidden=0).

I found a problem in class \TYPO3\CMS\Frontend\Page\PageRepository::movePlhOL

around first query:

//...
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);

//this row exclude the live record because it is hidden in LIVE
$queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));

$origRow = $queryBuilder->select(...array_keys($this->purgeComputedProperties($row)))
//...

The FrontendRestrictionContainer include HiddenRestriction, but in this case, the content element is still hidden in LIVE.

As workaround, I patched the core, rewriting the class and overwriting the method, with this replacements:

//original statement
//$queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));

//replaced with
$queryBuilder->removeAll()
             ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
             ->add(GeneralUtility::makeInstance(FrontendWorkspaceRestriction::class))
             ->add(GeneralUtility::makeInstance(StartTimeRestriction::class))
             ->add(GeneralUtility::makeInstance(EndTimeRestriction::class))
             ->add(GeneralUtility::makeInstance(FrontendGroupRestriction::class));

The problem has been replicated on these TYPO3 versions:
- TYPO3 8.7.24
- TYPO3 9.5

Thank you,
Gianluca


Files

Issue 88054 TYPO3.f4v (16.3 MB) Issue 88054 TYPO3.f4v Danilo Caccialanza, 2020-05-28 08:02
PageRepository.zip (1.71 KB) PageRepository.zip Danilo Caccialanza, 2020-05-28 11:08
PageRepository.php (4.62 KB) PageRepository.php Danilo Caccialanza, 2020-05-28 11:08

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #85003: Workspace : no content show in preview frontend, if live page is hiddenClosed2018-05-14

Actions
Related to TYPO3 Core - Bug #80995: Content of hidden page not shown in workspace previewClosed2017-04-25

Actions
Related to TYPO3 Core - Bug #67001: Workspace Pagepreview doesn't work, if the livepage is set to hidden=1Closed2015-05-17

Actions
Actions

Also available in: Atom PDF