Project

General

Profile

Actions

Bug #103212

closed

Workspace page preview not working

Added by Hannes Bochmann 5 months ago. Updated 8 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2024-02-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When I want to open a page preview (/typo3/workspace/preview-control/?token=xxx&id=123) in a none-live workspace in a TYPO3 12.4.11 installation I just get the BE loaded again and not the split FE view. Everything is fine in the live workspace.
After some debugging I found out that the route is not matched in TYPO3\CMS\Backend\Routing\Router::matchResult() because the route path for workspace_previewcontrols is configured as "/workspace/preview-control/" and the trailing slash seems troublesome. At least it's the only BE route path that has a trailing slash. When I remove the trailing slash everything works again as expected.
I got these problems at least since TYPO3 12.4.7. I can't tell if this problem does exist in previous TYPO3 versions. At least in TYPO3 10.4 everything works as expected.

On a side note I uninstalled all 3rd party extensions but that didn't change everything. So it seems to happen even with a vanilla installation.

Actions #1

Updated by Christian Kuhn 5 months ago

  • Status changed from New to Needs Feedback

Odd. Unable to reproduce.

Here is what I see when I debug $path within Router->matchResult() after first line $path = $request->getUri()->getPath(); in v12:

WS page preview:
/typo3/workspace/preview-control/
page module:
/typo3/module/web/layout

This looks good to me. Do you maybe by any chance have some internal or external redirect that rewrites the path? Maybe .htaccess / webserver config / ext:redirects extension?

Actions #2

Updated by Hannes Bochmann 5 months ago ยท Edited

That's not the problem. At that point I get the same path. I don't think it's a matter of a redirect. But the line "$result = (new UrlMatcher($this->routeCollection, $requestContext))->match($path);" (142) throws a \Symfony\Component\Routing\Exception\ResourceNotFoundException for the route /typo3/workspace/preview-control/. The route /typo3/workspace/preview-control won't throw an exception. At least this what happens in my case.

Thanks for having a look at it.

Actions #3

Updated by Gerrit Code Review 30 days ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84741

Actions #4

Updated by Gerrit Code Review 29 days ago

Patch set 1 for branch 12.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/+/84773

Actions #5

Updated by Benni Mack 29 days ago

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

Updated by Benni Mack 8 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF