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] Pagination breaks with 1573061766 exception on initial empty search without results #3150

Closed
Tracked by #2976
dkd-kaehm opened this issue Jan 11, 2022 · 0 comments · Fixed by #3834
Closed
Tracked by #2976
Assignees

Comments

@dkd-kaehm
Copy link
Collaborator

Describe the bug

By calling the search with enabled initial empty query following happens:

See \ApacheSolrForTypo3\Solr\Tests\Integration\Controller\SearchControllerTest::canDoAnInitialEmptySearchWithoutResults()

1573061766 InvalidArgumentException in typo3/sysext/core/Classes/Pagination/AbstractPaginator.php:165

    protected function setItemsPerPage(int $itemsPerPage): void
    {
        if ($itemsPerPage < 1) {
            throw new \InvalidArgumentException(
                'Argument $itemsPerPage must be greater than 0',
                1573061766
            );
        }
    ....
    }
Argument $itemsPerPage must be greater than 0
There was 1 error:

1) ApacheSolrForTypo3\Solr\Tests\Integration\Controller\SearchControllerTest::canDoAnInitialEmptySearchWithoutResults
InvalidArgumentException: Argument $itemsPerPage must be greater than 0

/var/www/html/public/typo3/sysext/core/Classes/Pagination/AbstractPaginator.php:165
/var/www/html/packages/ext-solr/Classes/Pagination/ResultsPaginator.php:44
/var/www/html/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php:3199
/var/www/html/packages/ext-solr/Classes/Controller/SearchController.php:113
/var/www/html/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:572
/var/www/html/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:489
/var/www/html/public/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php:96
/var/www/html/public/typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php:46
/var/www/html/public/typo3/sysext/extbase/Classes/Core/Bootstrap.php:165
/var/www/html/public/typo3/sysext/extbase/Classes/Core/Bootstrap.php:148
/var/www/html/public/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:5392
/var/www/html/public/typo3/sysext/frontend/Classes/ContentObject/UserContentObject.php:44
/var/www/html/public/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:800
/var/www/html/public/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:736
/var/www/html/public/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:2814
/var/www/html/public/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:2772
/var/www/html/public/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:2741
/var/www/html/public/typo3/sysext/frontend/Classes/Http/RequestHandler.php:164
/var/www/html/public/typo3/sysext/core/Classes/Middleware/ResponsePropagation.php:34
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/OutputCompression.php:48
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/packages/ext-solr/Classes/Middleware/PageIndexerFinisher.php:54
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/ContentLengthResponseHeader.php:46
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/ShortcutAndMountPointRedirect.php:79
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php:78
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php:104
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php:132
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/PreviewSimulator.php:66
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/packages/ext-solr/Classes/Middleware/PageIndexerInitialization.php:78
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/packages/ext-solr/Classes/Middleware/FrontendUserAuthenticator.php:80
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/PageResolver.php:106
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php:80
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php:94
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/vendor/typo3/testing-framework/Resources/Core/Functional/Extensions/json_response/Classes/Middleware/FrontendUserHandler.php:46
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/vendor/typo3/testing-framework/Resources/Core/Functional/Extensions/json_response/Classes/Middleware/BackendUserHandler.php:55
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php:91
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php:78
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/MaintenanceMode.php:55
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/EidHandler.php:64
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php:65
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/packages/ext-solr/Classes/Middleware/SolrRoutingMiddleware.php:123
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php:45
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/core/Classes/Middleware/VerifyHostHeader.php:55
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php:58
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/vendor/typo3/testing-framework/Resources/Core/Functional/Extensions/json_response/Classes/Encoder.php:30
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:172
/var/www/html/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:78
/var/www/html/public/typo3/sysext/core/Classes/Http/AbstractApplication.php:86
/var/www/html/public/typo3/sysext/frontend/Classes/Http/Application.php:69
/var/www/html/vendor/typo3/testing-framework/Classes/Core/Functional/FunctionalTestCase.php:1190
/var/www/html/vendor/typo3/testing-framework/Classes/Core/Functional/FunctionalTestCase.php:1080
/var/www/html/packages/ext-solr/Tests/Integration/Controller/AbstractFrontendControllerTest.php:74
/var/www/html/packages/ext-solr/Tests/Integration/Controller/SearchControllerTest.php:296

To Reproduce
Steps to reproduce the behavior:

  1. add following to TypoScript setup;
plugin.tx_solr.search {
    initializeWithEmptyQuery = 1
    showResultsOfInitialEmptyQuery = 0
    faceting = 1
    // now we set the facet type for "type" facet to fluid and expect that we get a rendered facet
    faceting.facets.type {
        label = Content Type
        field = type
    }
}
  1. Call the page with solr plugin
  2. See error

Expected behavior
That should work as expected in test case.

Used versions (please complete the following information):

  • TYPO3 Version: [e.g. 11.5.4]
  • EXT:solr Version: [e.g. @Dev- release-11.5.x]

Additional context
See Stack trace HTML in zip file.
EXT:solr_Pagination_Exception_1573061766.zip

dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this issue Feb 3, 2022
# A preview release 11.5.0 BETA-1 for TYPO3 11 LTS

## Huge improvements:

* [FEATURE] Get "free content mode" working
* [BUGFIX] TypoScript configuration for "Hide default language" sites

## Known issues:

* [BUG] Pagination breaks with 1573061766 exception on initial empty search without results
   TYPO3-Solr#3150
*  [BUG:11.5] Frequent Searches plugin does not work 
   TYPO3-Solr#3166

## Open tasks:

* [TASK] Migrate search/frontend templates to Bootstrap v5.1
   TYPO3-Solr#3112
* [TASK] Refactor Widgets to TYPO3s new Pagination API
   TYPO3-Solr#3091
* etc. small tasks
   See: The most up-to-date informations you'll get on:
   TYPO3-Solr#2976

# Note for non-composer instances:

This beta release is not available in TYPO3 TER, if you want to try this release,
please download and install this release manually from:

* https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.0-beta-1
  

---

# 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-kaehm added a commit to dkd-kaehm/ext-solr that referenced this issue Feb 3, 2022
# A preview release 11.5.0 BETA-1 for TYPO3 11 LTS

## Huge improvements:

* [FEATURE] Get "free content mode" working
* [BUGFIX] TypoScript configuration for "Hide default language" sites

## Known issues:

* [BUG] Pagination breaks with 1573061766 exception on initial empty search without results
   TYPO3-Solr#3150
*  [BUG:11.5] Frequent Searches plugin does not work 
   TYPO3-Solr#3166

## Open tasks:

* [TASK] Migrate search/frontend templates to Bootstrap v5.1
   TYPO3-Solr#3112
* [TASK] Refactor Widgets to TYPO3s new Pagination API
   TYPO3-Solr#3091
* etc. small tasks
   See: The most up-to-date informations you'll get on:
   TYPO3-Solr#2976

## Note for non-composer instances:

This beta release is not available in TYPO3 TER, if you want to try this release,
please download and install this release manually from:

* https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.0-beta-1
  

---

# 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-kaehm added a commit that referenced this issue Feb 3, 2022
# A preview release 11.5.0 BETA-1 for TYPO3 11 LTS

## Huge improvements:

* [FEATURE] Get "free content mode" working
* [BUGFIX] TypoScript configuration for "Hide default language" sites

## Known issues:

* [BUG] Pagination breaks with 1573061766 exception on initial empty search without results
   #3150
*  [BUG:11.5] Frequent Searches plugin does not work 
   #3166

## Open tasks:

* [TASK] Migrate search/frontend templates to Bootstrap v5.1
   #3112
* [TASK] Refactor Widgets to TYPO3s new Pagination API
   #3091
* etc. small tasks
   See: The most up-to-date informations you'll get on:
   #2976

## Note for non-composer instances:

This beta release is not available in TYPO3 TER, if you want to try this release,
please download and install this release manually from:

* https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.0-beta-1
  

---

# 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 issue Feb 9, 2022
# A preview release 11.5.0 BETA-2 for TYPO3 11 LTS

## Huge improvements:

* [P:11.5:FEATURE] Improve data update handling

## Known issues:

* [BUG] Pagination breaks with 1573061766 exception on initial empty
search without results
   TYPO3-Solr#3150
*  [BUG:11.5] Frequent Searches plugin does not work
   TYPO3-Solr#3166

## Open tasks:

* [TASK] Migrate search/frontend templates to Bootstrap v5.1
   TYPO3-Solr#3112
* [TASK] Refactor Widgets to TYPO3s new Pagination API
   TYPO3-Solr#3091
* etc. small tasks
   See: The most up-to-date informations you'll get on:
   TYPO3-Solr#2976

## Note for non-composer instances:

This beta release is not available in TYPO3 TER, if you want to try this
release,
please download and install this release manually from:

* https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.0-beta-1


---

# 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 issue Feb 9, 2022
# A preview release 11.5.0 BETA-2 for TYPO3 11 LTS

## Huge improvements:

* [P:11.5:FEATURE] Improve data update handling

## Known issues:

* [BUG] Pagination breaks with 1573061766 exception on initial empty
search without results
   TYPO3-Solr#3150
*  [BUG:11.5] Frequent Searches plugin does not work
   TYPO3-Solr#3166

## Open tasks:

* [TASK] Migrate search/frontend templates to Bootstrap v5.1
   TYPO3-Solr#3112
* [TASK] Refactor Widgets to TYPO3s new Pagination API
   TYPO3-Solr#3091
* etc. small tasks
   See: The most up-to-date informations you'll get on:
   TYPO3-Solr#2976

## Note for non-composer instances:

This beta release is not available in TYPO3 TER, if you want to try this
release,
please download and install this release manually from:

* https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.0-beta-1


---

# 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 that referenced this issue Feb 9, 2022
# A preview release 11.5.0 BETA-2 for TYPO3 11 LTS

## Huge improvements:

* [P:11.5:FEATURE] Improve data update handling

## Known issues:

* [BUG] Pagination breaks with 1573061766 exception on initial empty
search without results
   #3150
*  [BUG:11.5] Frequent Searches plugin does not work
   #3166

## Open tasks:

* [TASK] Migrate search/frontend templates to Bootstrap v5.1
   #3112
* [TASK] Refactor Widgets to TYPO3s new Pagination API
   #3091
* etc. small tasks
   See: The most up-to-date informations you'll get on:
   #2976

## Note for non-composer instances:

This beta release is not available in TYPO3 TER, if you want to try this
release,
please download and install this release manually from:

* https://github.com/TYPO3-Solr/ext-solr/releases/tag/11.5.0-beta-1


---

# 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 issue Mar 9, 2022
If Solr is initialized with an empty query (initializeWithEmptyQuery)
usedResultsPerPage is empty and will lead to an exception. To avoid
this the default configuration from TypoScript is used.

Resolves: TYPO3-Solr#3150
dkd-friedrich added a commit to dkd-friedrich/ext-solr that referenced this issue Mar 10, 2022
If Solr is initialized with an empty query (initializeWithEmptyQuery)
usedResultsPerPage is empty and will lead to an exception. To avoid
this the default configuration from TypoScript is used.

Resolves: TYPO3-Solr#3150
dkd-friedrich added a commit to dkd-friedrich/ext-solr that referenced this issue Mar 10, 2022
If Solr is initialized with an empty query (initializeWithEmptyQuery)
usedResultsPerPage is empty and will lead to an exception. To avoid
this the default configuration from TypoScript is used.

Resolves: TYPO3-Solr#3150
dkd-friedrich added a commit that referenced this issue Mar 10, 2022
If Solr is initialized with an empty query (initializeWithEmptyQuery)
usedResultsPerPage is empty and will lead to an exception. To avoid
this the default configuration from TypoScript is used.

Resolves: #3150
@dkd-friedrich dkd-friedrich self-assigned this Mar 10, 2022
dkd-friedrich added a commit to dkd-friedrich/ext-solr that referenced this issue Mar 14, 2022
Reenables test case "canDoAnInitialEmptySearchWithoutResults" of
SearchControllerTest, as issue was already fixed in TYPO3-Solr#3112.

Resolves: TYPO3-Solr#3150
Releated: TYPO3-Solr#3112
dkd-kaehm pushed a commit that referenced this issue Mar 14, 2022
Reenables test case "canDoAnInitialEmptySearchWithoutResults" of
SearchControllerTest, as issue was already fixed in #3112.

Resolves: #3150
Releated: #3112
dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this issue Oct 16, 2023
Reenables test case "canDoAnInitialEmptySearchWithoutResults" of
SearchControllerTest, as issue was already fixed in TYPO3-Solr#3112.

Resolves: TYPO3-Solr#3150
Releated: TYPO3-Solr#3112
Ports: TYPO3-Solr#3230
dkd-kaehm added a commit that referenced this issue Oct 16, 2023
Reenables test case "canDoAnInitialEmptySearchWithoutResults" of
SearchControllerTest, as issue was already fixed in #3112.

Resolves: #3150
Releated: #3112
Ports: #3230
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 a pull request may close this issue.

2 participants