Review main Abandoned

91420[BUGFIX] Start anonymous session for CLI user

Albrecht Köhnlein CR -2 V 0 Easy +5 −2 updated 11/04/25, 11:08

Commit message

Avoid errors and exception with any features that try to use the session in CLI mode.

Review

  • Code review CR -2
    • Stefan Bürk -2
    • Garvin Hicking -1
  • Verified V 0
    • core-ci +1 CI

Issues 1

Files 1

Review log 45

  1. Albrecht Köhnlein uploaded patch set 1 11/04/25, 10:21

  2. core-ci voted on patch set 1 V +1 11/04/25, 10:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88450

  3. Garvin Hicking commented on patch set 1 CR -1 11/04/25, 10:42

    I think this would be a workaround instead of addressing the root cause, where an extension relies on a session in a datahandler hook. The extension should better make use of checking non-session scenarios; sessions should be instantiated by CLI commands/tasks/code that really needs it. The cause for this probably is that datahandler hook extensions make assumptions of only being used in web context instead of CLI; adding an anonymous session here could mask away follow-up problems that might rely on session contexts. So in my oppinion it is better that such code fails to hint at better gating for proper context.
  4. Stefan Bürk commented on patch set 1 CR -2 11/04/25, 10:47

    Reply Unresolved

    Beside this, the whole UserSession stuff does not check for cli as it as simply not ment to be used in cli and we should not start with this, as we need to go and fix a lot of stuff over time there just because we opened it here. The extension needs to fix this and respect that DataHandler is executed in cli and not in Backend WebRequest. FlashMessages in DataHandler hooks are thing not to do, special with raising usage of it also in FE contexts. Additionaly, it make no sense because flashmessages are not displayed in cli. And it does not make sense to pullate the session storage with flashmessages which does not get consumed. Report the issue to the extension.
  5. Albrecht Köhnlein abandoned the change 11/04/25, 11:08