Hi Beda,
Thanks for your answer. First, you are correct that Toolset was updated a few months ago from a version that precedes September 27, 2016.
Second, I have a test site up and running and, installed your code and gave it a spin. It seems to work fine - but only in Music. All of the other art forms still behave the same as the live site (links to all of them in the first message in the thread: #575192). Please advise, thanks!
Nadav
Excellent.
I think the issue you find on the posts with other taxonomy terms, is because those are own other pages (the searches) and the code needs to be run there as well.
Please let me investigate this and update you.
Hi Beda,
Just to clarify: all the different art forms are running the same View, initially filtering artform via the shortcode. Then, the AJAX filter for each artform has both “shared” items (Type and Country) as well as unique drop downs for each art form (such as Instrument and Genre in Music, and Speciality in Visual Arts, etc)
Looking into your code now, I'm seeing this line:
$neede_meta_keys = "'wpcf-instrument','wpcf-music-genres'"; //excluded metas ,'wpcf-artist-type','wpcf-country'
Maybe that's the issue? It seems to pick up only music related fields.
Hi Beda,
I figured why not try to add the remaining field names to the line so that it looks like this:
$neede_meta_keys = "'wpcf-instrument','wpcf-music-genres','wpcf-theater-specialty','wpcf-theater-style','wpcf-dance-specialty','wpcf-dance-style','wpcf-film-specialty','wpcf-film-genre','wpcf-visual-arts-specialty'"; //excluded metas ,'wpcf-artist-type','wpcf-country'
Now, it seems to work fine on my test site. However, if I follow your instructions (from message #580166) and remove the code after navigating to each of these pages, and then add *new* artists, those new artists are not filtering correctly. Does that mean I would need to keep the code in functions.php? Is this a code that can stay on the site or is it only meant to be used and then removed?
Many thanks,
Nadav
I misunderstood initially.
Hence yes, this is the right solution:
https://toolset.com/forums/topic/ajax-filter-not-working-properly/page/4/#post-580727
Now, adding new items should not provoke the issue.
But, as a senior developer found out yesterday, there is a BUG since a while in Views, and it produces what you see.
We are already working on this now. For you, right now, I think the best would be to run the code when you add new fields.
The problem is that you probably still have "save 0 to the database" in your Fields settings.
And it seems that Views reads this wrong.
If you can wait for a fix, I would suggest to not add new posts right now. I will push for a fast fix
Hi Beda,
New artists are added by the artists themselves, not me. I can’t prevent people from doing that on the live site.
Since you are working on fixing this bug, I will wait for your solution before changing anything on the live site.
Thanks,
Nadav
Hi Beda,
Just following up, is there news about our issue?
Also, should I avoid updating Toolset plugins on the live site in the meanwhile?
Thanks,
Nadav
There is a fix planned for the upcoming release of Views 2.5.1
I cannot yet produce an erratum (hot fix) for this.
I will update you immediately when I have an official fix.
Thanks Beda, keep me posted.
Hi Beda, following up, any news on the solution / estimated time for release date with bugfix?
Hi Beda, following up again as I haven't received any response from you. Please let me know where this issue stands, thanks.
I am sorry, this ticket escaped my attention as it's escalated to the Developers, and there has been no solution so far. Hence I did not update here.
I pushed (again) for a prompt solution.
The issue is planned to be fixed in the upcoming Views release 2.5.2
I apologize that my hands are bound, I cannot accelerate this more than I did.
I keep pushing for a fast solution and will update you here as soon I have something to provide to you.
Hi Beda, thanks for your answer. When is Views 2.5.2 due?
Hi, it's been two and a half weeks since my last message and over two months since I brought up the issue for the first time. I haven't seen any solution until now, can you please give me a clear estimate for when you can solve this? My client – and my company – are very upset and unsatisfied with this situation.