Day view showing Jan, 1 1970 as the date on all pages

Home Forums Calendar Products Community Events Day view showing Jan, 1 1970 as the date on all pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1086373
    Rick Richardson
    Participant

    We found another issue with our site after running the last update. When a user clicks on the date on the calendar to open the day view, the date always shows as Jan 1, 1970

    http://www.azhumanities.org/events-calendar/2016-03-08/

    #1087090
    Brook
    Participant

    Howdy Again Quickrick!

    Thanks for reaching out. I just tried some testing and that doesn’t look like a bug in the calendar, but quite possible a conflict or a modification gone awry

    I remember helping you with some title issues in the past. I’m wondering if that’s related to this. I remember you tried inserting a few things into your theme’s functions.php to modify the title. If one of those was setup wrong it could easily be causing this. Could you try temporarily switching themes and seeing if this goes away? If so, then we’ve narrowed it down! If you try removing or disabling the modifications you added to your functions.php I bet when you reenable the theme this issue will go away. If you share a copy of the modifications here I might be able to spot the error and help you correct the code.

    Does that all make sense? Will that work for you? Please let me know.

    Cheers!

    – Brook

    #1090767
    Rick Richardson
    Participant

    Hey Brook,

    I finally figured out what was causing the date display issue. It was actually one of the previously suggested fixes for the title issue that I had tried to implement, and never removed after it did not solve that problem. It was the block of code to add into the functions.php file. Just thought I’d let you know what caused the issue in case someone else is trying to fix their titles, and then reports this issue as well.

    <?php
    add_filter(‘tribe_get_events_title’, ‘my_get_events_title’);
    function my_get_events_title($title) {
    if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
    return ‘Events Calendar’;
    } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
    return ‘Events Calendar’ . ‘ » ‘ . single_term_title(”, false);
    } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
    return ‘Events List’;
    } elseif( tribe_is_event() && is_single() ) { // Single Events
    return get_the_title();
    } elseif( tribe_is_day() ) { // Single Event Days
    return ‘Events on: ‘ . date(‘F j, Y’, strtotime($wp_query->query_vars[‘eventDate’]));
    } elseif( tribe_is_venue() ) { // Single Venues
    return $title;
    } else {
    return $title;
    }
    }
    ?>

    #1090858
    Brook
    Participant

    Thank you very much! I am happy you were able to find the cause. Please let us know if you ever need anything else. Cheers!

    – Brook

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Day view showing Jan, 1 1970 as the date on all pages’ is closed to new replies.