Views pager is using exposed_raw_input instead of exposed_input

Created on 30 March 2017, over 7 years ago
Updated 25 February 2023, over 1 year ago

I am having the same issue with views and explosed multiple selection filters as mentioned here: https://www.drupal.org/node/2315365 โ†’

I changed the following line in \Drupal\views\Plugin\views\display\DisplayPluginBase:2172
$exposed_input = isset($view->exposed_raw_input) ? $view->exposed_raw_input : NULL;
to
$exposed_input = $view->getExposedInput();

This also fixed the issue. Could this be applied to Drupal 8 core?

๐Ÿ› Bug report
Status

Fixed

Version

9.5

Component
Viewsย  โ†’

Last updated about 3 hours ago

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium yassin.barrani

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    Rerolled for 9.5 and later (hopefully), updating the tests to work again, looks like classes and also timezone handing changed.

    Tests still pass without the fix, see #13/#14, but one option would be to get this committed, then we have test coverage once that issue lands?

  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands Lendude Amsterdam

    +1 for just adding the coverage here to avoid the chicken/egg problem. The test might not prove the bug, but it does give more confidence that we aren't breaking anything.

    +++ b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php
    @@ -99,7 +99,7 @@ public function testBasicPagination() {
         // Test that no unwanted parameters are added to the URL.
    -    $this->assertEquals('?status=All&type=All&langcode=All&items_per_page=5&order=changed&sort=asc&title=&page=2', $link->getAttribute('href'));
    +    $this->assertEquals('?status=All&type=All&langcode=All&items_per_page=5&order=changed&sort=asc&page=2', $link->getAttribute('href'));
    

    Sorta gave me pause, since this removes more unwanted parameters, so how come this wasn't removed before? Since it's empty, it looks ok, but still an unexpected side effect I think?

  • First commit to issue fork.
  • @kunal_sahu opened merge request.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kunal_sahu Karnataka

    Hi I have created a MR . Please Merge . Thanks

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone

    @kunal_sahu, I am removing credit per How is credit granted for Drupal core issues โ†’ .

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    > Sorta gave me pause, since this removes more unwanted parameters, so how come this wasn't removed before? Since it's empty, it looks ok, but still an unexpected side effect I think?

    Yeah, looks like the different kinds of exposed input things handle empty parameters differently, I think that's an acceptable change and based on you setting it to RTBC, I assume you agree :)

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom alexpott ๐Ÿ‡ช๐Ÿ‡บ๐ŸŒ

    Committed and pushed a487817dbe to 10.1.x and 9041793c01 to 10.0.x. Committed 3664a3d and pushed to 9.5.x. Thanks!

  • Status changed to Fixed over 1 year ago
  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡นPortugal dxvargas

    The tests are now fixed in #32, good!
    For the rest, it is the same fix as before (#25), that was already reviewed by the community.
    Let's move back the issue to RTBC.

  • Status changed to Fixed over 1 year ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom alexpott ๐Ÿ‡ช๐Ÿ‡บ๐ŸŒ

    @dxvargas the patch committed from #32 includes the fix as was.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany luenemann Sรผdbaden, Germany
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024