Bug #93079

Site appearing twice in HMENU Navigation in Workspace Preview

Added by Anatoli Zich 9 months ago. Updated 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2020-12-15
Due date:
% Done:

0%

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

Description

Since switching to TYPO v10 we got a strange behaviour with our navigation in workspace preview mode. For better understanding i attached a simple version of the HMENU we use which produces the error.

These steps produce the error (assuming you use the attached menu):
1. Have a workspace and switch to it in the backend
2. Switch to the frontend preview of a page which appears in your navigation
3. Notice that the navigation looks like expected
4. Open the page properties of that page in the backend
5. Save without editing anything
6. Switch to the frontend preview of that page again
7. Notice that the page now appears twice in the navigation

Selecting any of the doubled navigation items in the frontend workspace preview renders the page without any content elements even if they exist. Reopening the preview of the page displays it as expected but the navigation is still in the wrong state.

Reverting the page version that step 5 produced fixes the problem and it's not relevant if you actually change something in the page properties. Releasing the page changes in the workspace module works as expected and does not break anything in live mode so i think this to is a preview only bug.

I tested if the introduction package behaves the same but the included navigation does not rely on HMENU and works without problems. Inserting my menu however produces the explained behaviour which i tested to rule out any faulty settings in my environment. Also this can't be reproduced with TYPO3 v8.

I'm on TYPO3 10.4.10


Files

menu.typoscript (540 Bytes) menu.typoscript Anatoli Zich, 2020-12-15 11:46
#1

Updated by Zenoussi no-lastname-given 8 months ago

We also created the problem of duplicate pages in the menu under v10.4.12 with DataProcessor in workspace preview.

Difference to Anatoli:
  • the content elements of the page are shown in the workspace preview
Difference to Anatoli Introduction-Package-Test:
  • the problem also existed in my test of the Introduction Package under v10.4.6, an update to v10.4.12 fixes the problem there.

Deactivation, deinstallation of workspaces, compare and reinstallation does not change anything, afterwards even the "old" edited data records were displayed again – didn't expect that.

#2

Updated by Andreas Kiessling 2 months ago

I can confirm this bug.

As for the double menu entries: i tracked this down to https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L5820

The hint is a good one, adding the frontend restriction seems to work

$queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));

Also available in: Atom PDF