Skip to content
Snippets Groups Projects
Commit c8c538e7 authored by catch's avatar catch
Browse files

Issue #3323574 by lobodakyrylo, the_g_bomb, phthlaap, oily, vinmayiswamy,...

Issue #3323574 by lobodakyrylo, the_g_bomb, phthlaap, oily, vinmayiswamy, smustgrave, codebymikey, lendude: Pager not working correctly in AJAX view with exposed filters
parent 401a157f
No related branches found
No related tags found
4 merge requests!5423Draft: Resolve #3329907 "Test2",!3478Issue #3337882: Deleted menus are not removed from content type config,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!579Issue #2230909: Simple decimals fail to pass validation
Pipeline #453863 passed with warnings
Pipeline: drupal

#453882

    Pipeline: drupal

    #453868

      ......@@ -79,7 +79,7 @@
      // Remove the question mark and Drupal path component if any.
      queryString = queryString
      .slice(1)
      .replace(/q=[^&]+&?|&?render=[^&]+/, '');
      .replace(/q=[^&]+&?|page=[^&]+&?|&?render=[^&]+/, '');
      if (queryString !== '') {
      // If there is a '?' in ajaxPath, clean URL are on and & should be
      // used to add parameters.
      ......
      ......@@ -616,3 +616,47 @@ display:
      - user.permissions
      max-age: 0
      tags: { }
      page_2:
      id: page_2
      display_title: 'test pagination with filter'
      display_plugin: page
      position: 2
      display_options:
      pager:
      type: full
      options:
      offset: 0
      pagination_heading_level: h4
      items_per_page: 2
      total_pages: null
      id: 0
      tags:
      next: 'Next ›'
      previous: ' Previous'
      first: '« First'
      last: 'Last »'
      expose:
      items_per_page: true
      items_per_page_label: 'Items per page'
      items_per_page_options: '2, 5, 10, 25, 50'
      items_per_page_options_all: false
      items_per_page_options_all_label: '- All -'
      offset: false
      offset_label: Offset
      quantity: 9
      defaults:
      pager: false
      display_description: ''
      display_extenders: { }
      path: test-content-ajax-filter
      cache_metadata:
      max-age: 0
      contexts:
      - 'languages:language_content'
      - 'languages:language_interface'
      - url
      - url.query_args
      - user
      - 'user.node_grants:view'
      - user.permissions
      tags: { }
      ......@@ -259,4 +259,22 @@ protected function assertNoDuplicateAssetsOnPage(): void {
      }
      }
      /**
      * Tests when a user navigates directly using a page number parameter.
      */
      public function testPaginationAjaxWithTitleFilter(): void {
      // Visit the page url /test-content-ajax-filter?page=3.
      $this->drupalGet('test-content-ajax-filter', ['query' => ['page' => 3]]);
      $session_assert = $this->assertSession();
      $page = $this->getSession()->getPage();
      // Filter by title using the exposed form.
      $session_assert->elementExists('css', 'input[name="title"]')->setValue('Node 11 content');
      $session_assert->elementExists('css', 'input[value="Filter"]')->click();
      $session_assert->assertWaitOnAjaxRequest();
      $rows = $page->findAll('css', 'tbody tr');
      $this->assertStringContainsString('Node 11 content', $rows[0]->getHtml());
      }
      }
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Please register or to comment