I am trying to: After updating a filter stopped working
Link to a page where the issue can be seen: hidden link
I expected to see: only doctors in that filter, 4 doctors: hidden link
Instead, I got: A list with all doctors not filtered
Hi, the first thing I see when I log into the site is a message that Toolset needs to update the database . Have you made a backup of the site? If you have a backup, I suggest running the database update mentioned in the big notice at the top of the Toolset dashboard page. Once updated, we can look at the filters here.
Hi, backup done and database updated 🙂
but still not working as expected, could you have a look please?
thanks
I don't see anyting obviously wrong here, the View's post relationship filter is set up to respond to a shortcode attribute and that seems to be in place in the Divi design. I'd like to run some additional tests by creating a site clone and installing it in my local environment. I wanted to get your approval first, since I'll need to install the Duplicator plugin to create that site clone. Let me know if you approve, and I can get started.
You say: "the View's post relationship filter is set up to respond to a shortcode attribute and that seems to be in place in the Divi design", but is not <b>filtering</b>.
I explain myself again in case before was not clear: The thing wrong is that here: hidden link
I have a filter to show only doctors from the 304 especialty:
{!{wpv-view name='lista-de-especialistas-by-especialidad-policlinicas' especialidad='304'}!}
but instead of filtering the shortcode is showing the full doctors list. To be working fine it should show only these 4 doctors: hidden link
but instead, I get a full list, so filter is not working properly.
yes, you have my approval for installing that plugin 🙂
Thanks for your time and your attention.
Yes thanks for the details and clarification, I understand the problem is that this View is not filtering correctly based on the post relationship filter shortcode attribute. I will create the site clone and continue my investigation.
Okay after installing the site clone and running some tests, I was able to find the source of the problem. It seems that this View includes a front-end post relationship filter shortcode:
[wpv-control-post-relationship ancestors="especialidad@especialidad-de-especialista.parent" url_param="wpv-relationship-filter"]...[/wpv-control-post-relationship]
However, since you have implemented a shortcode attribute for the post relationship filter, this shortcode should be removed from the View's Búsqueda y paginación editor. The filter shortcode is overriding the shortcode attribute, and causing a problem in the filtering system. In my local clone, I was able to fix the problem by removing the shortcode. May I try removing the shortcode on the live site to see if the problem is resolved? Or you can try to remove the shortcode if you'd prefer. Be sure to remove the closing shortcode as well as the opening shortcode.
yes, you have permission to try to remove the shortcode on the live site 🙂
thanks
Okay great, thanks. This seems to have resolved the problem on the live site. Old code:
[wpv-filter-start hide="false"]
[wpv-filter-controls]
[wpv-control-post-relationship ancestors="especialidad@especialidad-de-especialista.parent" url_param="wpv-relationship-filter"]
<div class="row filters_container">
<div class="col-md-5">
<div class="form-group">
<div class="select_container">
[aseguradoras-select label="Filtrar por aseguradora" class="select_filter"]
</div>
<div class="submit_container">
[wpv-filter-submit name="Aplicar filtro" output="legacy" class="submit_filter"]
</div>
</div>
</div>
<div class="col-md-5 col-md-offset-2">
<div class="form-group">
<div class="search_container">
[wpv-filter-search-box output="legacy" class="search_filter" placeholder="Introduce un nombre a buscar"]
</div>
</div>
</div>
</div>
[/wpv-control-post-relationship][/wpv-filter-controls]
[wpv-filter-end]
New code:
[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="row filters_container">
<div class="col-md-5">
<div class="form-group">
<div class="select_container">
[aseguradoras-select label="Filtrar por aseguradora" class="select_filter"]
</div>
<div class="submit_container">
[wpv-filter-submit name="Aplicar filtro" output="legacy" class="submit_filter"]
</div>
</div>
</div>
<div class="col-md-5 col-md-offset-2">
<div class="form-group">
<div class="search_container">
[wpv-filter-search-box output="legacy" class="search_filter" placeholder="Introduce un nombre a buscar"]
</div>
</div>
</div>
</div>
[/wpv-filter-controls]
[wpv-filter-end]
Now I see 4 posts appear in the results. Let me know if i've overlooked anything.
great Christian!
thank you very much for your help 🙂