Project

General

Profile

Actions

Bug #103212

open

Workspace page preview not working

Added by Hannes Bochmann about 2 months ago. Updated about 2 months ago.

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

0%

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 about 2 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 about 2 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

Also available in: Atom PDF