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

Add is_search check to found_posts_query filter #67

Merged
merged 1 commit into from
Apr 20, 2016

Conversation

yvickers
Copy link
Contributor

This limits clearing of found posts query to solr searching. Always returning blank breaks paging within wp install on non-search pages.

This limits clearing of found posts query to solr searching.  Always returning blank breaks paging within wp install on non-search pages.
@joshkoenig
Copy link
Member

Thanks for the Pull Request. Can you explain in a bit more detail how we can replicate the issue you are solving with this change?

@joshkoenig joshkoenig mentioned this pull request Apr 20, 2016
@yvickers
Copy link
Contributor Author

yvickers commented Apr 20, 2016

Yes, on other pages of our site where paging is used such as archive pages, blanking the found posts query causes WP to pull the ID of a post from the original query as the found posts count. So we were ending up with a post count of over 20,000 (our post id was 20848), which made a lot of empty pages.

It's easiest to replicate with archives and then set your posts per page really low in the reading settings.

@joshkoenig
Copy link
Member

Ok this is definitely a blocker for the next release. Thanks for the Pull Request!

@allan23
Copy link
Contributor

allan23 commented Apr 20, 2016

@joshkoenig Just tested this and it resolves the issue with pagination.

Great catch @yvickers-rci!

@joshkoenig
Copy link
Member

+1 Merging now.

@joshkoenig joshkoenig merged commit 7bc6b01 into pantheon-systems:master Apr 20, 2016
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.

3 participants