ext-solr icon indicating copy to clipboard operation
ext-solr copied to clipboard

[BUG] Ajaxification doesn't work when page suffix with `.html` is used

Open simonschaufi opened this issue 2 years ago • 1 comments

Describe the bug In TYPO3 10 the page type is fetched from the route configuration if given and falls back to the type parameter only if the url doesn't contain any information about it.

To Reproduce Steps to reproduce the behavior: Add the following route enhancer:

routeEnhancers:
  PageTypeSuffix:
    type: PageType
    default: .html
    index: index
    map:
      .html: 0

and then call /search.html?type=7383 and you will see that the internal page type is 0 and the full website is loaded instead of the solr ajax page type. The type parameter is ONLY considered when the page is called without .html.

Expected behavior The page type 7383 is loaded

Used versions (please complete the following information):

  • TYPO3 Version: 10.4
  • EXT:solr Version: 11.1.2]

Additional context The actual problem is that the ajax url is created in the search_controller.js file instead of the backend where a proper url could be created with the correct page type applied.

simonschaufi avatar Nov 12 '21 17:11 simonschaufi

Facing the same issue with TYPO3 v11. A temporary solution i am thinking is to bind the click (with delegate) event to links which will request the link with type 7383 and to replace ".html" with empty string. This event should be triggered before the click event from solr js

dextar47 avatar May 03 '23 20:05 dextar47