Issue Bug Closed

#10693Save and view command previews wrong page record

Francois Suter 11/09/10, 15:59 updated 10/02/18, 12:38

Description

When editing a version of a page record in a workspace and pressing the “Save and view” button, the wrong page id is called.

Assuming an existing page with id = 55. It is edited and gets a version overlay record with id = 67.

When previewing through Web > List of Web > List (i.e. when relying on links generated by t3lib_BEfunc::viewOnClick()), the URL generated is:

http:www.example.com/index.php?id=55

But when clicking on the “Save and view” icon after editing the page, the URL generated is:

http:www.example.com/index.php?id=67

This causes various problems when the split-screen preview (a.k.a. “Frontend preview” is enable):

  • if the page was just modified or a new page was created, the LIVE frame will show a broken rootline error, the Workspace frame is correct
  • if the page was moved, you get a “page not found” error in both frames

The obvious solution is to change the “Save and view” behavior so that it uses the “t3ver_oid” in case it exists rather than the “uid” to generate the preview URL.

I’m going to work on a patch for this (writing this bug report helped me think about various scenarios, now I need to write the proper patch). I’m submitting this here rather than to the Core list because I wanted to have some feedback from the workspace team before submitting a patch to the core list.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.