[BUGFIX] Fix middleware order for forced indexing (crawler 11) #1019
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Backport of #1018 to v11.x)
History:
Because of a problem with lochmueller/staticfilecache, crawler issue #642 changed the middleware loading order to execute crawler after static file cache. (commit 0f7cb6a)
The source of the problem was that the crawler CrawlerInitialization middleware overwrote the HTTP response that was generated by TYPO3.
Since commit 8a9b896 (issue #837) the HTTP response is not destroyed/overwritten by crawler anymore but moved into a HTTP header "X-T3Crawler-Meta".
The loading order does not influence compatibility with static file cache anymore.
Bug
The changed loading order in the bug fix led to the problem that
But CrawlerInitialization must be run before TypoScriptFrontendHook because it loads request data that are needed by indexed_search.
This led to bug #729
Solution
Restore the HTTP middleware loading order as it was before the fix for #642, so that the code path is again:
crawler:FrontendUserAuthenticator (aoe/crawler/authentication)
crawler:CrawlerInitialization (aoe/crawler/initialization)
indexed_search:TypoScriptFrontendHook (called by typo3/cms-frontend/prepare-tsfe-rendering)
Resolves: #729