Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi!
The selected value of the filter is not applied to the site immediately. After selecting a filter (by pressing the "Apply"), the page is reloaded, but it's not enough. We need to reload it again to filter in force.
In this case, if the filter is set via a link (for example, through the <a href="http://mysite.com.au/music?field_city=2"> select a city </ a>
), filtered fires immediately.
Comments
Comment #1
RdeBoerI thought I'd fixed that.
Are you on 7.x-1.9 as this issue suggests? Or on 7.x-1.10 ?
Can you please try 7.x-1.x-dev?
If that doesn't work "out of the box", then use the following workaround (using 7.x-1.x-dev):
Put this line in your index.php:
variable_set('global_filter_visible_filters_only', FALSE);
// (EDITED)After you have refreshed the page, you can remove the above line, if it bothers you.
Or using the the database directly, set the variable 'global_filter_visible_filters_only' in the {variable} table to 0, e.g using phpMyAdmin or similar.
If that doesn't work, then I don't know...
Please let us know how you went....
Rik
Comment #2
shevgenyUpdated to dev-version. All the same. Added the line in index.php in a directory for the main site - an error Ajax. Delete the line - no error, but the situation former. Climbed into the database, you could not find the specified string ('global_filter_visible_filters_only' in the {variable} table)
Comment #3
shevgenyComment #4
RdeBoerSorry that should have been this line:
Insert it into the index.php the line just before last, that is just above the line:
So your index.php looks like this:
Then when you're happy it's all working, remove the variable_set(...) line and it will continue to work fine.
Comment #5
shevgenyThanks, it works!
Comment #6
RdeBoerYAY!
Ok, so we have a problem with core's block visibility function (that's what Views Global Filter uses to decide which filters need to be set...).
May have to either figure this out and fix this in core or make the workaround of #4 a configuration option in the Views Global Filter module...
Rik
Comment #8
akumajfr CreditAttribution: akumajfr commentedAny update on this by chance? I'm having the same issue, and adding the variable_set line to my index.php works, but I'd rather not alter core files.
Thanks!
Comment #9
RdeBoerRe #8
As mentioned, you can remove that line and your global filters will continue to work.
Rik
Comment #10
t.eshqair CreditAttribution: t.eshqair commentedplease give a help :(
I have the same issue and tried to change the index.php as mentioned it doesn't make any change ,
I also tried to change it once and doesn't work.
so I would change that variable immediately from variables table as mentioned but I have found that I cant change or edit data in this table so what should me do , please help !!
Comment #11
RdeBoerHi t.eshqair,
So you used the development snapshot, right? Don't use the official release for this fix.
Then you followed the instructions in #4 of this thread, right?
And you're finding that the filter does not work immediately after you've changed it, but DOES work after you have subsequently refreshed the page?
There's probably something else wrong with your setup.
Please explain clearly what your global filter is and how it is configured.
Do you have a test site I can log into?
Rik
Comment #12
RdeBoerFixed in 7.x-1.11 via the newly introduced "Optimise" checkbox on the View Global Filter configuration page.
Comment #13.0
(not verified) CreditAttribution: commentederror text