Title: Error regarding &#8216;pre_get_posts&#8217;
Last modified: September 15, 2022

---

# Error regarding ‘pre_get_posts’

 *  Resolved [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * (@harbormark)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/)
 * I’m not sure what changed recently, but since running one of the updates, I started
   noticing errors across a number of sites.
 * For example:
 * Warning: call_user_func_array() expects parameter 1 to be a valid callback, class‘
   Tribe__Events__Query’ does not have a method ‘pre_get_posts’ in /home/[path]/[
   domain-name]/public_html/wp-includes/class-wp-hook.php on line 307
 * This is appearing across multiple sites and I don’t know how to hide or remove
   it 🙁
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-regarding-pre_get_posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/2/?output_format=md)

 *  Plugin Author [Gustavo Bordoni](https://wordpress.org/support/users/bordoni/)
 * (@bordoni)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16014082)
 * Hi [@harbormark](https://wordpress.org/support/users/harbormark/),
 * I am sorry that you are facing this particular issue.
 * To start debugging to figure out the source of the problem, I will ask you to
   follow the instructions in this Knowledgebase article.
 * [https://evnt.is/kb-conflicts](https://evnt.is/kb-conflicts)
 * Report back the results here.
 * best Regards,
 *  Thread Starter [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * (@harbormark)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16014608)
 * I followed the steps on that page, here’s what I’ve found:
 * Step 1 – Switched to the Twenty Twenty theme, problem still existed
 * Step 2 – Disabled all plugins and the problem disappears when the Blocksy Companion
   plugin is deactivated. This problem also appears ONLY on pages where the three
   plugins are used together
 * a) The Events Calendar is installed and active
    b) The Blocksy Companion Pro 
   is installed and active c) Where a view from Toolset Views is being displayed.
 * There appears to be something happening (or not happening) when all three of 
   the above occur together.
 *  Thread Starter [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * (@harbormark)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16017684)
 * Update – the error remains even when I change the theme. As such, the Blocksy
   Companion plugin isn’t involved.
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16022118)
 * Hi [@harbormark](https://wordpress.org/support/users/harbormark/), sorry to hear
   about this. It seems like the error is due to the removed function/method using
   v6.0 **Tribe__Events__Query::pre_get_posts**. See the URL here — [https://theeventscalendar.com/knowledgebase/k/developer-changes-version-6-0-with-legacy-views-removal/](https://theeventscalendar.com/knowledgebase/k/developer-changes-version-6-0-with-legacy-views-removal/).
   This function is used with our widgets.
 * For now, we do not have any workaround other than downgrading to pre-v6.0. Here’s
   an article to help you with downgrading the plugins: Accessing and Installing
   Older Plugin Versions. [https://theeventscalendar.com/knowledgebase/k/accessing-older-plugin-versions/](https://theeventscalendar.com/knowledgebase/k/accessing-older-plugin-versions/)
 * If you had already migrated your events to the 6.0 data system, you should reverse
   the migration before downgrading by clicking Reverse migration under **Events
   > Settings > Upgrades**.
 * The reversal may take as long as the original migration and your site will go
   back into maintenance mode for that time. Keep in mind that reversing the migration
   will return your events to the state they were in before migration. This means
   that any updates you made to events after migration will be lost during the reversal
   process.
 * Apologies for the inconvenience, and I hope this temporary workaround helps.
 * Best,
    Abz
 *  Thread Starter [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * (@harbormark)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16023493)
 * Ahhh, thanks for letting me know. I’ll see what I can do to roll this back.
 * Cheers
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16025814)
 * Hi [@harbormark](https://wordpress.org/support/users/harbormark/), thanks for
   understanding and we appreciate your patience here.
 * Let us know how it goes.
 * Best,
    Abz
 *  Thread Starter [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * (@harbormark)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16056715)
 * Do you know if version 6.0.1.1 fixes this issue?
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16068660)
 * Hi [@harbormark](https://wordpress.org/support/users/harbormark/),
 * Apologies for the delay here. It would not fix the issue you’re having since 
   the function is already [deprecated](https://theeventscalendar.com/knowledgebase/k/developer-changes-version-6-0-with-legacy-views-removal/)
   meaning it will not be available with our future releases. The only workaround
   is to roll back to pre-v6.0.
 * Please let me know if you do have more questions. Have a great day.
 * Best,
    Abz
 *  Thread Starter [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * (@harbormark)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16068721)
 * So, if I understand this correctly, I won’t be able to upgrade the version of
   Events Calendar going forward across all of the sites affected?
 * This only comes up if I’m using Toolset on the site as well, is there some workaround
   between both plugins so I can keep using the Events Calendar?
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16073600)
 * Hi [@harbormark](https://wordpress.org/support/users/harbormark/), the functions
   may be deprecated but we are also working on improving the widgets, and should
   be compatible with 6.0 in the near future. For now, there’s no workaround available.
 * I’m curious, could you interchange the settings under Display → **Default stylesheet
   used for events templates** and **Events template**? See if that fixes that makes
   a difference.
 * Let me know how it goes.
 * Best,
    Abz
 *  Thread Starter [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * (@harbormark)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16076598)
 * Hey [@abzlevelup](https://wordpress.org/support/users/abzlevelup/),
 * I tried switching the both the default stylesheets and event templates to no 
   avail; the error still remains.
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/#post-16077870)
 * Hi [@harbormark](https://wordpress.org/support/users/harbormark/), appreciate
   you trying it out. I’d check with the team if there are functions that could 
   potentially replace [pre_get_posts](https://theeventscalendar.com/knowledgebase/k/developer-changes-version-6-0-with-legacy-views-removal).
   Or if there is any workaround that they could share.
 * I’d get back to you as soon as I know more. Thanks for working with me regarding
   this issue. Hang in there.
 * Best,
    Abz
 *  [Nick Murray](https://wordpress.org/support/users/nickfmc/)
 * (@nickfmc)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/2/#post-16097683)
 * I’ve Also been experiencing this issue and with PHP 8 it is causing fatal errors
   on some pages, so I had to rollback to php 7.4 to get my site running and get
   it back to just a warning. Ironically the fatal errors were not happening on 
   a page where TEC was being displayed at all?!
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/2/#post-16098738)
 * Hi [@nickfmc](https://wordpress.org/support/users/nickfmc/), thanks for sharing
   information here. It doesn’t show but if you enable WP_Debug it would.
 * I already created an internal bug ticket for this, and I have added this thread’s
   case to it. Thanks for all the details, I will definitely pass it along to our
   devs.
 * I am unable to provide an exact date or time estimate for when this bug will 
   be fixed, but you’ll be notified when there are any updates.
 * Appreciate your patience, and we’re looking forward to helping you solve this.
   If you do have other concerns or issues you need help with, please create another
   ticket, as it helps us track different issues.
 * Again, thank you for your patience.
 * Cheers,
    Abz ________________________
 * Internal Bug Ticket Reference:
    BTRIA-1429
 *  [Nick Murray](https://wordpress.org/support/users/nickfmc/)
 * (@nickfmc)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/2/#post-16102640)
 * [@abzlevelup](https://wordpress.org/support/users/abzlevelup/) with wp_debug 
   turned on, with php 7.4 I get a warning correct, with wp_debug off on 7.4 the
   warning is hidden correct. However with php 8 and with wp_debug off I get a “
   critical error” on some of my sites pages.

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/2/?output_format=md)

The topic ‘Error regarding ‘pre_get_posts’’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 32 replies
 * 8 participants
 * Last reply from: [Hudson Phillips](https://wordpress.org/support/users/harbormark/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/error-regarding-pre_get_posts/page/3/#post-16289702)
 * Status: resolved