Skip Navigation

[Resolved] Pagination links show up and appear as the correct link but do now work

This thread is resolved. Here is a description of the problem and solution.

Problem: When I click the pagination links in a paginated View, nothing happens. In the browser console I see a JavaScript error:

Uncaught TypeError: Cannot read property 'submit' of undefined at WPViews.ViewPagination.self.trigger_pagination wpv-pagination-embed...js?ver=2.6.4.2:1899

Solution: Check to be sure the wpv-filter-meta-html tag is included in the Output editor panel. Hide the filter section with CSS if necessary.

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by francineP 6 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1127117
Capture d’écran 2018-10-14 à 21.31.40.png
Capture d’écran 2018-10-14 à 21.30.44.png
Capture d’écran 2018-10-14 à 21.28.41.png
Capture d’écran 2018-10-14 à 21.25.28.png

I have added a pagination to my view:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>
          [wpv-post-body view_template="Modèle liste articles MS"]
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]Pas d'article pour cette catégorie[/wpml-string]</strong>
	[/wpv-no-items-found]
<div class="ms-pagination">
[wpv-pagination][wpv-pager-nav-links previous_next_links="true"][/wpv-pagination]
</div>
[wpv-layout-end]

-----------------
it appears correctly on the page (see enclosed screenshot 21.25.28.png)
When I hover on page 2, a link which is the correct one appears - see screenshot 21.31.40.png (if I copy the link and paste it in my browser url field, the page 2 gets loaded)
But if I simply click on page 2, nothing happens, the page does not switch from page 1 to page 2
Also nothing happens when I click on the "Next" ("Suivant") link.
I have also tried all possible options, i.e. "manual pagination", or "ajax manual" or "ajax automatic" - see screenshot 21.28.41.png - but it remains impossible to use the link and switch from page 1 to page 2.

#1127140

Hi, can you please try these troubleshooting steps first?
- Temporarily deactivate all plugins except Types and Views, and activate the default theme Twenty Seventeen.
- Choose the option "Pagination activée avec transition manuelle et AJAX" and test again. If the pagination problem is resolved, reactivate your theme and other plugins one by one until the problem returns.
- If the problem was not resolved, please open the browser console and try to use the pagination links again. If any JavaScript errors are shown please copy + paste them here for me to review.

Let me know the results and we can go from there.

#1127143
Capture d’écran 2018-10-14 à 22.22.58.png

Thank you for your quick answer.
Enclosed is the result from the Browser console.

#1127151

Okay thank you. Typically this type of code points to a plugin conflict or a cached file. Please clear your browser cache and test again. If the problem is not resolved, I'll need to take a closer look. Is your site online? If so, please provide login credentials here in the private fields and I will take a look.

#1129180

Okay I see the problem. The wpv-filter-meta-html tag had been removed from the output editor, so the search form wasn't in the markup of the page. That's why there was a javascript error. This tag is required, so I replaced it. This broke the layout of the page, so I did some more investigation. There were a couple of unclosed "div" tags in your search filters, so I added them. Please check now. If you want to show the filters, remove the hidden wrapper div in the Output Editor panel here: hidden link

#1129205

Dear Christian,

You are saving my life! Thank you very much. However I am quite surprised to learn that the filter tags must be present even when we do not want to display any filter on the the page. Indeed, I had on purpose removed those tags as I did not want any filter to appear on the page...It is not so obvious that the pagination works only if the filter tags are present on the page 🙂 Anyway, I very much appreciate your support and help. I have tested the page and it now works. Thank you as well for having investigated far enough to make this page work without breaking the layout. I appreciate very very much.
Best regards
Francine