Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Search results pagination problem #1

Closed
guidokritz opened this Issue · 6 comments

4 participants

@guidokritz

Search results pagination is not working with the plugin activated.

I get a link with the following format: http://my-site.com/page/2/?s=search+terms
But when I access that URL it shows my home page instead of the search results. It works fine with QTranslage Slug plugin disabled.

Would be great to find a fix for this issue.

EDIT: actually it doesn't show my home page but the page 2 of my blog. Looks like the pagination is working but is ignoring the ?s= parameter and showing the blog instead of the search results.

@not-only-code

Looks like some bug on parse query, i'll check this for next release.
Thanks for report!

@nikolov-tmw

I worked around this bug by replacing line 775 in qtranslate-slug.php, which looks like:
if (isset($wp->matched_query))
with:
if ( isset( $wp->matched_query ) && ! isset( $query['s'] ) )

What I found was, that $wp->matched_query was &paged=2 when it should have been s=s&paged=2. I'm not sure what is the reason for that, but this should do as a workaround for now :)

@not-only-code

Something in query_vars function is wrong that's because i've used this kind of hacks at beginning of filter_request function. May have to do with generate_rewrite_rules are builded or maybe it is produced by this issue #31.
I must to check this.

Thanks for report.

@not-only-code

This has been is solved with #31. Anyway i just opened another issue to rewrite the hacks at beginnig of filter_request funciton (#36)

@evpozdniakov

The fix #31 didn't solve the problem. But it stated working for me after adding

 && ! isset( $query['s'] )

(as nikolov-tmw recomended)

@not-only-code not-only-code modified the milestone: 1.1.8, 1.1.5
@not-only-code

This patch 4d6864f should solve this, so i close this issue. Anyway is pending rewrite form scratch filter_request function as #36 says.

@not-only-code not-only-code reopened this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.