Bug #24376
closedSave and view triggers preview of wrong page
100%
Description
Consider the following simple scenario:
- go to some workspace
- make sure "Enable frontend preview" is not checked (i.e. you see the split view when previewing)
- modify a page
- click the Save & View button a first time => the preview works fine. Note the id used in the preview URL. It is the id of the original page, not the version record.
- click the Save & View button again => the LIVE version is broken. The id used in the preview URL is the id of the version this time, not of the page.
This last behavior is wrong. The preview should be called with the id of the original page. TYPO3 takes care of version overlays all by itself. The problem comes from the fact that when we are editing a version of a page and we click on Save & View TCEforms passes the id of the version of the page being edited to the preview link and not the id of the original page.
This does not happen on the first click, because the version doesn't exist yet at that point.
The proposed patch fixes t3lib_BEfunc::viewOnClick() to look for an original page id and use it if it exists.
As far as I can tell, this bug has existed ever since we have workspaces.
It has been solved separately in 4.5, in the course of the work on the new Workspaces module.
(issue imported from #M16794)
Files