Skip Navigation

[Resolved] Pagination links not working

This support ticket is created 6 years, 2 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by stephenL-4 6 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#621356

I have a Search View on Post types of Media, where the filters are in a widget area, and the results on its own page called Artworks. If I go to the Artworks page cold, the first page of results is returned (non filtered). In the view, I have configured pagination as "Pagination enabled with manual transition and page reload".

The Loop Output Editor has this code. Basically I am constructing a FooGallery shortcode of all images that satisfy the search, and that all works fine.

[wpv-layout-start]
[wpv-items-found]
[wpv-pager-current-page][wpv-pager-total-pages][wpv-pager-nav-links output="bootstrap" previous_next_links="true" step="10" reach="2"]
<!-- wpv-loop-start -->
[foogallery id="1478" attachment_ids="<wpv-loop>[wpv-post-id],</wpv-loop>"]
<!-- wpv-loop-end -->
[/wpv-items-found]

[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

As I say, everything works fine - page 1 looks as I intended, and there are no errors in the Developer tools console. However, try moving to page 2 by clicking the relevant link, and an error occurs in the console, and nothing happens. This is the error:

wpv-pagination-embedded.js?ver=2.5.2:1899
Uncaught TypeError: Cannot read property 'submit' of undefined
at WPViews.ViewPagination.self.trigger_pagination (wpv-pagination-embedded.js?ver=2.5.2:1899)
at HTMLAnchorElement.<anonymous> (wpv-pagination-embedded.js?ver=2.5.2:2180)
at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3)
at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)

Any idea what I might have done wrong here?

You can look at the front-end page at hidden link but it is password protected whilst in development.
User: elcustomer
Password: 21gaBS167GA

Thanks for your help.

Steve

#621628

Hi,

Just to let you know we are switching themes and may restore back to an earlier point, but the problem I originally asked for help with still persists. Let me know when you are looking at the problem, and I will check it is still there for you to see.

Thanks.

Steve

#621665

The Media Post Type is limitedly integrated with Toolset Views.
While you can query them, most of the times doing so is not what you will need, because in the output it's very limited, also due to WordPress's management of Attachments, which is, slightly said, particular.

This is just as a general heads up.
It is most of the times better to create a post type and attach the images as fields, so to query them later thru the post type, not thru the media type itself.

Anyway, related to the issue you describe, I do not exactly understand the part of the Widget.
It seems to me, you added the Custom Search to the Widget, but the Results to a Post Body.
Is this correct?

I tried to set such a View locally and it worked.

1. I created a View for Media
2. Paginated it
3. Added a Custom Filter
4. Called the results thru the Widget on another page
5. I can paginate correctly.

==> Does the issue also persist with a WordPress Default Theme and NO Plugins BUT the Toolset Plugins?

If not, could you then re-enable the Plugins one after the other, and check the issue each time you enable a plugin?
Please report me when the issue comes back

==> It might also be due to the Theme.
Please do reactivate your Theme only after you are sure the issue isn't coming from a 3rd Party Plugin.

If all this fails - does it still happen with my above exact steps?
If not, how do your steps differ from mine?

According to this, I can then help you to solve the issue or eventually report it to the DEV.

#621827

Hi Beda,

I found the problem. The [wpv-filter-meta-html] shortcode was not in the Filter and Loop Output Integration Editor. I had removed it to prevent the form appearing on the search output page (which works fine until you want to page!!). However, it's okay (and required!) to have it there I believe, and to hide the form, use the [wpv-filter-start hide="true"] shortcode in the Filter Editor.

I think the clue was in the Javascript error I posted where it is basically saying the form is not on the page to invoke again. Making the adjustments above, it works fine in a couple of themes I have swapped around, so all good now.

Thank you.

Steve

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.