Wrong URL for "view" when in workspace with TYPO3 in subdirectory
I have TYPO3 installed in a subdirectory (so in domain.com/directory). If I select a workspace and try to view a page using the "View" button from the record of "Show" from the page tree menu the URL is wrong. It adds the subdirectory to the URL twice (so domain.com/directory/directory).
I tested this with a current installation from master in the following way:
- Install TYPO3 in a subdirectory using The official Introduction Package preconfigured distribution
- Activate workspaces extension
- Go to the workspace
- Select "Show" in the page tree menu on a page
Updated by Rudy Gnodde over 3 years ago
This happens because in EXT:workspaces\Classes\Preview\PreviewUriBuilder.php in method buildUriForWorkspaceSplitPreview it returns $viewScript with the directory. In EXT:backend\Classes\Utility\BackendUtility.php at the end of method createPreviewUrl, it prepends $viewDomain, which uses TYPO3_SITE_URL which also includes the directory.