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