Verified Commit b585b06b authored by mark burdett's avatar mark burdett Committed by Lee Rowlands
Browse files

Issue #3273873 by mfb: Aggregator page contents could be empty due to missing cache context

parent 4de68dd3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,8 +73,8 @@ class AggregatorController extends ControllerBase {
    if ($items) {
      $build['items'] = $this->entityTypeManager()->getViewBuilder('aggregator_item')
        ->viewMultiple($items, 'default');
      $build['pager'] = ['#type' => 'pager'];
    }
    $build['pager'] = ['#type' => 'pager'];
    return $build;
  }

+2 −0
Original line number Diff line number Diff line
@@ -99,6 +99,8 @@ class AggregatorRenderingTest extends AggregatorTestBase {
    $feed = $this->createFeed();
    $this->updateFeedItems($feed, 30);

    // Request page with no feed items to ensure cache context is set correctly.
    $this->drupalGet('aggregator', ['query' => ['page' => 2]]);
    // Check for presence of an aggregator pager.
    $this->drupalGet('aggregator');
    $this->assertSession()->elementExists('xpath', '//ul[contains(@class, "pager__items")]');