Fix for SearchInDocument plugin if using routeEnhancers (Slug) #561
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.
With TYPO3 9.5 the advanced page routing is builtin. There is no need to
install any third party extension like realurl anymore.
Using the routeEnhancer with the pageview makes it possible to write
shorter URLs like
http://example.com/workview/123/1
which is short for
http://example.com/workview?tx_dlf[id]=123&tx_dlf[page]=1
The current implementation of the SearchInDocument plugin has to build
the target URLs from the searchresults in JavaScript. It does it by
appending the GET-parameter to the base_url. The resulting URL could
look like this:
http://example.com/workview/123/1?tx_dlf[id]=123&tx_dlf[page]=5&tx_dlf[highlight_word=searchword
In fact the GET parameter are given twice to TYPO3. This was tolerated
in the past by realurl on TYPO3 8.7 but brings an exception with TYPO3
9.5.
The way the plugin calculates the base URL in JavaScript is even to
complicate. It would be sufficiant to take it from the form action URL.
This way, the double GET parameters are avoided.