• Resolved siiimon

    (@siiimon)


    Hi – my organisation’s website is hosted on WordPress managed hosting at GoDaddy. Plugins are automatically updated. The 6.0.2 release of your plugin generated a fatal error. Inspection of the debug logs indicate that it is a clash with the Cyclone Slider plugin. Deactivating the Cyclone Slider plugin confirms this. Here is a excerpt from the logs:

    [23-Oct-2022 10:16:45 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /var/www/wp-includes/query.php:28
    Stack trace:
    #0 /var/www/wp-content/plugins/the-events-calendar/src/Tribe/Query.php(46): get_query_var('tribe_events_fr...')
    #1 /var/www/wp-includes/class-wp-hook.php(307): Tribe__Events__Query::parse_query(Object(WP_Query))
    #2 /var/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #3 /var/www/wp-includes/plugin.php(524): WP_Hook->do_action(Array)
    #4 /var/www/wp-includes/class-wp-query.php(1112): do_action_ref_array('parse_query', Array)
    #5 /var/www/wp-includes/class-wp-query.php(1805): WP_Query->parse_query()
    #6 /var/www/wp-includes/class-wp-query.php(3613): WP_Query->get_posts()
    #7 /var/www/wp-includes/post.php(2410): WP_Query->query(Array)
    #8 /var/www/wp-content/plugins/cyclone-slider-2/src/CycloneSlider/Data.php(994): get_posts(Array)
    #9 /var/www/wp-content/plugins/cyclone-slider-2/src/CycloneSlider/Data.php(311): CycloneSlider_Data->get_posts(Array)
    #10 /var/www/wp-content/plugins/cyclone-slider-2/src/plugin.php(365): CycloneSlider_Data->get_sliders()
    #11 /var/www/wp-content/plugins/cyclone-slider-2/src/CycloneSlider/Plugin.php(24): cs3_service_export_page(Object(CycloneSlider_Plugin))
    #12 /var/www/wp-content/plugins/cyclone-slider-2/src/CycloneSlider/Plugin.php(35): CycloneSlider_Plugin->offsetGet('export_page')
    #13 /var/www/wp-content/plugins/cyclone-slider-2/src/plugin.php(141): CycloneSlider_Plugin->run()
    #14 /var/www/wp-includes/class-wp-hook.php(307): cs3_init('')
    #15 /var/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #16 /var/www/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #17 /var/www/wp-settings.php(461): do_action('plugins_loaded')
    #18 /var/www/wp-config.php(105): require_once('/var/www/wp-set...')
    #19 /var/www/wp-load.php(50): require_once('/var/www/wp-con...')
    #20 /var/www/wp-blog-header.php(13): require_once('/var/www/wp-loa...')
    #21 /var/www/index.php(17): require('/var/www/wp-blo...')
    #22 {main}
      thrown in /var/www/wp-includes/query.php on line 28

    I have deactivated The Events Calendar plugin. Prior to this, I migrated the events to your new data structure.

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • I’ve had the same issue affect my site.

    In deactivating The Events Calendar, not only does my “whats-on” (Event listing page) not render, but I lose the Events menu in my dashboard, so I can’t access my event content / attendee list.

    However I found that by reactivating The Events Calendar but deactivating Event Tickets Plus, at least my ‘whats-on’ renders the events and the Event dashboard returns. However, I just can’t sell new tickets – no ticket stock displays. So this is the lesser of two evils for now.

    There must be a conflict resulting from The Event Calendar upgrade, but howdoes one find out what that conflict is to resolve it?

    Next work around I’m testing is to use Event Tickets without The Events Calendar, but setting up ticketing on a different page type.

    cheers
    Jamie

    I’m getting similar. Several of my sites are showing these in the error log, and my sites aren’t loading

    ——————————-

    WordPress database error Unknown column 'date' in 'order clause' for query 
    					SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID
    					FROM wp_posts  LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_tec_occurrences ON wp_posts.ID = wp_tec_occurrences.post_id
    					WHERE 1=1  AND ( 
      wp_term_relationships.term_taxonomy_id IN (99)
    ) AND ( 
      wp_tec_occurrences.post_id IS NOT NULL 
      AND 
      CAST(wp_tec_occurrences.end_date AS DATETIME) >= '2022-10-23 16:08:58'
    ) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish'))
    					GROUP BY wp_tec_occurrences.occurrence_id
    					ORDER BY date desc, CAST(wp_tec_occurrences.start_date AS CHAR) ASC, post_date ASC
    					LIMIT 0, 6
    				 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/astra/page.php'), astra_content_page_loop, do_action('astra_content_page_loop'), WP_Hook->do_action, WP_Hook->apply_filters, Astra_Loop->loop_markup_page, Astra_Loop->loop_markup, do_action('astra_page_template_parts_content'), WP_Hook->do_action, WP_Hook->apply_filters, Astra_Loop->template_parts_page, get_template_part, locate_template, load_template, require('/themes/astra/template-parts/content-page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_blocks, render_block, WP_Block->render, WP_Block->render, UAGB_Post->post_grid_callback, UAGB_Helper::get_query, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, apply_filters_ref_array('posts_pre_query'), WP_Hook->apply_filters, TEC\Events\Custom_Tables\V1\WP_Query\Modifiers\Events_Only_Modifier->filter_posts_pre_query, TEC\Events\Custom_Tables\V1\WP_Query\Custom_Tables_Query->get_posts, WP_Query->get_posts

    —————————

    [23-Oct-2022 06:08:17 UTC] PHP Fatal error:  Uncaught Error: <strong>Call to a member function get() on null</strong> in /home/mtneboor/public_html/wp-includes/query.php:28
    Stack trace:
    #0 /home/mtneboor/public_html/wp-content/plugins/the-events-calendar/src/Tribe/Query.php(46): get_query_var('tribe_events_fr...')
    #1 /home/mtneboor/public_html/wp-includes/class-wp-hook.php(307): Tribe__Events__Query::parse_query(Object(WP_Query))
    #2 /home/mtneboor/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #3 /home/mtneboor/public_html/wp-includes/plugin.php(524): WP_Hook->do_action(Array)
    #4 /home/mtneboor/public_html/wp-includes/class-wp-query.php(1112): do_action_ref_array('parse_query', Array)
    #5 /home/mtneboor/public_html/wp-includes/class-wp-query.php(1805): WP_Query->parse_query()
    #6 /home/mtneboor/public_html/wp-includes/class-wp-query.php(3613): WP_Query->get_posts()
    #7 /home/mtneboor/public_html/wp-includes/post.php(2410): WP_Query->query(Array)
    #8 /home/mtneboor/public_html/wp-content/plugins/pdb-email-expansion/cpt_email_templates/con in /home/mtneboor/public_html/wp-includes/query.php on line 28

    ——————————

    Thread Starter siiimon

    (@siiimon)

    A poorly defined global, maybe?

    Similar issue on my site ??

    • This reply was modified 2 years, 1 month ago by slydawggiex916. Reason: to make sure I get notified of replies

    After updating all my event pages were showing a 404 and generated this error:

    [24-Oct-2022 17:17:56 UTC] WordPress database error Unknown column 'date' in 'order clause' for query 
    			SELECT   [REMOVED]_posts.*
    			FROM [REMOVED]_posts  JOIN [REMOVED]_tec_occurrences ON [REMOVED]_posts.ID = [REMOVED]_tec_occurrences.post_id
    			WHERE 1=1  AND [REMOVED]_posts.post_name = '[REMOVED]' AND [REMOVED]_posts.post_type = 'tribe_events' AND [REMOVED]_posts.post_status='publish'
    			
    			ORDER BY date ASC
    			
    		 made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, apply_filters_ref_array('posts_pre_query'), WP_Hook->apply_filters, TEC\Events\Custom_Tables\V1\WP_Query\Modifiers\Events_Only_Modifier->filter_posts_pre_query, TEC\Events\Custom_Tables\V1\WP_Query\Custom_Tables_Query->get_posts, WP_Query->get_posts

    Because of this, I reverted back to Event Tickets 5.5.1 and TEC 6.0.1.1.

    Plugin Support Abz

    (@abzlevelup)

    Hi everyone, sorry to hear about this. While we’re trying to figure out the issue here, I’d recommend rolling back to the last working version of the plugin.

    To be safe, we’d recommend conducting these tests and new updates on a Staging Server. Also, please keep a working backup of your website.

    Apologies for the inconvenience. Rest assured that I’d get back to this thread whenever I hear more about this issue.

    Hang in there.

    Best,
    Abz

    Plugin Contributor Victor Zarranz

    (@vicskf)

    Hi there!

    Thank you all for letting us know about this error.

    We’ve found a few other users reporting the same error and we are currently investigating the cause of it.

    It would be very helpful if any of you can confirm if you are using any kind of object cache like Redis. And if disabling the cache system prevents the error from happening.

    For the time being I’m going to link this thread to our internal bug report and we’ll keep you posted when a resolution has been made.

    Thanks

    Internal Ref: TEC-4546

    therealgilles

    (@chamois_blanc)

    It’s surprising this is still not fixed. WP does this to translate ‘date’ to ‘post_date’ before running the query. This is obviously missing from how TEC is handling it:

              // Default: order by post field.
              $orderby_clause = "{$wpdb->posts}.post_" . sanitize_key( $orderby );
    therealgilles

    (@chamois_blanc)

    It looks like this function was added, but is never called:

    // the-events-calendar/src/Events/Custom_Tables/V1/WP_Query/Custom_Tables_Query.php
    protected function parse_orderby( $orderby ) {

    therealgilles

    (@chamois_blanc)

    This is not a redis cache problem. The issue is that the posts_orderby filter runs after parse_orderby and reverts the post_date to just date. The faulty code is therefore in order_by_occurrence_id().

    therealgilles

    (@chamois_blanc)

    Here is a possible fix, though I don’t know if it will work in all cases:

    // the-events-calendar/src/Events/Custom_Tables/V1/WP_Query/Custom_Tables_Query.php
    public function order_by_occurrence_id( $order_by, $query = null ) {
    ...
    if ( ! ( is_string( $original_key ) && isset( $meta_query_clauses[ $original_key ] ) ) ) {
              // Not a key we redirect or handle.
              // $buffer[] = $original_key . ' ' . $direction;
              $buffer[] = $this->parse_orderby( $original_key ) . ' ' . $direction;
              continue;
            }
    Plugin Contributor leahkoerper

    (@leahkoerper)

    Hi folks! We just released The Events Calendar 6.0.4 (and Events Calendar Pro 6.0.3). We fixed quite a few errors in this release, and it may have solved this issue as well. Please update and let us know if you’re still seeing the issue. If so, we’ll prioritize it for an upcoming release. Thanks!

    The Dawn

    (@upwithdawn)

    Just tested this release and I get exactly the same error I had when updating 4 weeks ago:

    Fatal error: Uncaught Error: Call to a member function get() on null in /home/customer/www/DOMAIN.TLD/public_html/wp-includes/query.php:28 Stack trace: #0 /home/customer/www/DOMAIN.TLD/public_html/wp-content/plugins/the-events-calendar/src/Tribe/Query.php(46): get_query_var('tribe_events_fr...') #1 /home/customer/www/DOMAIN.TLD/public_html/wp-includes/class-wp-hook.php(308): Tribe__Events__Query::parse_query(Object(WP_Query)) #2 /home/customer/www/DOMAIN.TLD/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #3 /home/customer/www/DOMAIN.TLD/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #4 /home/customer/www/DOMAIN.TLD/public_html/wp-includes/class-wp-query.php(1127): do_action_ref_array('parse_query', Array) #5 /home/customer/www/DOMAIN.TLD/public_html/wp-includes/class-wp-query.php(1820): WP_Query->parse_query() #6 /home/customer/www/DOMAIN.TLD/public_html/wp-includes/class-wp-query.php(3749): WP_Query->get_posts() #7 /home/customer/www/DOMAIN.TLD/public_html in /home/customer/www/DOMAIN.TLD/public_html/wp-includes/query.php on line 28

    • This reply was modified 2 years ago by The Dawn.
    Plugin Support Abz

    (@abzlevelup)

    Hi @upwithdawn, that’s really interesting, could you provide the following version of the following?

    1. PHP
    2. WordPress
    3. The Events Calendar
    4. Theme and Version

    Appreciate you sharing the stack trace here. I suspect it could be that The Events Calendar needs re-installing before upgrading. Could you try that one and see if that does the trick?

    To be safe, we’d recommend conducting tests and updates on a Staging Server. Also, please keep a working backup of your website.

    Let me know how it goes.

    Best,
    Abz

    Plugin Support Guga Alves

    (@gugaalves)

    `Hi there,

    We’re back with good news for you.

    The issue causing a Fatal error “Call to a member function get() on null” is fixed!

    Please update your Events Calendar free (and PRO, in case you also have it) to apply that fix to your site.

    Best Regards,

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Fatal Error on updating to 6.0.2’ is closed to new replies.