Review 11.5 Merged

77159[BUGFIX] Fix absolute backend URL generation in frontend context

Benjamin Franzke CR +2 V +2 Normal +47 −6 updated 12/15/22, 10:03

Commit message

$normalizedParams->getRequestDir() returns '/' for frontend
requests and `/typo3/` for backend requests. This results in
problems when the backend UriBuilder relies on getRequestDir()
to provide the `/typo3/` suffix for backend URL generation.

UriBuilder is now changed to base absolute URLs on
getSiteUrl(), which is defined to return equal values
for backend and frontend requests, the typo3 suffix
is added manually.

Note that v12 introduced similar behavior with #99234,
where UriBuilder was adapted to use BackendEntryPointResolver,
which rebases the backend URL calculation on the site path as well.

Also note that the ABSOLUTE_URL mode in backend UriBuilder isn't
actually used by the TYPO3 frontend, but some extensions started
to execute system reports in frontend context, which
exposed this bug with the introduction of #99347.

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 3

Files 6