• Resolved Sam Rohn

    (@sam-rohn)


    howdy

    i seem to have a problem with pagination for filter queries, clicking pagination options (2, Next ?) after filter and apply filter button results in url like this, which shows the default unfiltered list

    ?ulist=1&listpage=2#038;country=Germany&filter=Apply+Filters

    somehow an & is being changed to #038;

    manually changing it to this displays the correct results

    ?ulist=1&listpage=2&country=Germany&filter=Apply+Filters

    here is a direct link to userlist page – https://ivrpa.org/members/

    many thanks for amr users, it is really a great plugin ??

    sam

    https://www.ads-software.com/plugins/amr-users/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author anmari

    (@anmari)

    HI Sam,
    I’ll look into it.
    I’m guessing that code changes made after the recent concern about any plugins use f wp function remove and add_query_arg may have resulted in some partial urls being doubly escaped/encoded.

    in theory both should work but clearly they are not.

    Plugin Author anmari

    (@anmari)

    Hmm, pagination of filtered results is working fine on
    https://directories.wpusersplugin.com/simple-user-list/?ulist=1&SPECIALITY=Criminal&filter=Apply+Filters&listpage=2

    Which version of amr-users-plus are you using ?
    https://wpusersplugin.com/downloads/amr-users-plus/ The demo site is on 2.14

    If 2.14 still has same behaviour on your site then we have to see if whether somehow something is interfering ?
    https://webdesign.anmari.com/2932/debugging-a-possible-clash-between-plugins-andor-a-theme/

    Thread Starter Sam Rohn

    (@sam-rohn)

    it seems that i was actually using amr users plus 2.1.2, i have now updated to 2.1.4, i also rebuilt the list cache, re-saved amr settings, re-saved wp permalinks, and rebuilt site cache (zen cache), empty browser cache etc, but the same error persists…

    (i am also using amr users plus s2member 1.2, if that is relevant)

    the fact that the “&” right before “country” is being mangled while others in the same string are ok is a clue i suppose, “country” is actually custom user meta i coded myself, so perhaps this error is caused by my own code somewhere…

    otherwise, i have a lot of other plugins and custom theme and lots of custom plugin code running on that complex membership site so mass-deactivate for troubleshooting is something i hope to avoid, but i will try to narrow down a list of suspects, and i will report back when i find the culprit

    grazie

    sam

    Thread Starter Sam Rohn

    (@sam-rohn)

    ok, i found a simple workaround for now, but i will continue to investigate the actual cause of this error

    the following code in functions.php will convert “#038;” to “&” in urls, and restored my broken pagination functionality

    // Fix URL Ampersand Problem : "#038;" replaces "&" and breaks pagination urls
    
    function amp_url_bugfix($link) {
    return str_replace('#038;', '&', $link);
    }
    add_filter('paginate_links', 'amp_url_bugfix');

    search google for “wordpress #038; pagination error” for more info, there are a few topics for a few different plugins w same issue floating around

    sam

    Plugin Author anmari

    (@anmari)

    Hi sam, mass deactivation is not as scary as it sounds.
    They all go into “recently activate”.
    Select all and reactivate.
    Every time wp upgrades a plugin it deactivates it first, upgrades, then reactivates (while in maintenance mode ofcourse).

    I’ll keep looking my end too but very hard to troubleshoot if I don’t the behaviour ??

    Thread Starter Sam Rohn

    (@sam-rohn)

    i am actually co-dev on another wp plugin (panopress), i spend half my support time telling other people to disable plugins and test w default theme etc, but before i follow my own advice i want to look through my own code here and see if this error is my own fault ??

    Thread Starter Sam Rohn

    (@sam-rohn)

    ok, i just tested on my (slightly out of date) original dev site which is still on amr+ 2.1.2 and pagination URLs works fine over there, so it must be something i recently added to live site, i will backtrack a bit and report back when i have more info…

    thanks again ??

    sam

    Thread Starter Sam Rohn

    (@sam-rohn)

    this is now working as expected in amr users version 3.21 without my functions.php code above, no more broken page 2 queries

    thanks again ??

    sam

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘filter url query pagination broken ?’ is closed to new replies.