Home › Toolset Professional Support › [Resolved] Views Search – show no results until search option entered, and add pagination
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Tagged: Custom search, Views, Views plugin
Related documentation:
This topic contains 30 replies, has 3 voices.
Last updated by zacharyL 5 years, 8 months ago.
Assisted by: Nigel.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Yes, sorry, that's all that was involved.
It is more nuanced than disabling ajax if you have Beaver Builder installed: just because you have BB active doesn't mean that you will necessarily use it to design the output of a paginated View. Given the layout of the View edit screen, you are likely to have set up your pagination before you get as far as designing the output (and choosing whether to use BB or not).
However, I will provide feedback to the developers that we have a usability issue here, and see what they come up with.
Thanks Nigel. Really hoping Ajax can be made to work with BB etc in the future. I added a Search button (submit) and set that to cause the page to reload, and that works for now.
Thank you,
Mark
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Actually Mark, it looks like we have a current issue where Forms is causing this ajax-related issue.
You could see if (with ajax enabled) disabling Forms fixes the problem.
If so I can add your ticket to the same internal thread where this is reported.
I tested on my dev site and disabling the forms plugin and then testing this with Ajax enabled didn't seem to fix the problem.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Mark
I re-tested on a clean install, with just Types, Views and Beaver Builder, and confirm that the styling is lost after an ajax update for pagination or results filtering.
My mistake earlier, I was thinking of other page builders when I said it wasn't expected to work. Beaver Builder *has* an extra layer of integration for this to work, but it seems it got broken fairly recently.
I've added your thread to the internal ticket along with some explanatory comments to clarify what is required to reproduce the problem.
Hey Nigel,
Thanks for following up about this. This makes sense, as I believe it was working for me, but when we were working through another ticket and I updated all plugins (Toolset included), this began to occur.
Do we have an idea as to when this might be rectified?
Cheers,
Mark
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Sorry I don't, but I am pushing the internal ticket which seemed to get fixated on the Forms issue, and I have pointed out that this is a more general problem that needs addressing.
Thank you Nigel!
Hey Nigel,
Do we have any updates on this?
Cheers,
Mark
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Sorry, no. I checked the internal ticket and there is no progress to date (it is just one of the reported issues).
You'll need to avoid using ajax until it is fixed.
Hey Nigel,
Applied Types 3.2.5 and Views 2.7.3 today. Enabling Ajax results seems to work correctly with Beaver Builder built layouts, which is great.
I then went and tried to re-enable the filter you provided to force no results until a search option was entered. This unfortunately did not preserve the Beaver Builder styling. Is there a way to make this play nice with the layout/templating of Beaver Builder?
Cheers,
Mark
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Mark
Let me be clear about this, as I'll need to set up a test with the updated plugins to try and reproduce.
The escalated issue was that Beaver styling was lost when paginating to the second and subsequent pages of results, if updating the results via ajax.
Last week's plugin updates fixed this.
But now you are saying that the code I provided to not show any results until one of the search filters had been used is interfering in this. Disable the code snippet and the Beaver styling works on paginated results. Enable the same code snippet and it does not. (This implies that a filter has been set, otherwise no results would be displayed to paginate.)
Is that the issue?
I can't see how that code snippet could affect the Beaver pagination issue (it only does anything when no filter is applied, and to be using pagination a filter must have been applied), so I want to be sure that the description of the problem is accurate, and that when you are disabling the code snippet it is really only that code snippet involved and not some other custom code.
Hey Nigel,
Sure thing, let me clarify.
The escalated issue was that using AJAX results while having templated with Beaver Builder resulted in the styling being lost. This was true on the first page of results and subsequent, with or without the filter you provided to show no results with no filter selections made.
That issue is now resolved, however, as soon as I introduce the code you provided to show no results at first, and then make a filtering selection, the returned results are once again missing the Beaver Builder styling. Simply enabling/disabling the filter you provided toggles this.
Cheers,
Mark
Hey Nigel,
Any updates on this?
-Mark
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Mark
I've been doing some more testing this morning and have arrived at the conclusion that it's not going to be possible, you can have the Beaver styling working when using ajax, or not show any initial results, but not both.
Forget not showing any initial results for the moment.
You visit the page, and all of the unfiltered results are displayed. The Beaver styling is loaded in with the results and they look as expected.
When you navigate the results using ajax (whether paginating or searching) the posts update, but the styling isn't fetched again, we already have it from the initial page load.
Now let's look at adding the no initial results (there are various ways you could achieve this, but they will all fail).
You visit the page and no posts are loaded because there are no results to display initially.
You then perform an ajax update (pagination or search) and the posts update, but the BB styling we are depending on is not available this time, because it gets loaded with the first batch of results, of which there were none.
Conceptually I don't see a way around it. (I'm pretty sure that the developers would not agree to rewrite the BB integration so that styles are pulled in again on every ajax request.)
Which means you need to either drop ajax, or stop blocking the initial results.