Hello I am using harmonizer filter views, I also use the Views MEFBIS filter block in block module.
  when I put the exposed filter in the block, its not working, the exposed filter value remains empty do not take contextual filter value
Thank you to help me please

Comments

titapita created an issue.

rdeboer’s picture

Hi @titapita,

Until today I had not heard of https://www.drupal.org/project/mefibs, so I can't comment on it right now without installing MEFIBS myself and investigating what's happening.

It sounds like MEFIBS has some overlap with Views Global Filter, https://www.drupal.org/project/global_filter. Maybe you can use Views Global Filter and maybe it works better with Views Filter Harmonizer?

Rik

titapita’s picture

Hello and thank you for your response RdeBoer it'm trying to build a classifieds site, for the publication of advertisements, I use the CCK module and conditional fieds.
To display views, my problem is the search engine for the search depends auss of filtrres example: when the visitor clicks on an automotive category there are filters related to this category (km, brand, model, year), I found a solution for that; I use the dependent views filter module.
I have tested the global search module, it is well but his problem is that he does not support dependent filters.
may be you have a solution for that.

slayer722’s picture

Hello,
I have the same problem when I expose the form in block, the compagnion's exposed filter doesn't take the value.
I think that Views Filter Harmonizer just doesn't support forms in block, am I right ?
Regards

rdeboer’s picture

sjvellenga’s picture

Has there been any progress made on this issue? Exposed filters populate correctly when they are not exposed in a block. As soon as a block is enabled, the value isn't carried over.

Edit: Just noticed in the code that the filter is set twice, the second time to an empty value, as noted in the comments. It appears a fix is implemented, but it doesn't appear to be working?

Edit 2: I think what's happening is that it's performing the filter application on the main load of the view, then setting the values to empty when it prevents them from carrying over on a second page load. When it attempts to load the values for the block, assumedly done in a second view load, it then loads the now empty values and attempts to populate. At least, that's the way I'm reading it...

I think the easiest workaround would be to set the original values into a secondary variable that goes unchanged, and access those while setting the main values as empty in the array preventing them from being used on second load. My knowledge of PHP is limited though, and this looks a bit messy, so not sure if I'll be able to work it myself...

sjvellenga’s picture

Alright, after lots of digging, I've found that the form submit is being run twice. Once for the view, once for the exposed block. After the first run, it's set the variables to empty. Obviously this is a problem when we need the variables again for the second run. Logically, we would want to run the clear for these variables once the full page has loaded, but not sure how we can do that?

In short:

Override the companion contextual filter
When ticked, the contextual filter will apply only on initial page load when the exposed filter has not been applied yet.

Is working as expected, and preventing the contextual filter from applying on subsequent page loads. But it appears that exposed blocks are considered additional pageloads.

I've done the leg work I think, I'm just not 100% sure how to implement a fix for this.

thulenb’s picture

I'd like to use this module on my website but saw this issue. As I use the exposed filters in blocks (MEFIBS module), can somebody tell me if this is still an issue and maybe if there is a solution?

EDIT: I just tried the module and it seems that it's still not working with exposed forms in blocks. Unfortunately, I am not a coder.
@RdeBoer: Am I right that you won't be able to extend your module in order to work with blocks? Would be good to know so I can search for another solution.

Thanks.