Bug #97170
closedMake backend preview work in workspaces
100%
Description
It is possible to define a preview configuration for any type of record in the TYPO3 backend, using a Page TSconfig configuration like:
TCEMAIN.preview { tx_workspaceextensiontest_foo { previewPageId = xxx fieldToParameterMap { uid = tx_workspacepreviewtest_preview[uid] } additionalGetParameters { tx_workspacepreviewtest_preview.table = tx_workspaceextensiontest_foo } } }
where
xxx
is the uid of a page where - most likely - a plugin will reside.
In workspaces, it is possible to define a page id where preview can happen for any record, using a Page TSconfig configuration like:
options.workspaces.previewPageId = xxx
This setting adds a "Preview" icon in the Workspaces module.
Unfortunately that workspace preview feature does not take the generic backend preview feature into account, which makes it impossible to pass the appropriate parameters to the plugin controller when previewing in a workspace. My proposal is to make \TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder::createPreviewUriForElement()
able to handle the generic backend preview configuration.
NOTE: the generic backend preview works fine in workspaces (i.e. when you hit the "View" button when editing a record).
Files
Updated by Francois Suter over 2 years ago
I have created a test extension for this problem, as it is not easy to have the proper setup otherwise. To install it use:
composer require fsuter/workspace-preview-test:dev-main
It has a README file with instructions for completing the setup.
The observations are:- when editing a record in a workspace and using "View", we get to the split preview alright
- when trying to use the preview button in the Workspaces module, we get an error from the preview controller, which complains about missing parameters
With the (upcoming) patch, the error does not happen and we get access to the split preview.
Updated by Gerrit Code Review over 2 years ago
- Status changed from New 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/+/73900
Updated by Gerrit Code Review over 2 years ago
Patch set 2 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/+/73900
Updated by Gerrit Code Review over 2 years ago
Patch set 3 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/+/73900
Updated by Gerrit Code Review almost 2 years ago
Patch set 4 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/+/73900
Updated by Gerrit Code Review almost 2 years ago
Patch set 5 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/+/73900
Updated by Gerrit Code Review almost 2 years ago
Patch set 6 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/+/73900
Updated by Francois Suter almost 2 years ago
Test extension for testing the feature.
Updated by Gerrit Code Review almost 2 years ago
Patch set 7 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/+/73900
Updated by Gerrit Code Review almost 2 years ago
Patch set 8 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/+/73900
Updated by Gerrit Code Review over 1 year ago
Patch set 9 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/+/73900
Updated by Anonymous over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 990d4ee4ad962ad4b934b50c9aef1c3f85fad38a.