Skip Navigation

[Closed] Issue with new views

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

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)

This topic contains 19 replies, has 3 voices.

Last updated by Nigel 3 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1572963

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

When I visit that page I can see there is a search filter for product categories and it appears to work: if I choose LeMay Events for example the page updates with what are clearly "LeMay" events.

Regarding the ordering, you are ordering by a FooEvents date field.

Because that's not a Toolset field, your View doesn't know what kind of field it is, and so it treats it as a string (which is how custom fields are stored in the database). If it is stored by FooEvents as text, e.g. April 04, 2020, then that is not amenable to sorting by and will surely give unintended results (e.g. April comes before January).

But, you are in luck.

I see that FooEvents also stores a version of the date as a timestamp, which is a format that is amenable to sorting (and it the same format Types date fields are stored in).

So change the sorting option for your View to use WooCommerceEventsDateTimestamp for the ordering rather than WooCommerceEventsDate, and you should find the ordering working correctly.

The search filter appears to be working correctly, as well, but if you think not, please give a specific example so that I can see the same.

#1573379

Thank you changing the sorting field solved the problem. I was unclear about the view filter on category I'm having issues with is not the search filter its the Query Filter. The goal is only to only list events on the events page and remove the filter after testing.

#1575505

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I removed the search filter (you can't mix manually applying a Query Filter for some field or taxonomy with a front-end search for the same field or taxonomy), tried deleting and recreating the Query Filter, and was sure to clear the cache, and it didn't seem to work correctly.

I need to look into this more closely, and so I'm going to take a copy of your site to install locally where I can do some more testing.

I'll get back to you when I have that set up and have something to report.

#1576351
Corners Broken.gif

I hope we can search within filter. I'm thinking of my shop where I was planning to have a page filtered based on category, but still allow a user to search withing the those pages. Thank you for looking into the filters. I have another item I was hoping you can address. I noticed that the rounded corners in my views are loosing formatting randomly. It occurs on the same computer with the same browser (Chrome), and my coworkers are also seeing the same pages loose formatting. I have even noticed within the same page one view would keep formatting and the other not formatted. I have attached a pic of the same page loosing the formatting. If you navigate back to the same page it might regain the formatting, I have not found a pattern. Thank you.

#1577227

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Jeff

I'm still trying to get to the bottom of the problem with the Query Filter.

I've been testing a copy of your site I installed locally.

The taxonomy query filter (for the product category) is simply not being applied to the query at all, I can tell that with debug mode for Views active where I can see the query arguments.

What I can't determine is why.

What I did find is that if I create a new View on another page with the same settings then it works.

It appears that somehow during the design process the current View has been corrupted.

Is it a viable option for you to delete the View from the events page and then add a new View block and start over with it?

That is probably the most direct route to getting a solution.

Let me clarify whether you can add a Query Filter (which applies every time the View is loaded) together with front-end search filters. You cannot add a search filter for the same field (or taxonomy) that you already added a Query Filter for.

(You can't say "only show blue flowers" while at the same time allowing users to search for red flowers.)

You can, however, add search filters for different fields (or taxonomies) than the one you added a Query Filter for (so you can say "only show blue flowers" and add a search filter for bouquet price).

The topic ‘[Closed] Issue with new views’ is closed to new replies.