Skip to content

fix: set GLOBALS[TYPO3_REQUEST] before DataHandler in saveStuff()#86

Merged
Kanti merged 1 commit into
FriendsOfTYPO3:mainfrom
format-gmbh:bugfix_503_Invalid_or_missing_request_token
May 18, 2026
Merged

fix: set GLOBALS[TYPO3_REQUEST] before DataHandler in saveStuff()#86
Kanti merged 1 commit into
FriendsOfTYPO3:mainfrom
format-gmbh:bugfix_503_Invalid_or_missing_request_token

Conversation

@format-gmbh
Copy link
Copy Markdown
Contributor

When the Visual Editor saves content via a POST request, PersistenceMiddleware
returns a response directly without passing control to the inner FE RequestHandler.
That handler is the only place that sets $GLOBALS['TYPO3_REQUEST'], which
DefaultSanitizerBuilder requires when sanitizing RTE field values via its closure.

Without this fix, saving any content element that contains RTE fields throws:
RuntimeException: DefaultSanitizerBuilder requires an active PSR-7 request
with normalizedParams attribute. (code #1775675289)

 When the Visual Editor saves content via a POST request, PersistenceMiddleware
  returns a response directly without passing control to the inner FE RequestHandler.
  That handler is the only place that sets $GLOBALS['TYPO3_REQUEST'], which
  DefaultSanitizerBuilder requires when sanitizing RTE field values via its closure.

  Without this fix, saving any content element that contains RTE fields throws:
    RuntimeException: DefaultSanitizerBuilder requires an active PSR-7 request
    with normalizedParams attribute. (code #1775675289)
@Kanti
Copy link
Copy Markdown
Contributor

Kanti commented May 18, 2026

thank you @format-gmbh

@Kanti Kanti merged commit 5bffddf into FriendsOfTYPO3:main May 18, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants