Event Calendar goes to 404 on single event detail

Home Forums Calendar Products Events Calendar PRO Event Calendar goes to 404 on single event detail

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1155763
    Gianpietro
    Participant

    Hi,
    i’m experiencing a 404 redirect when i try to access to a single event page clicking on the event calendar.

    I followed all the instruction to fix 404 and you can find the informations below.

    Indeed the problem is due to an error in the query:
    SELECT DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = ‘_EventEndDate’ ) WHERE 1=1 AND wp_posts.post_name = ‘alessandro-barbero-milano-18-luglio-2016’ AND wp_posts.post_type = ‘tribe_events’ ORDER BY EventStartDate DESC, wp_posts.post_date DESC

    #1054 – Unknown column ‘wp_postmeta.meta_value’ in ‘field list’

    Since you used a cast wp_postmeta as tribe_event_end_date you can’t use the name of the table.

    The error seems to be at the following line of the \the-events-calendar\src\Tribe\Query.php file:
    $fields[‘event_start_date’] = “MIN({$postmeta_table}.meta_value) as EventStartDate”;

    Best regards,
    Sara.

    ********
    <Tribe Events Query>
    object(WP_Query)#3808 (57) {
    [“query”]=>
    array(4) {
    [“page”]=>
    string(0) “”
    [“tribe_events”]=>
    string(40) “alessandro-barbero-milano-18-luglio-2016”
    [“post_type”]=>
    string(12) “tribe_events”
    [“name”]=>
    string(40) “alessandro-barbero-milano-18-luglio-2016”
    }
    [“query_vars”]=>
    array(55) {
    [“page”]=>
    string(0) “”
    [“tribe_events”]=>
    string(40) “alessandro-barbero-milano-18-luglio-2016”
    [“post_type”]=>
    string(12) “tribe_events”
    [“name”]=>
    string(40) “alessandro-barbero-milano-18-luglio-2016”
    [“error”]=>
    string(0) “”
    [“m”]=>
    string(0) “”
    [“p”]=>
    int(0)
    [“post_parent”]=>
    string(0) “”
    [“subpost”]=>
    string(0) “”
    [“subpost_id”]=>
    string(0) “”
    [“attachment”]=>
    string(0) “”
    [“attachment_id”]=>
    int(0)
    [“static”]=>
    string(0) “”
    [“pagename”]=>
    string(0) “”
    [“page_id”]=>
    int(0)
    [“second”]=>
    string(0) “”
    [“minute”]=>
    string(0) “”
    [“hour”]=>
    string(0) “”
    [“day”]=>
    int(0)
    [“monthnum”]=>
    int(0)
    [“year”]=>
    int(0)
    [“w”]=>
    int(0)
    [“category_name”]=>
    string(0) “”
    [“tag”]=>
    string(0) “”
    [“cat”]=>
    string(0) “”
    [“tag_id”]=>
    string(0) “”
    [“author”]=>
    string(0) “”
    [“author_name”]=>
    string(0) “”
    [“feed”]=>
    string(0) “”
    [“tb”]=>
    string(0) “”
    [“paged”]=>
    int(0)
    [“meta_key”]=>
    string(0) “”
    [“meta_value”]=>
    string(0) “”
    [“preview”]=>
    string(0) “”
    [“s”]=>
    string(0) “”
    [“sentence”]=>
    string(0) “”
    [“title”]=>
    string(0) “”
    [“fields”]=>
    string(0) “”
    [“menu_order”]=>
    string(0) “”
    [“embed”]=>
    string(0) “”
    [“category__in”]=>
    array(0) {
    }
    [“category__not_in”]=>
    array(0) {
    }
    [“category__and”]=>
    array(0) {
    }
    [“post__in”]=>
    array(0) {
    }
    [“post__not_in”]=>
    array(0) {
    }
    [“post_name__in”]=>
    array(0) {
    }
    [“tag__in”]=>
    array(0) {
    }
    [“tag__not_in”]=>
    array(0) {
    }
    [“tag__and”]=>
    array(0) {
    }
    [“tag_slug__in”]=>
    array(0) {
    }
    [“tag_slug__and”]=>
    array(0) {
    }
    [“post_parent__in”]=>
    array(0) {
    }
    [“post_parent__not_in”]=>
    array(0) {
    }
    [“author__in”]=>
    array(0) {
    }
    [“author__not_in”]=>
    array(0) {
    }
    }
    [“tax_query”]=>
    NULL
    [“meta_query”]=>
    bool(false)
    [“date_query”]=>
    bool(false)
    [“post_count”]=>
    int(0)
    [“current_post”]=>
    int(-1)
    [“in_the_loop”]=>
    bool(false)
    [“comment_count”]=>
    int(0)
    [“current_comment”]=>
    int(-1)
    [“found_posts”]=>
    int(0)
    [“max_num_pages”]=>
    int(0)
    [“max_num_comment_pages”]=>
    int(0)
    [“is_single”]=>
    bool(true)
    [“is_preview”]=>
    bool(false)
    [“is_page”]=>
    bool(false)
    [“is_archive”]=>
    bool(false)
    [“is_date”]=>
    bool(false)
    [“is_year”]=>
    bool(false)
    [“is_month”]=>
    bool(false)
    [“is_day”]=>
    bool(false)
    [“is_time”]=>
    bool(false)
    [“is_author”]=>
    bool(false)
    [“is_category”]=>
    bool(false)
    [“is_tag”]=>
    bool(false)
    [“is_tax”]=>
    bool(false)
    [“is_search”]=>
    bool(false)
    [“is_feed”]=>
    bool(false)
    [“is_comment_feed”]=>
    bool(false)
    [“is_trackback”]=>
    bool(false)
    [“is_home”]=>
    bool(false)
    [“is_404”]=>
    bool(false)
    [“is_embed”]=>
    bool(false)
    [“is_paged”]=>
    bool(false)
    [“is_admin”]=>
    bool(false)
    [“is_attachment”]=>
    bool(false)
    [“is_singular”]=>
    bool(true)
    [“is_robots”]=>
    bool(false)
    [“is_posts_page”]=>
    bool(false)
    [“is_post_type_archive”]=>
    bool(false)
    [“query_vars_hash”:”WP_Query”:private]=>
    string(32) “3154c94e57c97d55c7111beff41b3ee6”
    [“query_vars_changed”:”WP_Query”:private]=>
    bool(false)
    [“thumbnails_cached”]=>
    bool(false)
    [“stopwords”:”WP_Query”:private]=>
    NULL
    [“compat_fields”:”WP_Query”:private]=>
    array(2) {
    [0]=>
    string(15) “query_vars_hash”
    [1]=>
    string(18) “query_vars_changed”
    }
    [“compat_methods”:”WP_Query”:private]=>
    array(2) {
    [0]=>
    string(16) “init_query_flags”
    [1]=>
    string(15) “parse_tax_query”
    }
    [“tribe_is_event”]=>
    bool(true)
    [“tribe_is_multi_posttype”]=>
    bool(false)
    [“tribe_is_event_category”]=>
    bool(false)
    [“tribe_is_event_venue”]=>
    bool(false)
    [“tribe_is_event_organizer”]=>
    bool(false)
    [“tribe_is_event_query”]=>
    bool(true)
    [“tribe_is_past”]=>
    bool(false)
    [“tribe_is_week”]=>
    bool(false)
    [“tribe_is_photo”]=>
    bool(false)
    [“tribe_is_map”]=>
    bool(false)
    [“tribe_is_event_pro_query”]=>
    bool(false)
    }

    Query Results:
    array(0) {
    }

    is_404() =
    bool(false)
    </Tribe Events Query>

    #1156159
    Cliff
    Member

    Hi Gianpietro. Thanks for this detailed report.

    Since I’m unable to reproduce this error on my local testing site, could you please provide me your best guess how I might be able to reproduce this issue? If I can reproduce it, I’ll then submit a bug report internally.

    Thank you very much.

    #1156236
    Gianpietro
    Participant

    I don’t know, i just created events and all of them go to 404.

    I’m using WooCommerce integration and created some tickets on it but, it happens also for event without tickets.

    I’m using Version 4.2.4

    Best Regards.

    #1156352
    Cliff
    Member

    In that case, could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?

    Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.

    If it is, please follow our Testing for Conflicts Guide (basically switch to TwentySixteen theme and deactivate all plugins and custom code other than Modern Tribe plugins) and see if that helps narrow down the cause of this.

    If it doesn’t, please enable WP_DEBUG and WP_DEBUG_LOG and share any PHP errors you see while changing tickets quantity, navigating your site’s home page, events page, single-event pages, and any other of your site’s pages relevant to this ticket.

    Then, please share your System Information (while in Testing for Conflicts mode).

    You might also see if you can spot any console errors at your site. (If needed, you may reference our KB article Using Google Chrome Developer Tools.)

    Let us know what you find out.

    Thanks.

    #1156526
    Cliff
    Member

    Working on something else, I saw this error in my local testing site:

    SELECT DISTINCT wp_posts.*, MIN(wp_postmeta.meta_value) as EventStartDate, MIN(tribe_event_end_date.meta_value) as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = '_EventEndDate' ) WHERE 1=1 AND wp_posts.post_type = 'tribe_events' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'refunded' OR wp_posts.post_status = 'failed' OR wp_posts.post_status = 'revoked' OR wp_posts.post_status = 'abandoned' OR wp_posts.post_status = 'active' OR wp_posts.post_status = 'inactive' OR wp_posts.post_status = 'private') ORDER BY EventStartDate DESC, wp_posts.post_date DESC LIMIT 0, 1

    I was able to reproduce it with only The Events Calendar core/free plugin active, then visit your /events page, then click your WP Admin Bar’s link to the Customizer.

    Does this throw the error for you too?

    #1157019
    Gianpietro
    Participant

    Hi,
    i was able to solve the problem disabling the free version of the “Advanced Access Manager” plugin.

    It seems that, by default, it disable the visibility of all events and with the free version you have to set the visibility for each single event.

    Best Regards.

    #1157337
    Cliff
    Member

    Yikes. Good find, and thanks for reporting it.

    Have a great day.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Event Calendar goes to 404 on single event detail’ is closed to new replies.