Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, apologised if there's similar issue like this posted before.
Anyway, there's a slight problem where there's additional "&" (ampersand) appear in the paging URL every time I added exposed filter with multiple selection, so the URL to go to the next page would be something like this below:
http://testdomain.dev/test-test?&&&page=2
Please see image screenshot for reference.
The problem it's on ver. 7.x-3.7, but still occur even after I upgraded to 7.x-3.8.
Anyone encounter this before? and what could be the solution?
Thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#28 | views-2276889.patch | 696 bytes | Sergei Churilo |
#20 | Untitled.png | 23.06 KB | joshi.rohit100 |
#18 | views-2276889.patch | 535 bytes | jfurnas |
#16 | views-2276889.patch | 530 bytes | jfurnas |
Capture2.JPG | 13.1 KB | ardnet |
Comments
Comment #1
ardnet CreditAttribution: ardnet commentedComment #2
ardnet CreditAttribution: ardnet commentedComment #3
diquinnyonk CreditAttribution: diquinnyonk commentedhaving the exact same issue! no idea when I click on a pager it throws the extra &&&& in.
If I remove them all page still loads relevant stuff.
no idea currently. Hope someone has an idea
Comment #4
nkanderson CreditAttribution: nkanderson commentedComment #5
nkanderson CreditAttribution: nkanderson commentedI'm running into this issue using Views 7.x-3.11 and Panels 7.x-3.5, with an exposed form in one panel pane and a view with an attached view in another panel pane. The unnecessary ampersands in the pagination links are coming from line 90 in
views/theme/theme.inc
:$vars['pager'] = $view->query->render_pager($exposed_input);
In troubleshooting, if I pass in an empty array instead of
$exposed_input
, the pager links render as expected, and the exposed filter parameters are added correctly to the pagination links. I'm not sure what the ultimate solution is, but will post back if I dig into it enough to find out.Comment #6
fox mulder CreditAttribution: fox mulder commentedThe issue still exists using Views 7.x-3.13 and Panels 7.x-3.5
Comment #7
jfurnas CreditAttribution: jfurnas commentedDuring my testing, I discovered that $exposed_filters was always returning true, even if no exposed filters were selected. This resulted in a multi-level array of empty values, therefore evaluating $exposed_filters to true all the time. The fix loops through the $exposed_filter array, and removes any empty arrays, and if the entire array is empty, results in an empty array, causing the extra &'s to be removed as well.
Comment #8
jfurnas CreditAttribution: jfurnas commentedComment #10
jfurnas CreditAttribution: jfurnas commentedComment #12
jfurnas CreditAttribution: jfurnas commentedLast patch failed for some reason, trying a new one.
Comment #14
jfurnas CreditAttribution: jfurnas commentedComment #16
jfurnas CreditAttribution: jfurnas commentedSorry guys, i'm new to this.
Comment #18
jfurnas CreditAttribution: jfurnas commentedComment #20
joshi.rohit100It is failing due to the second callback paramater. Even its failing on my local
Comment #21
jfurnas CreditAttribution: jfurnas commentedI have given up attempts to solve this issue. I have been unable to replicate this error on any drupal installation I have, and I have tested it on 10 to this point.
Comment #22
joshi.rohit100i will give it a try.
Comment #23
cbeier CreditAttribution: cbeier commentedA small workaround for the problem:
Comment #24
zalak.addweb CreditAttribution: zalak.addweb commentedComment #25
riddhi.addweb CreditAttribution: riddhi.addweb commentedComment #26
Sergei Churilo CreditAttribution: Sergei Churilo commenteddel
Comment #27
Sergei Churilo CreditAttribution: Sergei Churilo commenteddel
Comment #28
Sergei Churilo CreditAttribution: Sergei Churilo commentedComment #29
djdevinThis still happens and messes up some web crawlers as they don't understand the "?&&" in the URL for the clicksort/pager links. They start going in loops.
The patches fix the pager, but clicksort is also broken.
This is very easy to reproduce:
1. Install Drupal
2. Enable views_ui
3. Add a select field to basic page content with some options
4. Create a bunch of basic pages
5. Create a table view of basic pages
6. add a filter with the field in #3
7. Set that filter to exposed, allow multiple options
8. Edit the table's settings and enable clicksort on some fields
9. Go to the view and check out the clicksort/pager links. They will look like ?& with a & being added for every multiselect filter.
EDIT:
Correction, the pager is fixed in 3.16 #2315365: Pager should be built with view::get_exposed_input(), not $view->exposed_raw_input.
Clicksort is still broken.
Comment #30
djdevinOpened #2948467: Clicksort URLs broken with multiple select exposed filters for the clicksort issue.
Comment #31
djdevinComment #32
apaderno