Skip Navigation

[Résolu] View sometimes no returning any results

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: Sometimes a View that is filtered by a field from The Events Calendar is returning no results.

Solution: When using date filter operations, it's best to filter by a Types date field. TEC date fields are stored in the database using a different format, which can have unexpected results.

This support ticket is created Il y a 5 années et 5 mois. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : ,

Ce sujet contient 27 réponses, a 3 voix.

Dernière mise à jour par Christian Cox Il y a 5 années et 4 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1282331

Certainly would be logical - also given that I am dropping the Tribe Calendar soon and just going with a toolset solution - that would still bear fruit

#1283211

Okay then I think the next step is to go through each View and check to see if the Ordering or Filtering is based on _EventStartDate. If so, update to the Event Start Date for Types field. Then clear all the caches and test the site. I'll be glad to do those steps in staging, unless you have any objection.

#1283213
Screenshot_6.png

Go for it - I changed it in live this morning - my settings are now reflected as per the screenshot below - so there is no reference to that tribe field at all

I have yet to see the menu display 'No Events Found'

I only changed the one view though

#1283289

Okay done, I have checked all the Views in staging and updated ordering and filtering options in wp-admin such that ordering is based on Event Start Date for Types as a number, and all Query Filters are based on Event Start Date for Types as an UNSIGNED value. Those settings should produce the best results across the board, assuming all start dates have been translated from _EventStartDate to Event Start Date for Types successfully. What next steps should we take to try to reproduce the "No events found!" error? Edit some events, or add events? I'd like to try content changes before we add other plugins back to the mix.

#1283297

Easiest - add a new event - check the custom fields that the function updates are updated - call it Christians New event or something - check it appears in the menus and other listings - assign me as guide - go to /with/david/ to check it appears there

D

#1283367

OK check and check. CC Test Event now appears in the menu and on /with/david. I activated the child theme and the functions plugin to set those automatic field values.

#1284171

How do you propose we get the changes to the live site - export and import?

Then we can see if it is fixed over there too?

#1285011

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi David,

Christian is currently unavailable today but will be back on Sunday to continue this thread with you.

Thanks,
Shane

#1285685

I don't know how close the live site and the staging site are to each other, so I'm not the best judge of how to move forward here. Assuming everything is identical except for the few changes I made in Views to work with the Types field instead of the EC field, I don't think export / import is necessary. Edit all Views in the live site that utilize the _EventStartDate field for ordering or filtering. Switch those to use the Types field instead. You can create a backup of the database first, just to be extra cautious.

#1289379

Im just back from Spain - moving the staging views to the live views this morning - will update soon

#1289671

Standing by for your update.

#1294577

Christian - thanks for your help - the issue does not appear to be occurring with the amended views - next move is to dump TEC altogether - it does things in too odd a fashion for my liking

#1297005

Okay great, feel free to create new tickets as needed as you phase out TEC.