Bug #82462
closedWorkspace : 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.
0%
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 |
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...
Updated by Florian Rival about 7 years ago
- File bug_82462.diff bug_82462.diff added
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.
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?
Updated by Patrick Gaumond over 6 years ago
Just tried the patch and it worked for us. TYPO3 8.7.10.
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
Updated by Riccardo De Contardi over 6 years ago
Sorry wrong patch target commit. My apologies
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
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
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
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
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
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.
Updated by Riccardo De Contardi over 5 years ago
- Related to Bug #83065: Content is disappearing in Page module in workspaces added
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
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.
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
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.
Updated by Hannes Bochmann over 5 years ago
Updated by Benni Mack about 5 years ago
- Related to Bug #89455: Translations/Localized records are not visible in Workspace Preview added
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)
Updated by Riccardo De Contardi over 4 years ago
- Related to Bug #80995: Content of hidden page not shown in workspace preview added
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
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
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
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?
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
Updated by Riccardo De Contardi over 4 years ago
Test on comment 18 still happens on latest master
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
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.