When the Views content cache is enabled the pager of the view doesn't work properly: it always shows the same content across all pages instead of estimated different content.

Comments

Hamulus created an issue. See original summary.

vivekag’s picture

+1

yuraosn’s picture

I have the same problem, the same content is output when pagination and when using the "views_infinite_scroll"

yuraosn’s picture

StatusFileSize
new2.09 KB

The problem is revealed:
- download views
- a key is generated to create the cache from the arguments set in the views
- The cache is saved under this key.
- go to another page in the pagination
- a key is generated from the arguments set in the views
- the key does not get the argument of the page number of the pagination - so the old cache views is loaded and therefore the same thing is loaded.
"Views_infinite_scroll" loads in the same way using pagination, so also as pagination does not work.

Fix this problem, create a patch.

!!! Pay attention to the fact that my module is in the folder ".../contrib/..." so the path with the patch may need to be changed.

yuraosn’s picture

Assigned: Unassigned » yuraosn
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: views_content_cache--added-cache-key.patch, failed testing. View results

summit’s picture

Hi,
This seems to work. Ok to set it to next phase?
greetings, Martijn

glynster’s picture

+1 this patch works a treat. We need to get this committed!

yuraosn’s picture

Assigned: yuraosn » Unassigned
teknikqa’s picture

Corrected patch so that it applies properly

teknikqa’s picture

Status: Needs work » Needs review
summit’s picture

Hi, I see that this patch is committed in dev!
greetings, Martijn

summit’s picture

Status: Needs review » Fixed
teknikqa’s picture

Status: Fixed » Needs review

This has not been committed. This patch is required to fix the pagination issue.

I have been using this successfully on a couple of sites. But I would prefer a second set of eyes to review it.
I'm reverting the status to Needs Review.

glynster’s picture

@teknikqa we have been using this in production and it sorted the issue for us. RTBC +1 please!