Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] routeEnhancer is broken with PageTypeSuffix #4289

Open
dogawaf opened this issue Jan 20, 2025 · 2 comments
Open

[BUG] routeEnhancer is broken with PageTypeSuffix #4289

dogawaf opened this issue Jan 20, 2025 · 2 comments

Comments

@dogawaf
Copy link
Contributor

dogawaf commented Jan 20, 2025

Describe the bug

When a PageTypeSuffix is used in the site config.yaml, in order to suffix url with ".html", the Solr's routeEnhancer generates brokens url for filters.

To Reproduce

Given this config in the site routing :

routeEnhancers:
  PageTypeSuffix:
    type: CustomPageType
    default: .html
    index: index

And the SolrFacetMaskAndCombineEnhancer config given as example in the documentation:

routeEnhancers:
  products:
    type: SolrFacetMaskAndCombineEnhancer
    limitToPages:
      - 42
    extensionKey: tx_solr
    routePath: '/{productType}'
    _arguments:
      productType: filter-productType
    requirements:
      productType: '.*'

Expected behavior

Url for filters should be generated with .html at the end, and be decoded without saving the .html into the filter value.

Used versions (please complete the following information):

  • TYPO3 Version: 12.4.22
  • EXT:solr Version: 12.0.5
  • PHP Version: 8.2
@dogawaf
Copy link
Contributor Author

dogawaf commented Jan 20, 2025

I managed to patch the extension in several places, where $uri->getPath() is use "as is" (see attached patch).

It works in my project, but IMHO the issue should be fixed in a proper way.

solr_fix_pagetypesuffix.patch.txt

@dkd-kaehm
Copy link
Collaborator

@dogawaf
Please transfer your patch to a pull-request.

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

No branches or pull requests

2 participants