Problem/Motivation

If an aggregator page without feed items is requested - e.g. the feed only has a few pages worth of feed items but aggregator?page=10000 is requested - the empty page will be cached by the dynamic page cache without a cache context set. Later requests for aggregator will incorrectly return this empty page.

Steps to reproduce

  1. Install dynamic page cache module.
  2. Request a page beyond the number of feed items available, e.g. aggregator?page=10000; page contents will be correctly empty in this case as there are no feed items to display.
  3. Request a page that should list feed items, e.g. aggregator
  4. The resulting page contents will be empty because the cache of the initial page=10000 is returned.

Proposed resolution

Pager cache context should be set in all cases, even if there are no items being displayed.

Remaining tasks

Review patch.

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 3273873.patch1.27 KBmfb
TEST-ONLY-WILL-FAIL.patch736 bytesmfb

Comments

mfb created an issue. See original summary.

mfb’s picture

StatusFileSize
new1.27 KB
larowlan’s picture

Thanks, we're waiting on help to get tests running on d.o, for some reason the composer facade isn't picking up our dependencies

#3272246: Ensure that aggregator doesn't get special core treatment

mfb’s picture

Ok :) BTW, should I also file this as a bug report + patch for Drupal 9, i.e. are aggregator bugs still being fixed there?

mfb’s picture

larowlan’s picture

I think its more likely to be fixed here, as soon as its installable in D9, I think folks should be able to move

mfb’s picture

Yes core issues seem to be resolved slowly.... well at least I was able to validate the test and patch over there.

mfb’s picture

Anyone interested in a reviewing this patch? It's a pretty simple fix for a fairly critical bug (at least for sites that rely on Aggregator module).

larowlan’s picture

Patch looks good to me, I'll look to commit in the coming fortnight

  • larowlan committed b585b06 on 2.x
    Issue #3273873 by mfb: Aggregator page contents could be empty due to...

  • larowlan committed 89d79bf on 1.x
    Issue #3273873 by mfb: Aggregator page contents could be empty due to...
larowlan’s picture

Status: Needs review » Fixed

Well that was a long fortnight 😆

Fixed thanks, I'll cut a release if the 2.x branch passes tests

mfb’s picture

🎉

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.