• In the changelog of 6.4.2 it says:

    • fixed pagination issues with grouped event lists

    But when I try it I find that it’s not completely fixed. I can go forward to the next page, but when I try to go back to a previous page it still hangs (although occasionally it will work on the desktop but never on mobile ).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter joneiseman

    (@joneiseman)

    Yes, the problem only occurs for the first page. The problem is the 2 links to go back to the first page are not properly encoded (the “<” and the “1” links).

    To fix this I changed line 46 of em-functions.php from this:

                   if( !empty($base_querystring) ) $base_querystring = '?'.$base_querystring;

    To this:

                  if( !empty($base_querystring) )
                       $base_querystring = '?'.str_replace(['&lt;', '&gt;', '#s', '/h2'], ['%3C', '%3E', '%23s', '%2Fh2'], $base_querystring);

    There’s probably a cleaner way to do this but this fixed the problem.

    Hopefully, the developers will fix this in the next release (otherwise this will get broken again).

    Thread Starter joneiseman

    (@joneiseman)

    Here’s a better way to fix this that doesn’t require modifying the plugin code. Just add the following code snippet:

    add_filter('em_object_get_pagination_links', 'my_object_output_pagination');
    function my_object_output_pagination($return)
    {
        if (!empty($return) && str_contains($return, '#s')) {
           return str_replace(['&lt;', '&gt;', '#s', '/h2'], ['%3C', '%3E', '%23s', '%2Fh2'], $return);
        }
        return $return;
    }

    You can use the Code Snippets plugin to add this code snippet.

    • This reply was modified 1 year, 8 months ago by joneiseman.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘pagination when using grouped list is still not working’ is closed to new replies.