Skip Navigation

[Resolved] Infinite scrolling stopped working after latest update of Views

This support ticket is created 6 years, 7 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.

This topic contains 3 replies, has 2 voices.

Last updated by cantonB 6 years, 7 months ago.

Assigned support staff: Beda.

Author
Posts
#370473
Screenshot 2016-02-24 22.39.30.png

Hi there,

I was enjoying infinite scrolling, but I think the last update to views may have broken it (on my site at least.)

For example, on this page:

hidden link

When scrolling to the bottom of the page, additional items were loading fine last week. But this morning I upgraded all my toolset plugins and now I just get a spinner.

#370588

Infinite scroll works perfectly on my Local host.

This must be due to specific settings or issues with a 3rd Party Plugin.

To expedite this and solve the issue ASAP for you, I would need a sites snapshot if possible.
We usually recommend the free Plugin "Duplicator" for this porpoise.

If you already know how Duplicator works
(http://wordpress.org/plugins/duplicator/),
please skip the following steps and just send me the installer file and the zipped package you downloaded.

★ Duplicator Instructions
hidden link
Send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big)

❌ IMPORTANT ❌
Remember to create or keep an admin account for me before creating the snapshot, or I won't be able to login. You may delete the new admin account once the snapshot has been built.

I will enable your next answer as private so you can provide me the information securely.

Please elaborate any our answer exactly where the Infinite Scroll is set up, what fields are involved and any other important details.

Thank you

#370655

OK, I fixed the problem. Here's what happened:

In the latest version of views, the URLs that infinite scrolling uses to retrieve AJAX pagination must have increased significantly in length. On my particular server, there's a limit as to how many chars you can stuff in a GET variable. See this stack exchange for details:

http://stackoverflow.com/questions/7724270/max-size-of-url-parameters-in-get

My solution was to add the following to my php.ini file:

; increase allowance for long GET parameters
suhosin.get.max_value_length=1000

FWIW, I think this may be a serious problem for many of your users, and I suspect it impacts *all* AJAX pagination, not just infinite scrolling. My server is a plain vanilla VPS install from a very respectable web host (liquidweb), which deployed my VPS with the 'suhosin' security patch on PHP/apache. I believe that all hosts running suhosin will have a problem handling view's new bigger AJAX GET variables that have 650+ characters in them.

You can stop reading here unless you'd like to pass on this additional debugging info to your developers.

- Canton

On my local host, if I hit that very long URL, it works, and I get a blob of HTML that contains the view results:

hidden link

Until I added that php.ini code, when I hit that very long URL on my production server, I get a 404

canton$ wget hidden link
The name is too long, 600 chars total.
Trying to shorten...
New name is wpv-ajax-pagination-default.php?wpv-ajax-pagination=7b22616374696f6e223a227770765f6765745f70616765222c2270616765223a31332c22766965775f6e756d626572223a2232313939322d435049443231363336222c227770765f636f6c756d6e5f736f72745f6964223a22706f73.
The name is too long, 600 chars total.
Trying to shorten...
New name is wpv-ajax-pagination-default.php?wpv-ajax-pagination=7b22616374696f6e223a227770765f6765745f70616765222c2270616765223a31332c22766965775f6e756d626572223a2232313939322d435049443231363336222c227770765f636f6c756d6e5f736f72745f6964223a22706f73.
--2016-02-25 07:03:05-- hidden link
Resolving 2016.asiafoundation.org... 67.227.198.7
Connecting to 2016.asiafoundation.org|67.227.198.7|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-02-25 07:03:06 ERROR 404: Not Found.

#370656

FYI I just figured out that the default suhosin max GET variable length is 512, so it's definitely the case that anyone running suhosin out-of-the-box will have problems with any AJAX pagination on views, as well as any other part of your code that's using extremely long GET variable values.

hidden link

Perhaps your developers could confirm for me that setting this value to 1000 is going to be sufficient, forever?