Fatal error using ORM with Object Caching
-
In the latest version, running a query like this:
tribe_events()->by( 'id', $post->ID )->first()->venuesresults in a fatal error:
TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, no array or string given
#0 /wp-content/plugins/the-events-calendar/common/src/Tribe/Utils/Lazy_Collection.php(86): call_user_func
#1 /wp-content/plugins/the-events-calendar/common/src/Tribe/Utils/Lazy_Collection.php(86): Tribe\Utils\Lazy_Collection::resolve
#2 /wp-content/plugins/the-events-calendar/common/src/Tribe/Utils/Lazy_Collection.php(71): Tribe\Utils\Lazy_Collection::all
#3 /wp-content/plugins/the-events-calendar/common/src/Tribe/Utils/Collection_Trait.php(125): Tribe\Utils\Lazy_Collection::validDisabling object caching resolves it. The workaround is to fetch venue and organizer IDs using
tec_get_venue_ids,tec_get_venue_idor directly viaget_post_meta( $post_id, '_EventVenueID' );but ideally using the ORM as before wouldn’t cause a fatal error.If any other details are needed, let me know. Thanks!
The page I need help with: [log in to see the link]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.