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

[BUGFIX:BP:11.5] Fix EXT:solr route enhancer #3743

Conversation

dkd-friedrich
Copy link
Member

Backport of #3742

What this pr does

SolrRoutingMiddleware was limited to indexing processs, but as the SolrFacetMaskAndCombineEnhancer requires this middleware to add the required parameters from the route path, this limitation causes that the route enhancer is ineffective.

This commit fixes this issue by reenabling the middleware for frontend requests and also ensures that route paths can be resolved correctly if PageTypeSuffix enhancer is active.

How to test

Configure route enhancer:

  • SolrFacetMaskAndCombineEnhancer
  • PageTypeSuffix

With this commit

  • EXT:solr can handle and react to facet parameters in route path
  • no warning Could not resolve page by path "menu.json" and language "de" if requesting a specific page type on root page
  • no TypeError occurs if no options are passed to the SolrFacetMaskAndCombineEnhancer via solr

Ports: #3742
Relates: #3202
Resolves: #3741

SolrRoutingMiddleware was limited to indexing processs, but
as the SolrFacetMaskAndCombineEnhancer requires this middleware
to add the required parameters from the route path, this limitation
causes that the route enhancer is ineffective.

This commit fixes this issue by reenabling the middleware for
frontend requests and also ensures that route paths can be resolved
correctly if PageTypeSuffix enhancer is active.

Ports: TYPO3-Solr#3742
Relates: TYPO3-Solr#3202
Resolves: TYPO3-Solr#3741
@dkd-friedrich dkd-friedrich force-pushed the bugfix/release-11.5.x/3741-fix_route_enhancer branch from 21212e6 to b660833 Compare August 2, 2023 11:16
Copy link
Collaborator

@dkd-kaehm dkd-kaehm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkd-kaehm dkd-kaehm merged commit 770f1e6 into TYPO3-Solr:release-11.5.x Sep 11, 2023
8 checks passed
@dkd-kaehm dkd-kaehm deleted the bugfix/release-11.5.x/3741-fix_route_enhancer branch September 11, 2023 12:56
dkd-friedrich added a commit to dkd-friedrich/ext-solr that referenced this pull request Nov 6, 2023
This is a maintenance release for TYPO3 11.5 that contains the folling changes:

- [TASK] Fix CI 2023.09.11 on release-11.5.x by @dkd-kaehm in TYPO3-Solr#3777
- [BUGFIX:BP:11.5] Fix EXT:solr route enhancer by @dkd-friedrich in TYPO3-Solr#3743
- [BUG] Fix detection of "draft records" in workspaces by @baschny in TYPO3-Solr#3642
- [BUGFIX] Do not index translations on default language in languages free mode by @dkd-kaehm in TYPO3-Solr#3786
- [BUGFIX:BP:11.5] Retry Uri Building after exception by @dkd-friedrich in TYPO3-Solr#3789
- [BUGFIX] Delete index documents without available site by @dkd-kaehm in TYPO3-Solr#3778
- [TASK:BP:11.5] Ensure recursive page update on page movement by @dkd-friedrich in TYPO3-Solr#3771
- [FEATURE:BP:11.5] Add index queue indices by @dkd-friedrich in TYPO3-Solr#3791
- [TASK:BP:11.5] Migrate top.fsMod by @dkd-friedrich in TYPO3-Solr#3795
- [BUGFIX:BP:11.5] Return value getPageItemChangedTime() must be of the type int by @dkd-kaehm in TYPO3-Solr#3813
- [TASK:BP:11.5] Remove duplicate withHeader() by @dkd-kaehm in TYPO3-Solr#3626
- [BUGFIX:BP:11.5] Do not list cores twice in Index Inspector by @dkd-kaehm in TYPO3-Solr#3818
- [BUGFIX] Fixes multiple sortings by @BastiLu in TYPO3-Solr#3762
- [BUGFIX:BP:11.5] Fix missing frontend.typoscript request attribute while indexing by @dkd-kaehm in TYPO3-Solr#3822
- [BUGFIX] Prevent indexing error on missing 'foreignLabelField' by @kitzberger in TYPO3-Solr#3740
- [BUGFIX:BP:11.5] Force score to float by @dkd-kaehm in TYPO3-Solr#3824
- [BUGFIX:BP:11.5] Fix possible notice by @dkd-kaehm in TYPO3-Solr#3825
- [DOC:BP:11.5] Add FAQ how to generate URLs to restricted pages by @dkd-kaehm in TYPO3-Solr#3826
- [BUGFIX:BP:11.5] Handle float values in options facet parser by @dkd-kaehm in TYPO3-Solr#3827
- [BUGFIX:BP:11.5] handle localizations with un-available tsfe more gracefully by @dkd-kaehm in TYPO3-Solr#3832
- [TASK] Update the version matrix by @dkd-friedrich in TYPO3-Solr#3859

Please read the release notes:
https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.4

---

How to Get Involved

There are many ways to get involved with Apache Solr for TYPO3:

* Submit bug reports and feature requests on GitHub
* Ask or help or answer questions in our Slack channel
* Provide patches through pull requests or review and comment on
existing pull requests
* Go to www.typo3-solr.com or call dkd to sponsor the ongoing
development of Apache Solr for TYPO3

Support us by becoming an EB partner:
https://shop.dkd.de/Produkte/Apache-Solr-fuer-TYPO3/

or call:
+49 (0)69 - 2475218 0
dkd-friedrich added a commit to dkd-friedrich/ext-solr that referenced this pull request Nov 6, 2023
This is a maintenance release for TYPO3 11.5 and the last release that supports Apache Solr 8.11. Next EXT:solr release for TYPO3 11.5 will be 11.6.0, it
will contain support for Apache Solr 9 and some breaking improvements.

11.5.4 contains the folling changes:

- [TASK] Fix CI 2023.09.11 on release-11.5.x by @dkd-kaehm in TYPO3-Solr#3777
- [BUGFIX:BP:11.5] Fix EXT:solr route enhancer by @dkd-friedrich in TYPO3-Solr#3743
- [BUG] Fix detection of "draft records" in workspaces by @baschny in TYPO3-Solr#3642
- [BUGFIX] Do not index translations on default language in languages free mode by @dkd-kaehm in TYPO3-Solr#3786
- [BUGFIX:BP:11.5] Retry Uri Building after exception by @dkd-friedrich in TYPO3-Solr#3789
- [BUGFIX] Delete index documents without available site by @dkd-kaehm in TYPO3-Solr#3778
- [TASK:BP:11.5] Ensure recursive page update on page movement by @dkd-friedrich in TYPO3-Solr#3771
- [FEATURE:BP:11.5] Add index queue indices by @dkd-friedrich in TYPO3-Solr#3791
- [TASK:BP:11.5] Migrate top.fsMod by @dkd-friedrich in TYPO3-Solr#3795
- [BUGFIX:BP:11.5] Return value getPageItemChangedTime() must be of the type int by @dkd-kaehm in TYPO3-Solr#3813
- [TASK:BP:11.5] Remove duplicate withHeader() by @dkd-kaehm in TYPO3-Solr#3626
- [BUGFIX:BP:11.5] Do not list cores twice in Index Inspector by @dkd-kaehm in TYPO3-Solr#3818
- [BUGFIX] Fixes multiple sortings by @BastiLu in TYPO3-Solr#3762
- [BUGFIX:BP:11.5] Fix missing frontend.typoscript request attribute while indexing by @dkd-kaehm in TYPO3-Solr#3822
- [BUGFIX] Prevent indexing error on missing 'foreignLabelField' by @kitzberger in TYPO3-Solr#3740
- [BUGFIX:BP:11.5] Force score to float by @dkd-kaehm in TYPO3-Solr#3824
- [BUGFIX:BP:11.5] Fix possible notice by @dkd-kaehm in TYPO3-Solr#3825
- [DOC:BP:11.5] Add FAQ how to generate URLs to restricted pages by @dkd-kaehm in TYPO3-Solr#3826
- [BUGFIX:BP:11.5] Handle float values in options facet parser by @dkd-kaehm in TYPO3-Solr#3827
- [BUGFIX:BP:11.5] handle localizations with un-available tsfe more gracefully by @dkd-kaehm in TYPO3-Solr#3832
- [TASK] Update the version matrix by @dkd-friedrich in TYPO3-Solr#3860

Please read the release notes:
https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.4

---

How to Get Involved

There are many ways to get involved with Apache Solr for TYPO3:

* Submit bug reports and feature requests on GitHub
* Ask or help or answer questions in our Slack channel
* Provide patches through pull requests or review and comment on
existing pull requests
* Go to www.typo3-solr.com or call dkd to sponsor the ongoing
development of Apache Solr for TYPO3

Support us by becoming an EB partner:
https://shop.dkd.de/Produkte/Apache-Solr-fuer-TYPO3/

or call:
+49 (0)69 - 2475218 0

Resolves: TYPO3-Solr#3782
dkd-friedrich added a commit to dkd-friedrich/ext-solr that referenced this pull request Nov 6, 2023
This is a maintenance release for TYPO3 11.5 and the last release that supports Apache Solr 8.11. Next EXT:solr release for TYPO3 11.5 will be 11.6.0, it
will contain support for Apache Solr 9 and some breaking improvements.

11.5.4 contains the following changes:

- [TASK] Fix CI 2023.09.11 on release-11.5.x by @dkd-kaehm in TYPO3-Solr#3777
- [BUGFIX:BP:11.5] Fix EXT:solr route enhancer by @dkd-friedrich in TYPO3-Solr#3743
- [BUG] Fix detection of "draft records" in workspaces by @baschny in TYPO3-Solr#3642
- [BUGFIX] Do not index translations on default language in languages free mode by @dkd-kaehm in TYPO3-Solr#3786
- [BUGFIX:BP:11.5] Retry Uri Building after exception by @dkd-friedrich in TYPO3-Solr#3789
- [BUGFIX] Delete index documents without available site by @dkd-kaehm in TYPO3-Solr#3778
- [TASK:BP:11.5] Ensure recursive page update on page movement by @dkd-friedrich in TYPO3-Solr#3771
- [FEATURE:BP:11.5] Add index queue indices by @dkd-friedrich in TYPO3-Solr#3791
- [TASK:BP:11.5] Migrate top.fsMod by @dkd-friedrich in TYPO3-Solr#3795
- [BUGFIX:BP:11.5] Return value getPageItemChangedTime() must be of the type int by @dkd-kaehm in TYPO3-Solr#3813
- [TASK:BP:11.5] Remove duplicate withHeader() by @dkd-kaehm in TYPO3-Solr#3626
- [BUGFIX:BP:11.5] Do not list cores twice in Index Inspector by @dkd-kaehm in TYPO3-Solr#3818
- [BUGFIX] Fixes multiple sortings by @BastiLu in TYPO3-Solr#3762
- [BUGFIX:BP:11.5] Fix missing frontend.typoscript request attribute while indexing by @dkd-kaehm in TYPO3-Solr#3822
- [BUGFIX] Prevent indexing error on missing 'foreignLabelField' by @kitzberger in TYPO3-Solr#3740
- [BUGFIX:BP:11.5] Force score to float by @dkd-kaehm in TYPO3-Solr#3824
- [BUGFIX:BP:11.5] Fix possible notice by @dkd-kaehm in TYPO3-Solr#3825
- [DOC:BP:11.5] Add FAQ how to generate URLs to restricted pages by @dkd-kaehm in TYPO3-Solr#3826
- [BUGFIX:BP:11.5] Handle float values in options facet parser by @dkd-kaehm in TYPO3-Solr#3827
- [BUGFIX:BP:11.5] handle localizations with un-available tsfe more gracefully by @dkd-kaehm in TYPO3-Solr#3832
- [TASK] Update the version matrix by @dkd-friedrich in TYPO3-Solr#3860

Please read the release notes:
https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.4

---

How to Get Involved

There are many ways to get involved with Apache Solr for TYPO3:

* Submit bug reports and feature requests on GitHub
* Ask or help or answer questions in our Slack channel
* Provide patches through pull requests or review and comment on
existing pull requests
* Go to www.typo3-solr.com or call dkd to sponsor the ongoing
development of Apache Solr for TYPO3

Support us by becoming an EB partner:
https://shop.dkd.de/Produkte/Apache-Solr-fuer-TYPO3/

or call:
+49 (0)69 - 2475218 0

Resolves: TYPO3-Solr#3782
dkd-friedrich added a commit that referenced this pull request Nov 6, 2023
This is a maintenance release for TYPO3 11.5 and the last release that supports Apache Solr 8.11. Next EXT:solr release for TYPO3 11.5 will be 11.6.0, it
will contain support for Apache Solr 9 and some breaking improvements.

11.5.4 contains the following changes:

- [TASK] Fix CI 2023.09.11 on release-11.5.x by @dkd-kaehm in #3777
- [BUGFIX:BP:11.5] Fix EXT:solr route enhancer by @dkd-friedrich in #3743
- [BUG] Fix detection of "draft records" in workspaces by @baschny in #3642
- [BUGFIX] Do not index translations on default language in languages free mode by @dkd-kaehm in #3786
- [BUGFIX:BP:11.5] Retry Uri Building after exception by @dkd-friedrich in #3789
- [BUGFIX] Delete index documents without available site by @dkd-kaehm in #3778
- [TASK:BP:11.5] Ensure recursive page update on page movement by @dkd-friedrich in #3771
- [FEATURE:BP:11.5] Add index queue indices by @dkd-friedrich in #3791
- [TASK:BP:11.5] Migrate top.fsMod by @dkd-friedrich in #3795
- [BUGFIX:BP:11.5] Return value getPageItemChangedTime() must be of the type int by @dkd-kaehm in #3813
- [TASK:BP:11.5] Remove duplicate withHeader() by @dkd-kaehm in #3626
- [BUGFIX:BP:11.5] Do not list cores twice in Index Inspector by @dkd-kaehm in #3818
- [BUGFIX] Fixes multiple sortings by @BastiLu in #3762
- [BUGFIX:BP:11.5] Fix missing frontend.typoscript request attribute while indexing by @dkd-kaehm in #3822
- [BUGFIX] Prevent indexing error on missing 'foreignLabelField' by @kitzberger in #3740
- [BUGFIX:BP:11.5] Force score to float by @dkd-kaehm in #3824
- [BUGFIX:BP:11.5] Fix possible notice by @dkd-kaehm in #3825
- [DOC:BP:11.5] Add FAQ how to generate URLs to restricted pages by @dkd-kaehm in #3826
- [BUGFIX:BP:11.5] Handle float values in options facet parser by @dkd-kaehm in #3827
- [BUGFIX:BP:11.5] handle localizations with un-available tsfe more gracefully by @dkd-kaehm in #3832
- [TASK] Update the version matrix by @dkd-friedrich in #3860

Please read the release notes:
https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.4

---

How to Get Involved

There are many ways to get involved with Apache Solr for TYPO3:

* Submit bug reports and feature requests on GitHub
* Ask or help or answer questions in our Slack channel
* Provide patches through pull requests or review and comment on
existing pull requests
* Go to www.typo3-solr.com or call dkd to sponsor the ongoing
development of Apache Solr for TYPO3

Support us by becoming an EB partner:
https://shop.dkd.de/Produkte/Apache-Solr-fuer-TYPO3/

or call:
+49 (0)69 - 2475218 0

Resolves: #3782
@vbdetemplephilipp
Copy link

After upgrading from 11.5.3 to 11.5.4 some frontend requests are stuck in the do while loop in:
\ApacheSolrForTypo3\Solr\Middleware\SolrRoutingMiddleware::retrievePageInformation

For those requests $scan is not set to false and therefore the loop runs infinitely.
Maybe a check for $path if it is the same as before for each loop run could help.

@dkd-kaehm
Copy link
Collaborator

@vbdetemplephilipp thanks for reporting.
Could you please create new issue for that and if you know the exact case why $scan is never false, please add it as well.

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

Successfully merging this pull request may close these issues.

None yet

3 participants