Review main Merged

89429[BUGFIX] Allow language switch in "Open in new window" popup

Adam Koppe CR +2 V +2 Normal +104 −15 updated 06/23/25, 08:42

Commit message

Prevent JavaScript errors when switch languages
in FormEngine popup mode ("Open in new window").

The `<typo3-backend-module-router>` element is not available
in this mode, which is why the desired URL is assigned
to the frame directly.

Also sudo mode is adapted to avoid the workaround that has
been added in #106771, since @typo3/backend/viewport/content-container
is now handling this case.

This patch ensures the wanted location switch can be performed in
this case. An e2e test (playwright) is added to verify this.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 4

Files 5

Review log 2231

Show 36 earlier messages
  1. Adam Koppe uploaded patch set 1 05/16/25, 11:28

  2. Adam Koppe updated the commit message in patch set 2 05/16/25, 11:30

  3. core-ci voted on patch set 1 V -1 05/16/25, 11:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79048

  4. Adam Koppe updated the commit message in patch set 3 05/16/25, 11:43

  5. core-ci voted on patch set 2 V -1 05/16/25, 11:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79052

  6. core-ci voted on patch set 3 V -1 05/16/25, 11:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79054

  1. Adam Koppe uploaded patch set 4 V -1 05/16/25, 12:12

  2. core-ci voted on patch set 4 V +1 05/16/25, 12:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79058

  3. Garvin Hicking updated the commit message in patch set 5 V +1 05/19/25, 08:21

  4. core-ci voted on patch set 5 V +1 05/19/25, 08:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79136

  5. Garvin Hicking commented on patch set 5 V +1 05/19/25, 08:33

    This fixes the bug for me, but I must admit I do not know if this has side-effects to the used method, and if it could cause security issues or so, if the URL is changed despite errors.
  6. Adam Koppe updated the commit message in patch set 6 V +1 05/19/25, 09:38

    Fix playwright typo in commit description
  7. Adam Koppe uploaded patch set 7 05/19/25, 09:42

  8. Adam Koppe commented on patch set 6 05/19/25, 09:46

    @gh@faktor-e.de, I tried to fix the ~~playwith~~ playwright typo in the commit message body without removing your attribution but my push was rejected with _email address is not registered in your account, and you lack 'forge committer' permission._ Can you amend and push to get it back or can I add some commit message trailer?
  9. core-ci voted on patch set 6 V +1 05/19/25, 09:47 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 7 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79148

  10. core-ci voted on patch set 7 V +1 05/19/25, 09:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79149

  11. Garvin Hicking commented on patch set 7 V +1 05/19/25, 12:01

    Reply

    No worries - the attribution in the final commit will be set to you, as the owner of the patch. My name will automatically be added as a reviewer only. When you push an updated patch set, it's totally fine that your name is included then. I've also pinged @akienast@scripting-base.de about this patch because he should be able to judge the JS code impact better, but he's currently busy and will get to it at a later date. Thanks for the contribution already (and your other ones!) :-)
  12. Adam Koppe commented on patch set 7 05/20/25, 15:07

    Reply

    I wasn't thinking about primary author. I thought "Reviewed-by" is a bit "little" given that you authored most of the commit message body in addition to reviewing this change set. If you're fine with "Reviewed-by" alone that's cool too.
  13. Garvin Hicking commented on patch set 7 05/20/25, 21:21

    Reply

    Thats nice of you - I don't care too much about this, it's the result that counts, and that your contribution is highlighted :-)
  14. Simon Schaufelberger voted on patch set 7 CR +1 06/16/25, 11:50

  15. Simon Schaufelberger voted on patch set 7 V +1 06/16/25, 11:51

  16. Benjamin Franzke commented on patch set 7 CR -1 06/18/25, 09:30

    Working on it… We had a similar case in the past [1], we need to decide whether to handle this in `Viewport.ContentContainer` or if the caller of this API needs to handle this case. > [1] 89533: [BUGFIX] Properly render step-up authentication dialog in popups | https://review.typo3.org/c/Packages/TYPO3.CMS/+/89533
    We try do avoid bug-describing commit messages (that sound like a bug report), but use imperative to describe the change that fixes the bug. See: https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/Appendix/CommitMessage.html#:~:text=It%20is%20very%20important%20that%20the%20message%20is%20written%20in%20imperative%20mood That means we'd prefer sth like this: > [BUGFIX] Allow language switch in "Open in new window" popup

    content-container.ts:36

    Two remarks: 1) If we're sure this is a proper usecase (which I agree with), we must not reject the promise in the next line, otherwise the caller of this method "thinks" it was not successful, but it was (I wonder if we can have a better detection of "are-we-rendered-in-a-popup") 2) We should not skip the InteractionRequest below, I guess (only from reading the code, did not test yet), this means that switching the language will not be intercepted, when there are unsaved changes – the intentioon of the `InteractionRequest` is to be able to intercept the navigation change in that case.
  17. Benjamin Franzke uploaded patch set 8 CR +1 V +1 06/18/25, 10:11

  18. Benjamin Franzke commented on patch set 8 06/18/25, 10:11

    Reply

    Done

    Reply

    Done

    content-container.ts:36 Reply

    Done
  19. core-ci voted on patch set 8 V -1 06/18/25, 10:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80460

  20. Benjamin Franzke uploaded patch set 9 CR +1 V +1 06/18/25, 12:03

  21. core-ci voted on patch set 9 V +1 06/18/25, 12:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80461

  22. Simon Schaufelberger voted on patch set 9 CR +1 V +1 06/18/25, 12:13

  23. Garvin Hicking voted on patch set 9 CR +1 V +1 06/20/25, 12:56

  24. Benjamin Franzke voted on patch set 9 CR +2 V +2 06/23/25, 08:42

  25. Benjamin Franzke merged patch set 10 06/23/25, 08:42