89758[BUGFIX] Set live context when generating $liveUrl in PreviewController
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benni Mack +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1114
-
Sebastian Michaelsen uploaded patch set 1 06/18/25, 13:42
-
core-ci voted on patch set 1 V +1 06/18/25, 13:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80469
-
Markus Klein voted on patch set 1 CR +1 06/18/25, 13:57
-
Benjamin Franzke commented on patch set 1 06/19/25, 11:28
-
Amir Arends commented on patch set 1 06/25/25, 13:39
PreviewController.php:139ReplyI was able to reproduce the issue, and the logic behind it is fairly straightforward. The `PreviewController` generates the URI using the PageRouter. The `PageRouter`, in turn, loads the page via the PageRepository. Inside `PageRepository`, the following overlay logic is used: ``` if ($row) { $this->versionOL('pages', $row); ... } ``` The method `versionOL()` returns early if the workspace ID from the current context is <= 0: ``` if ((int)$this->context->getPropertyFromAspect('workspace', 'id') <= 0) { return; } ``` `ADMCMD_prev=LIVE` is not supported by `PageRouter` and `PageRepository` and a result, we receive a context-sensitive generation by `PageRouter`. -
Benni Mack commented on patch set 1 08/13/25, 17:22
PreviewController.php:139ReplyThanks for digging Amir. This in turn means we should a) hand in a Page object into the PageRouter and/or b) hand in the custom Context with the overriden workspace Aspect into generateUrl() which in turn hands it into the PageRouter which in turn is going to be used in PageRepository. so: similar place, cleaner code instead of overriding the global $this->context Context object. -
Benni Mack uploaded patch set 2
CR +1V +108/14/25, 09:35 -
Benni Mack commented on patch set 2 CR +1 V +1 08/14/25, 09:38
PreviewController.php:139Replyadapted the code to show what we can do with custom contexts! -
core-ci voted on patch set 2 V +1 08/14/25, 09:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83367
-
Benni Mack commented on patch set 3
CR +1V +108/14/25, 09:43Published edit on patch set 2. -
Oli Bartsch voted on patch set 3 CR +1 V +1 08/14/25, 09:45
-
core-ci voted on patch set 3 V +1 08/14/25, 09:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83368
-
Benni Mack voted on patch set 3 CR +2 V +2 08/14/25, 10:09
-
Benni Mack merged patch set 4 08/14/25, 10:09
PreviewController.php:139