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

Avoid having too many results in the backoffice search page #2042

Merged
merged 1 commit into from Mar 16, 2016

Conversation

Projects
None yet
2 participants
@gillesbourgeat
Member

gillesbourgeat commented Mar 14, 2016

This pull request fix to 25 the number of search results by type to avoid too long loading times or of memory overflow.

@roadster31

This comment has been minimized.

Show comment
Hide comment
@roadster31

roadster31 Mar 14, 2016

Contributor

Is it possible to add a notice when more than 25 results are available ?

Contributor

roadster31 commented Mar 14, 2016

Is it possible to add a notice when more than 25 results are available ?

@gillesbourgeat

This comment has been minimized.

Show comment
Hide comment
@gillesbourgeat

gillesbourgeat Mar 14, 2016

Member

@roadster31 This requires making additional queries that are very greedy in this page.
Why not, an under search that allowing of paginate the results of a type if the number of results returned by the loop is equals 25.
This under search is accessed by a link under the search of the first list.
This feature will be for Thelia 2.4.

Member

gillesbourgeat commented Mar 14, 2016

@roadster31 This requires making additional queries that are very greedy in this page.
Why not, an under search that allowing of paginate the results of a type if the number of results returned by the loop is equals 25.
This under search is accessed by a link under the search of the first list.
This feature will be for Thelia 2.4.

@roadster31

This comment has been minimized.

Show comment
Hide comment
@roadster31

roadster31 Mar 14, 2016

Contributor

@gillesbourgeat to achieve this without additional queries, limit the loop to 26 instead of 25, hide the 26th result with a Smarty test, and check if ($LOOP_COUNT > 25).

Contributor

roadster31 commented Mar 14, 2016

@gillesbourgeat to achieve this without additional queries, limit the loop to 26 instead of 25, hide the 26th result with a Smarty test, and check if ($LOOP_COUNT > 25).

@gillesbourgeat

This comment has been minimized.

Show comment
Hide comment
@gillesbourgeat

gillesbourgeat Mar 14, 2016

Member

@roadster31 ok, but for now there will be just a message and not a link allowing paginate the search.

Member

gillesbourgeat commented Mar 14, 2016

@roadster31 ok, but for now there will be just a message and not a link allowing paginate the search.

@roadster31

This comment has been minimized.

Show comment
Hide comment
@roadster31

roadster31 Mar 14, 2016

Contributor

Sure. This is just a workaround to the lack of pagination, to warn the user that only the first 25 results are displayed.

Contributor

roadster31 commented Mar 14, 2016

Sure. This is just a workaround to the lack of pagination, to warn the user that only the first 25 results are displayed.

@gillesbourgeat

This comment has been minimized.

Show comment
Hide comment
@gillesbourgeat

gillesbourgeat Mar 16, 2016

Member

@roadster31 Done ! This suits your ?

Member

gillesbourgeat commented Mar 16, 2016

@roadster31 Done ! This suits your ?

gillesbourgeat added a commit that referenced this pull request Mar 16, 2016

Merge pull request #2042 from gillesbourgeat/fix/prevent-too-many-res…
…ults-for-page-search-in-bo

Avoid having too many results in the backoffice search page

@gillesbourgeat gillesbourgeat merged commit e1eec0e into thelia:master Mar 16, 2016

2 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@roadster31

This comment has been minimized.

Show comment
Hide comment
@roadster31

roadster31 Mar 16, 2016

Contributor

Wonderful ❤️

Contributor

roadster31 commented Mar 16, 2016

Wonderful ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment