Events Calendar Breaking the Theme Customizer

Home Forums Calendar Products Events Calendar PRO Events Calendar Breaking the Theme Customizer

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #998893
    John Gilbreath
    Participant

    Hello there,

    It appears that the Events Calendar is causing trouble with the Theme Customizer. I am using the latest update of the Divi Theme on the latest version of WP. When I attempt to use the Customizer I receive the following error:

    Fatal error: Call to undefined function get_current_screen() in /home/wp_jv36u2/earshot123.org/wp-content/plugins/the-events-calendar/src/Tribe/Query.php on line 302

    I can access the Customizer by deactivating the Events Calendar plugin, however this is very unhandy as much of the site content involves events.

    Thank you.

    #998976
    George
    Participant

    Hey @John!

    I’m really sorry that you’ve encountered this issue – this is actually a known bug that a user reported a little bit ago, and even submitted a fix for! You can see the fix here:

    We are including this fix in our next release of The Events Calendar.

    For now, until that fix arrives, you should be able to get around this by heading to src/Tribe/Query.php in your plugin files for The Events Calendar. Around line 302 or so you should see a line of code that looks like this:


    $screen = ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ? null : get_current_screen();

    You should be able to fix this error by remove that line of code, and replacing it with this instead in the exact same location:


    $screen = null;

    if ( function_exists( 'get_current_screen' ) ) {
    $screen = ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ? null : get_current_screen();
    }

    I’m sorry that editing core plugin code is required to fix this currently. We have it included in the next release and hopefully this all helps!

    Cheers,
    George

    #999182
    Adam
    Participant

    Ah, thank you. This worked for me!

    Since it just “hung” and therefore didn’t create an error in the error log it took me forever to sort out which plugin was creating the issue.

    But the fix was easy enough. Gracias.

    #999425
    George
    Participant

    Thanks for noting that here, @Adam! Just to be sure, you’re not the same user as @John just using a different account, right?

    I’m really sorry that this problem exists at all, but fortunately this fix is very solid and will be included in the next public release. 🙂

    Cheers!
    George

    #1003651
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Events Calendar Breaking the Theme Customizer’ is closed to new replies.