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.
I found that Ajax facets doesn't respect values of exposed form if view works by ajax. It requires correction.
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen Shot 2015-10-21 at 4.54.33 PM.png | 158.11 KB | veronicaSeveryn |
Comments
Comment #2
eugene.ilyin CreditAttribution: eugene.ilyin commentedCorrected. Now ajax facets should respect values of the exposed form for both modes of view (ajax/not ajax).
Comment #4
eugene.ilyin CreditAttribution: eugene.ilyin at DrupalJedi commentedComment #5
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedComment #6
veronicaSeveryn CreditAttribution: veronicaSeveryn at Inclind Inc commentedSomehow I cannot make any of it work together.
I have a View (searchAPI index) utilizing AJAX and an exposed filters form (in a block).
The facets are on the same view page, most of them are simply Select boxes.
I have tried both Views version = "7.x-3.11 and version = "7.x-3.11+28-dev" (the DEV version contains a fix for AJAX to work with exposed filters form presented in a block).
Ajax_facets installed is version = "7.x-3.4". No extra patches applied.
But it doesn't work.
When only facets or only exposed filters utilized by itself, the view is updating via AJAX fine. But when you first use either facet or a filter, and then the other kind, the view will render no results (debuggin shows the query being built contains different values for the same field presented as exposed filter and as a facet). In addition, clicking facets will not trigger exposed filters values on the form to show the same selection, and vice versa.
Comment #7
veronicaSeveryn CreditAttribution: veronicaSeveryn at Inclind Inc commentedComment #8
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedThx for the report. Seems this module is popular in your company. Nick also used it :)
I'll try to find time for this issue in the next several days.
Comment #9
veronicaSeveryn CreditAttribution: veronicaSeveryn at Inclind Inc commentedThanks, will be awesome :) I am trying to find a solution for a few days now, but cannot detect what is missing..
In my case the goal is to make exposed filters work with facets for the same fields: e.g. If I have an exposed filter for the field field_price_value, and I also have a facet for the same field, I need to make sure they work together when on the same view.
Comment #10
veronicaSeveryn CreditAttribution: veronicaSeveryn at Inclind Inc commentedFirst issue I finally found was on line #201 of ajax_facets.module file. A wrong wrapper ID was created for AJAX replace commands.
So, instead of this:
$commands[] = ajax_command_replace("#$id", $content);
it should have been this:
$commands[] = ajax_command_replace("#$id" . "-wrapper", $content);
In the end, I think I have made it work somehow.. But in my case I have already been utilizing EXPOSED_FACETS module (significantly modified on my side).. So I made a few adjustments in both modules and it seems to work.. Not the best elegant solution, but until we have something better than this :) maybe you will be able to provide a better solution without extra modules involved.
Comment #12
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commented@Veronica I agree with your advice in #10 but errors in #6 and #9 isn't reproduced for me :-\
Can somebody check this problem?
Comment #13
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedAny news here? Or maybe should I close the issue cuz problems are not reproduced?
Comment #14
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedComment #15
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedSeems partially corrections are enough.