Aggregator page contents could be empty due to missing cache context
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3273873. --> Reported by: [mfb](https://www.drupal.org/user/12302) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>If an aggregator page without feed items is requested - e.g. the feed only has a few pages worth of feed items but <em>aggregator?page=10000</em> is requested - the empty page will be cached by the dynamic page cache without a cache context set. Later requests for <em>aggregator</em> will incorrectly return this empty page.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Install dynamic page cache module.</li> <li>Request a page beyond the number of feed items available, e.g. <em>aggregator?page=10000</em>; page contents will be correctly empty in this case as there are no feed items to display.</li> <li>Request a page that should list feed items, e.g. <em>aggregator</em></li> <li>The resulting page contents will be empty because the cache of the initial page=10000 is returned.</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Pager cache context should be set in all cases, even if there are no items being displayed.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Review patch.</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>None.</p> <h3 id="summary-api-changes">API changes</h3> <p>None.</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>None.</p> > Related issue: [Issue #3273876](https://www.drupal.org/node/3273876)
issue