Project

General

Profile

Actions

Bug #82462

closed

Workspace : no content show in preview, for a new page create in workspace, if this page is enable

Added by shinsei san about 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Workspaces
Target version:
-
Start date:
2017-09-12
Due date:
% Done:

0%

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

Description

Install a typo3 v8.7.6

1) configure an template like this

page = PAGE
page.10 < styles.content.get

2) Create a workspace and use it
3) create a new page "Test"
4) on this page create a content on column 0
5) enable the page
6) Preview page

In this case the content of column 0 will NOT be show.

7) Disable the test page
8) Preview page

In this case the content of column 0 will BE be show.

This only append with a page create in workspace. if the page exists in live, you can edit it in workspace the content appears whether the page is active or not


Files

bug_82462.diff (1022 Bytes) bug_82462.diff Florian Rival, 2017-11-13 14:15

Related issues 6 (1 open5 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 #83065: Content is disappearing in Page module in workspacesClosed2017-11-22

Actions
Related to TYPO3 Core - Bug #85742: New page in workspace doesn't load content elements in previewClosed2018-08-03

Actions
Related to TYPO3 Core - Bug #89455: Translations/Localized records are not visible in Workspace PreviewClosed2019-10-18

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

Actions
Related to TYPO3 Core - Bug #91899: Workspace: No content elements in preview if live page has endtime in the pastNeeds Feedback2020-07-30

Actions
Actions #1

Updated by Francois Suter about 7 years ago

As amazing at is may sound, I confirm that it is so. I was facing a blank page in a workspace preview and started looking for related bugs. Disabling my page made the content appear...

Actions #2

Updated by Remo H. about 7 years ago

Can confirm this problem and behavior.

Actions #3

Updated by Florian Rival about 7 years ago

When working with workspaces, two pages are created with ID : X and X+1 but when the workspace page is updated (id x+1), the column hidden of the reference page (id x) is not updated. When we want to view this page, the process is looking for page content with page flag "hidden=0" but this page still has hidden flag set to 1 because it wasn't updated.
Here is a patch to update the hidden flag for reference page when workspace page is updated.

Actions #4

Updated by Gabe Blair about 7 years ago

I can confirm this behavior in TYPO3 8.7.8. I tried Florian's patch, and it does appear to fix the issue (after starting over with the content edits). Should this be considered a regression?

Actions #5

Updated by Patrick Gaumond over 6 years ago

Just tried the patch and it worked for us. TYPO3 8.7.10.

Actions #6

Updated by Gerrit Code Review over 6 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/55967

Actions #7

Updated by Riccardo De Contardi over 6 years ago

Sorry wrong patch target commit. My apologies

Actions #8

Updated by Oliver Hader over 6 years ago

  • Related to Bug #85003: Workspace : no content show in preview frontend, if live page is hidden added
Actions #9

Updated by Gerrit Code Review about 6 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/55967

Actions #10

Updated by Gianluca Strafella about 6 years ago

The patch doesn't work for us. We've tried on TYPO3 8.7.20 (cleaned).

These the start conditions:
- In LIVE, page already published, but not visible (hidden=1)
- In WORKSPACE, the same page was modified adding a new content element

If the page in workspace is hidden as in LIVE, the new content is visible via preview and preview link.
If the page in workspace is visible (hidden=0), all contents in the page aren't visible.

We have found a possible problem in the TYPO3 core:

class: TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
method: determineIdIsHiddenPage

protected function determineIdIsHiddenPage()
{
   //...
   if ($workspace !== 0 && $workspace !== false) {
        // Fetch overlay of page if in workspace and check if it is hidden
        $pageSelectObject = GeneralUtility::makeInstance(PageRepository::class);
        $pageSelectObject->versioningPreview = true;
        $pageSelectObject->init(false);
        $targetPage = $pageSelectObject->getWorkspaceVersionOfRecord($this->whichWorkspace(), 'pages',
          $page['uid']);

        //>>>>>>> here a problem: in this case getWorkspaceVersionOfRecord return an array with ws page
        $result = $targetPage === -1 || $targetPage === -2 || (is_array($targetPage) && $targetPage['hidden'] == 0 && $page['hidden'] == 1);
        //<<<<<<
   } else {
       $result = is_array($page) && ($page['hidden'] || $page['starttime'] > $GLOBALS['SIM_EXEC_TIME'] || $page['endtime'] != 0 && $page['endtime'] <= $GLOBALS['SIM_EXEC_TIME']);
   }
}

As a work around, we fixed with this row:

$result = $targetPage === -1 || $targetPage === -2 || (is_array($targetPage) && $targetPage['hidden'] == 0 && $page['hidden'] == 1);

Gianluca

Actions #11

Updated by Gerrit Code Review almost 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55967

Actions #12

Updated by Gerrit Code Review almost 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55967

Actions #13

Updated by Philip Burggraf almost 6 years ago

The issue still exists in v9.5.4 and is reproducible with the exact same steps as in the initial bug report.
However, we've also encountered this issue when creating a new page in the workspace.

Steps to reproduce:
1. Create a workspace and use it
2. Create a new page
3. Add some content elements to the page
4. Enable the newly created page (Right click in the page tree on the page -> "Enable")
5. Preview the page (Right click in the page tree on the page -> "Show")

Result: The created content elements are not visible.

To get the expected result (be able to view the content elements) you must disable the page.
1. Disable the created page again (Right click in the page tree on the page -> "disable")
2. Reload the preview page

Result: The content elements are visible.

You'll be able to view the content elements, regardless if the page is enabled or not, if you apply the workaround from Gianluca Strafella.
Note: You must flush all caches after editing the TypoScriptFrontendController.

Actions #14

Updated by Riccardo De Contardi over 5 years ago

  • Related to Bug #83065: Content is disappearing in Page module in workspaces added
Actions #15

Updated by Riccardo De Contardi over 5 years ago

  • Related to Bug #85742: New page in workspace doesn't load content elements in preview added
Actions #16

Updated by Riccardo De Contardi over 5 years ago

I report here my comment 6 on #83065 as a quick way to reproduce the issue on the latest master:

The issue is still present on 10.0.0-dev (latest master); it is easy to reproduce:

1) Have a plain TYPO3 installation
2) Create a draft Workspace
3) Create a page in the Workspace
4) Add a content element to the page
5) Save and preview the page

Expected result:

the content element should be visible in the preview

Current result

the content element is not visible.

if the page created in workspace is marked as hidden (disabled), then the content element becomes visible (tested with 10.0.0-dev).

Please note that #83065 had this review attached https://review.typo3.org/54724 that was abandoned.

Actions #17

Updated by Riccardo De Contardi over 5 years ago

Please note that #85742 had this review attached https://review.typo3.org/57822 that was reverted with https://review.typo3.org/58838

Actions #18

Updated by Anatoli Zich over 5 years ago

Im not sure if i should open up a new bug but i think this is related:
This also applies to live pages with unmet start and expiration date conditions.

Steps to reproduce (TYPO3 8-10):
1) Have a plain TYPO3 installation
2) Create a draft Workspace
3) Create a page in live mode
4) Add a content element to that page
5) Set the expiration date of the page to something in the past and save
6) Switch to draft Workspace
7) Remove the expiration date from the page
8) Save and preview the page

Expected result:
You should be able to see page and its content elements.

Current result:
You'll be able to view the page but no content elements appear.

Actions #19

Updated by Hannes Bochmann over 5 years ago

The patch in this issue fixes the problem for this issue but not for the related #85003. The proposed patch of Gianluca fixes both issues. But as I stated in #85003 it seems to me that none of the patches tackle the right spot.

Actions #20

Updated by Benni Mack about 5 years ago

  • Related to Bug #89455: Translations/Localized records are not visible in Workspace Preview added
Actions #21

Updated by Oliver Hader about 5 years ago

  • Status changed from Under Review to On Hold

Handled in #89455 - once done, related issues should be re-evaluated again (then either to be closed or adjusted)

Actions #22

Updated by Oliver Hader about 5 years ago

  • Assignee set to Oliver Hader
Actions #23

Updated by Riccardo De Contardi over 4 years ago

  • Related to Bug #80995: Content of hidden page not shown in workspace preview added
Actions #24

Updated by Gerrit Code Review over 4 years ago

  • Status changed from On Hold 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/+/64215

Actions #25

Updated by Gerrit Code Review over 4 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/+/64215

Actions #26

Updated by Gerrit Code Review over 4 years ago

Patch set 3 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/+/64215

Actions #27

Updated by Riccardo De Contardi over 4 years ago

If I repeat my test on comment 16, it looks like the issue is already resolved even without the patch (tested on latest master) ; am I wrong?

Actions #28

Updated by Gerrit Code Review over 4 years ago

Patch set 4 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/+/64215

Actions #29

Updated by Riccardo De Contardi over 4 years ago

Test on comment 18 still happens on latest master

Actions #30

Updated by Christian Kuhn over 4 years ago

  • Related to Bug #91899: Workspace: No content elements in preview if live page has endtime in the past added
Actions #31

Updated by Christian Kuhn over 4 years ago

  • Status changed from Under Review to Closed

I confirm the initial issue has been solved.

The case from comment #18 is slightly different, though.
To keep the 'workspace preview' issues straight, I created issue #91899 for case "if live page has stop time in the past, workspace page shows no content elements in preview".

Closing this issue.

Actions

Also available in: Atom PDF