Review main Merged

69415[BUGFIX] Keep preview info on forwarding in EditDocumentController

Oli Bartsch CR +2 V +2 Easy +25 −17 updated 06/10/21, 07:30

Commit message

The "View" respectively "Save & View" functionality of
EditDocumentController is as following:

1. Clicking the corresponding button saves the form and
a JavaScript event handler opens a new blank window

2. After the data was persisted, the form reloads and
the preview code (using the ImmediateAction component)
is written to the module body. This update the previously
opened window with the correct preview URL.

However, since #94114, a redirect is performed as soon
as the data has been persisted. This is done to ensure
persisting is only done for POST requests. Since the
information whether the form was stored using the "View"
respectively "Save & View" is not forwarded in the redirect,
the new window remains blank.

This is now fixed by adding the corresponding information
to the redirect URL. Also a now unnecessary code block in
processRequest() is removed.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1