Review main Merged

75260[BUGFIX] Ensure localized page preview url is build properly

Stefan Bürk CR +2 V +2 Easy +13 −4 updated 07/22/22, 20:12

Commit message

Localized page preview links in page layout module or view
module display page in default language.

With #97544 preview uri generation hooks has been replaced
with corresponding PSR-14 events. Language information has
been divided from the paramaters array to have it as direct
property in the new PSR-14 events.

`PageRouter->generateUri()` needs proper language information
as `$parameter` argument, which is not properly reassembled
before generating the preview uri in `PreviewUriBuilder()`,
using event information.

ext:workspace uses the before event to change the preview
uri only added the language id as query argument `_language`,
if additional query arguments are provided. This failing to
show localized workspaced page in workspace preview.

This change reassemble language information back into the
`$parameters` array to build localized preview uri again,
for live workspace preview and for workspace preview. This
is also done in corresponding ext:workspace eventlistener
to always provide non-default language query argument with
the newer `_language` parameter, even if there are no other
additional query arguments.

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 2

Files 2