I think this problem has been around for a while (https://ww.wp.xz.cn/support/topic/pagination-not-working-201/).
I have the same issue. Apologies if I should have started a new support request but, in case it is relevant, this is the shortcode I am using:
[events_list_grouped mode=”yearly” scope=”past” order=”desc” limit=20 pagination=1]
-
This reply was modified 2 years, 11 months ago by
Mariette.
The following error appears in the web browser developer console when clicking on the page numbers: Failed to load resource: the server responded with a status of 400 () referring to the site’s wp-admin/admin-ajax.php.
Same problem and error message here. It suddenly stopped working. We’re using the most recent plugin of Events Manager & Events Manager Pro.
We also tested it with all other plugins turned off & with the default Twentytwentythree theme, but none of these are working.
Our link: https://welzijnwestbetuwe.nl/agenda/
I had/have the problem too. I was able to solve it with this solution:
https://ww.wp.xz.cn/support/topic/ajax-paging-fails-on-default-events-page/#post-16682303
Unfortunately it only works for pagination from page 2 on, when I click back to page 1 the error occurs there again.
I have no idea what I can do.
-
This reply was modified 2 years, 11 months ago by
cede007.
I’ve just discovered that if I change my shortcode from this:
[events_list_grouped mode=”yearly” scope=”past” order=”desc” limit=20 pagination=1]
to this
[events_list scope=”past” orderby=”event_start_date” order=”desc” limit=20 pagination=1]
ie, remove the grouping by year, then the pagination works!
Does that help any of you?
I have also already tried to create the event page via shortcodes. Then the pagination works. My code:
[events_list_grouped limit=”20″ pagination=”1″ mode=”monthly”]
But I need a search field above the event list. And for that I need to specify a page that lists the events. But then when I specify the page as the event list page in the events manager preferences, the pagination is the “old” one, which doesn’t work. But to display a search box above the list, I need to define a page as an event list page.
Maybe it works differently with the search?
I found a fix on this thread:
https://ww.wp.xz.cn/support/topic/ajax-paging-fails-on-default-events-page/#post-16682303
To fix this change line 40 of wp-content/plugins/events-manager/em-functions.php from this:
$data_atts = 'data-em-ajax="'.esc_attr(build_query($data)).'"'; //for inclusion later on
To this:
$ajax_data = $data;
unset($ajax_data['header_format']);
$data_atts = 'data-em-ajax="'.esc_attr(build_query($ajax_data)).'"'; //for inclusion later on
Hopefully the plugin author will provide a fix for this in the next release.
As I wrote above, this solution works only for all pages from page 2, but if you want to go back to page 1, it doesn’t work.
Ah ok, I see.
About the other solutions: i don’t use shortcodes to show the pagination or calendar, We’re using the basic settings from Events Manager