Fatal error: Class 'Tribe_Template_Factory' not found

Home Forums Calendar Products Events Calendar PRO Fatal error: Class 'Tribe_Template_Factory' not found

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #115593
    Marcus J Wilson
    Participant

    Hi –

    This is a follow up to a previous ticket at https://tri.be/support/forums/topic/fatal-error-tribe_get_option-in-tribe-presstrends-php-on-line-62/

    Events Calendar & Events Calendar Pro were throwing fatal errors when WP Cron ran, which was causing other Crons on our site not to execute correctly. You advised that we upgrade to the latest version of Events Calendar and Events Calendar Pro, which we have now done.

    However, we are still seeing Fatal Errors from ECP on running Cron jobs. Now we get:
    Fatal error: Class ‘Tribe_Template_Factory’ not found in …./events-calendar-pro/lib/tribe-pro-template-factory.class.php on line 7

    We really need to wipe out these Fatal Errors to get our site running properly. Can you advise?

    Thanks
    Marcus

    #115890
    Barry
    Member

    Hi Marcus, we’ll certainly look into that. Bear with me while I run a test and I’ll get back to you.

    #115892
    Marcus J Wilson
    Participant

    Many thanks, Barry –

    There’s some info on someone else having the same issue at:
    https://forum.civicrm.org/index.php?topic=30379.0

    Best
    Marcus

    #115894
    Barry
    Member

    Hi again Marcus, that’s not actually something I can replicate as it turns out: can you confirm if this happens with a default and unmodified theme and no other plugins activated except for The Events Calendar/Events Calendar PRO?

    Would you also be able to post the entire stack trace to give us a sense of the train of events leading up to this fatal?

    #116727
    Marcus J Wilson
    Participant

    Thanks, Barry – A developer looked into this for us, and we have narrowed down the problem now:

    When we disable all plugins on our site and use the Default WP theme: Our Cron job works

    When we enabled all plugins with Default WP Theme: Cron job fails

    When we disabled plugins one by one with Default WP Theme: Cron job fails until Events Calendar Pro is disabled, then Cron job succeeds.

    Using our own theme: Cron fails as soon as Events Calendar Pro is enabled.

    Using our own theme with all Plugins enabled except The Event Calendar (Event Calendar Pro disabled): Cron succeeds

    Using our own theme with all Plugins disabled except The Event Calendar (Event Calendar Pro disabled): Cron succeeds

    Using our own theme with only The Events Calendar and Events Calendar pro enabled: Cron fails

    There is something about The Events Calendar Pro (or our settings) that is causing Cron to fail. On a simple install with a basic, unconfigured Events Calendar Pro, Civi cron works, so there must be something unique with our configuration of the plugin.

    Can you help us further to resolve what this might be?

    Thanks
    Marcus

    #116823
    Barry
    Member

    Hi Marcus,

    If the developer could provide you with a stack trace leading up to the fatal that would be particularly awesome, but if that’s not possible we can explore other options.

    There is something about The Events Calendar Pro (or our settings) that is causing Cron to fail. On a simple install with a basic, unconfigured Events Calendar Pro, Civi cron works, so there must be something unique with our configuration of the plugin.

    Does “Civi Cron” have any special meaning? Is that a plugin or other tool you are using to run cron jobs?

    What happens in the context of this test installation if you start adding your full stack of plugins/themes – do you reach a point where you can replicate the same issue and do any of the newly added components appear to trigger it?

    #116833
    Marcus J Wilson
    Participant

    Thanks Barry –

    Civi Cron is the CiviCRM Client Relationship Management system Cron job. It needs to run without errors in order to perform any cron functions for the CRM, and at the moment ECP is causing it to fail.

    There’s some info here of another user with the same issue: https://forum.civicrm.org/index.php?topic=30379.0

    The key line from the CiviCRM developer in this thread is: “Civi Cron job bootsraps WordPress so we can call hooks and other neat stuff”. So, Civi Cron seems to be calling in the function that is throwing a fatal error in ECP and causing the cron to fail (“Fatal error: Class ‘Tribe_Template_Factory’ not found).

    I asked the developer about the “stack trace” (I’m not quite sure what this refers to), but he didn’t reference this in his diagnosis.

    It would be really helpful if you could help us pinpoint the problem here…

    Best wishes and thanks for your continued help.
    Marcus

    #117299
    Barry
    Member

    So a stack trace basically shows us the path of execution leading up to the fatal errors (ie, the application started here and progressed through this-and-that class and function until it reached here, where it died). However, we may not need to go that far:

    The key line from the CiviCRM developer in this thread is: “Civi Cron job bootsraps WordPress so we can call hooks and other neat stuff”. So, Civi Cron seems to be calling in the function that is throwing a fatal error in ECP and causing the cron to fail (“Fatal error: Class ‘Tribe_Template_Factory’ not found).

    I took a look at the CiviCRM site and I’m guessing it’s a standalone application (but please don’t hesitate to correct me if its actually a plugin).

    The thing here is that if it’s a standalone app that wraps and bootstraps WordPress to achieve some of its goals, but this problem is not one you find occurs with WordPress alone (where cron jobs flow through wp-cron.php) then realistically it’s not something we’re going to be able to assist with.

    Even if it is a regular plugin but is taking this slightly unusual approach to running cron jobs in preference to using WP’s scheduled tasks API then again I’m not sure how much assistance we’re going to be able to provide.

    Does that make sense/can you confirm if that is an accurate representation of what’s happening? I’m at a slight disadvantage as I’m not at all familiar with CiviCRM.

    #117302
    Marcus J Wilson
    Participant

    Yes, CiviCRM is a plugin, Barry… although, yes, as you say it does seem to take a non-standard approach to hooking in to cron. However, it does seem that the cron runs fine with just CiviCRM and The Events Calendar enabled in WordPress – it’s ECP that seems to trigger the error (that is, ECP as we have ECP settings on our site… vanilla ECP seems to work fine).

    #117702
    Barry
    Member

    Are you able to explore triggering WordPress’s cron script (wp-cron.php) without CiviCRM and see if the fatal happens under those circumstances? Once again, you could start with your installation as-is but if you hit problems please progress to doing this with only our plugins and a default theme activated.

    Ultimately, I don’t think we’re going to be able to assist if this only happens when the cron task is channelled through this other plugin.

    #120925
    Marcus J Wilson
    Participant

    Thanks for the help with this Barry. I *THINK* we’ve managed to fix this problem through a combination of updating WP, Events Calendar and ECP to latest versions. My suspicion is that there was some conflict between EC/ECP and another plugin on the site that caused fatal errors in the Cron, but we’ve not been able to pinpoint exactly which. Will let you know if we ever find out!
    Thanks again
    Marcus

    #136156
    Barry
    Member

    (… to keep things tidy, I am now closing the thread!)

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Fatal error: Class 'Tribe_Template_Factory' not found’ is closed to new replies.