This is essentially a clone of closed issue #69 since the problem still persists with the latest release. I'm using Wordpress 5.8.1, Geo-my-wp 3.7.1, Posts Locator extension.
When I submit the search form on my site, I get a 404 error because of the page URL parameter. An example of the URL params from a search:
This would lead to a 404. However if I change page= to paged=, it works again, and correctly paginates. I'm not sure if this is the issue, but I noticed that page is a reserved query variable in Wordpress: https://codex.wordpress.org/WordPress_Query_Vars
I tried this fix but it did not work. The only workaround I was able to find was patching includes/template-functions/class-gmw-search-form-helper.php:
408,413c408
< $output .= "<input type=\"hidden\" id=\"gmw-page-{$id}\" class=\"gmw-page\" name=\"page\" value=\"1\" />";
<
< // Fix for home page pagination when going to the first page.
< if ( is_front_page() || is_single() ) {
< $output .= "<input type=\"hidden\" id=\"gmw-paged-{$id}\" class=\"gmw-paged\" name=\"paged\" value=\"1\" />";
< }
---
> $output .= "<input type=\"hidden\" id=\"gmw-paged-{$id}\" class=\"gmw-paged\" name=\"paged\" value=\"1\" />";
I will submit a pull request with this patch shortly.
This is essentially a clone of closed issue #69 since the problem still persists with the latest release. I'm using Wordpress 5.8.1, Geo-my-wp 3.7.1, Posts Locator extension.
When I submit the search form on my site, I get a 404 error because of the
page
URL parameter. An example of the URL params from a search:This would lead to a 404. However if I change
page=
topaged=
, it works again, and correctly paginates. I'm not sure if this is the issue, but I noticed thatpage
is a reserved query variable in Wordpress: https://codex.wordpress.org/WordPress_Query_VarsI tried this fix but it did not work. The only workaround I was able to find was patching
includes/template-functions/class-gmw-search-form-helper.php
:I will submit a pull request with this patch shortly.