Reviewed & tested by the community
Project:
Views Display Tabs
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2010 at 20:02 UTC
Updated:
24 Aug 2015 at 13:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Sinan Erdem commentedSubscribing.
Comment #2
ruphus commentedSubscribing
Comment #3
Nipsting commentedLooking for a solution to the exact same problem myself.
Have 3 pages in a views setup and all of them have the same exposed filters applied, and the filters reset when I click another tab.
Comment #4
solipsist commentedDid you set the exposed filters for the default display and have the displays shown as tabs inherit the filter? If you set up the filters manually for each display they will all have different IDs.
Comment #5
Sinan Erdem commentedIf you mean "Filter identifier" by "ID", then I have checked each exposed filter for each display and they have the same Filter identifier.
I also tried the patch on issue #619400: Exposed filter block but it doesn't seem to work...
Any ideas?
Comment #6
Sinan Erdem commentedI think the problem is:
When I click a tab, it links to a url like: www.example.com/?vdt=my_views_name|block
But exposed filters need to have a url like: www.example.com/?tid=1
I confirm that a url of the combination of two of them, like: www.example.com/?tid=1&?vdt=my_views_name|block
works perfect.
Is it possible to do this?
Comment #7
ruphus commentedChanging line 103 in viewsdisplaytabs.module from
$displays[$group][] = theme('viewsdisplaytabs_tab', $title,$_GET['q'], $view->name, $display_name, $active);
to
$displays[$group][] = theme('viewsdisplaytabs_tab', $title,"http://".$_SERVER["SERVER_NAME"].preg_replace("!(.*)(&vdt.*)!","$1",urldecode($_SERVER["REQUEST_URI"])), $view->name, $display_name, $active);
Seems to do the trick, albeit creating a javascript error.
It's a quick and dirty fix not properly tested and probably will not work with ajax enabled.
-William
Comment #8
dobe commentedsubscribing
Comment #9
dobe commentedI worked on this a little and came up with a small solution I think. It does need some work thats for sure. I am pretty sure I did not create this patch correctly working on figuring out how to do these things properly.
Comment #10
dobe commentedLOL that didn't work try this one.
Comment #11
foredoc commentedAny updates on this? Thanks.
Comment #12
hanamizuki commentedsubscribe
Comment #13
bomari commentedany one try to disable the AJAX for one of the tabs , try it
if you have two tabs just edit the view and disable ajax from the Basic settings for one of the tabs
Comment #14
devkinetic commentedlooking for an update as well...
Comment #15
devkinetic commentedI encountered this bug yesterday and wanted to follow up with my workaround (not a fix, just worked for me). What I did is modify the setup my second view and added what was my exposed filter as an argument.
This is ugly, but in the module's javascript around line 94 I retrieved the value of the exposed filter field if it existed, and set it to the hidden input for arguments to be passed when the form is executed.
I had to wrap the javascript below in the php designation to get everything to display right, but be assured this is javascript, not php.
I should note that if you do anything like this you move your module from modules/contrib to modules/custom because if you update the module it will remove your code.
Comment #16
ChrisValentine commentedI notice that when you click the tabs it generates a JavaScript error:
Error: TypeError: this.submitForm is not a function
Source File: http://mydomain/sites/all/modules/viewsdisplaytabs/viewsdisplaytabs.js?u
Line: 110
...which suggests that its trying but failing to re-send the exposed filters search form. My filters are in a block - not sure if that's relevant.
Drupal - 6.24
Views - 6.x-2.16
Views Display Tabs - 6.x-1.0-beta6
Views Tabs - 6.x-1.x-dev
Better Exposed Filters - 6.x-2.0-beta1
Comment #17
acrollet commentedpatch attached for 7.x, based off of #10
Comment #18
acrollet commentedslightly updated patch attached.
Comment #19
solipsist commentedThanks for the patch!
Comment #20
mediaformat commented