Skip Navigation

[Closed] AJAX pagination does not work with nested view

This support ticket is created 2 years, 4 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Shane 2 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#2425313

Meg
view-with-nested-view.png
template-page-with-views.png
ajax-automatic-pagination-on-view.png

Hi,
I have a page with a lot of "views" inside.
Some of these "views" have nested "views" inside them, too.
The query on this page results to be too heavy and sometime gets error 500 at loading.
I tried to set "Pagination enabled with automatic AJAX transition", anyway the single view displays just the number of items set in the field "items per page" and does not load all the other elements via AJAX.
I attach some screenshots.
Is there a way to fix this?

I recreated the same problem on a test site.
How can I send you the credentials?

Thank you for support

#2425781

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

Please where applicable please provide me with a link to an example page where I can see the issue.

I've enabled the private fields for your next response.
Thanks,
Shane

#2426623

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

The pagination is working.

You will need to add the pagination to the view that is displaying the actual data. If you take a look at your page under the CIRCOLARI tab you will see that i've added the pagination.

The pagination was added to this view below that is displaying the data list.
hidden link

Thanks,
Shane

#2426661

Meg

Thank you for your reply

I added pagination even to this view:
hidden link
I noticed that sometimes the transition is very slow.
Is there a way to speed up it?

thank you

#2426705

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Unfortunately no unless you're using caching on your website.

You may not have a large web page itself but you have several views on the page and each view is nested inside another view so it's quite a bit of data being requested from the database so slow down in a case like this is something that is expected.

Thanks,
Shane

#2428645

Meg

Hi Shane,
I have a different problem in this page and pagination does not load for users different than administrator.
Can I give you example credentials?

#2429785

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Yes provide the credentials for the account that doesn't show the pagination.

Thanks,
Shane

#2431975

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thanks I was able to see the issue.

Can you check the server's php log as well as the mysql logs to see if there are any errors being generated there in regards to this?

My theory here is that this page has far too much data being loaded so it is causing the server to time out on the data requests.

Thanks,
Shane

#2432011

Meg

Hi Shane,

at this moment I can't be able to access server's php log and mysql logs, I will be out of the office until 08/29.
I enabled "define('WP_DEBUG', true);" on "wp-config.php" and I don't see errors.
Anyway if you browse the page as "administrator" or "editor" role the pagination works correctly.
The problem exists with "Agenti IT" custom role

thank you

#2432155

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Meg,

Because of how your view is setup I suspect that the user roles will get slightly different data being listed out in the views. So we need to see if there is an error being thrown in the logs.

The view does paginate, however it hangs when wanting to load the new page.

Thanks,
Shane

The topic ‘[Closed] AJAX pagination does not work with nested view’ is closed to new replies.