tribe_events_get_the_excerpt filter has potential object cache conflict
-
What I have set up
I have The Events Calendar (with Pro) and then W3 Total Cache with Redis-based object cache enabled.
I then have the
tribe_events_get_the_excerpt
filter used to append a Read More link to the end of the excerpt (a-la https://theeventscalendar.com/blog/tips/under-the-hood-filtering-excerpts-events-calendar/ where it usesget_permalink(get_the_ID())
from within that filter to get the event’s permalink to then output.Problem I’m having
However, it appears that a list of events on a public webpage (ex. an event list for a venue) will have that permalink added to the excerpt as repeating the same permalink across multiple events even though the events have unique permalinks.
I tried to have the
tribe_events_get_the_excerpt
filter pull in$post
as the secondary attribute, but that would simply return nothing (I only found spots where it seemed like that variable should be passed along with the filter so I’m not sure how that was ending up being blank).Possible solution…?
The best solution I could find was to disable W3TC’s object cache. The links inserted into the event excerpts went back to being unique & set to the correct event. This isn’t quite ideal as this conflict seems non-obvious where nothing else is broken when the W3TC object caching is enabled & it’d be ideal to keep this caching optimization enabled.
Is there an object cache group that needs to be set to be non-persistent to avoid this (a-la disabling minify for various assets)? Otherwise, is there a patch that could be made so that this use case doesn’t encounter this bug?
As a side note, https://theeventscalendar.com/known-issues/ just had a “All events have the same title on the WordPress Dashboard” issue fixed in The Events Calendar 5.12.0 where Redis caching would cause an issue. It seems like this might be a related issue just affecting a different part of things.
Thanks in advance!
- The topic ‘tribe_events_get_the_excerpt filter has potential object cache conflict’ is closed to new replies.