• Resolved Hudson Phillips

    (@harbormark)


    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 to see the link]

Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Author Gustavo Bordoni

    (@bordoni)

    Hi @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

    Report back the results here.

    best Regards,

    Thread Starter Hudson Phillips

    (@harbormark)

    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

    (@harbormark)

    Update – the error remains even when I change the theme. As such, the Blocksy Companion plugin isn’t involved.

    Plugin Support Abz

    (@abzlevelup)

    Hi @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/. 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/

    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

    (@harbormark)

    Ahhh, thanks for letting me know. I’ll see what I can do to roll this back.

    Cheers

    Plugin Support Abz

    (@abzlevelup)

    Hi @harbormark, thanks for understanding and we appreciate your patience here.

    Let us know how it goes.

    Best,
    Abz

    Thread Starter Hudson Phillips

    (@harbormark)

    Do you know if version 6.0.1.1 fixes this issue?

    Plugin Support Abz

    (@abzlevelup)

    Hi @harbormark,

    Apologies for the delay here. It would not fix the issue you’re having since the function is already deprecated 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

    (@harbormark)

    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 Abz

    (@abzlevelup)

    Hi @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

    (@harbormark)

    Hey @abzlevelup,

    I tried switching the both the default stylesheets and event templates to no avail; the error still remains.

    Plugin Support Abz

    (@abzlevelup)

    Hi @harbormark, appreciate you trying it out. I’d check with the team if there are functions that could potentially replace pre_get_posts. 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

    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 Abz

    (@abzlevelup)

    Hi @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

    @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)
  • The topic ‘Error regarding ‘pre_get_posts’’ is closed to new replies.