lastest_date bug

Home Forums Calendar Products Events Calendar PRO lastest_date bug

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1182370
    Craig
    Participant

    I’ve had this bug since I first launched the site with TEC plugins.

    The TEC software miscalculates the latest_date on a very regular basis. As a result, the next month link disappears, and I have to go through a manual process of finding the last class on the calendar (January 2017 for example) and updating it. That seems to clear whatever logic calculates the date, resetting it to the date of that January 2017 date.

    It’s quite bothersome to have to check that so often. It would be nice to see the bug resolved.

    This is a follow-up from this forum topic: https://theeventscalendar.com/support/forums/topic/tribe-events-nav-next-disappearing-when-publishing-new-event/#post-1124986

    Thanks,
    Craig

    #1183034
    Brook
    Participant

    Howdy Craig,

    I’d love to pickup where you left off before.

    Could you try inserting this snippet, and only this snippet, back into your theme?

    /**
    * Force a recalculation of the known date range.
    * Remove after repair is completed.
    */
    function repair_known_date_ranges() {
    Tribe__Events__Dates__Known_Range::instance()->rebuild_known_range();
    }

    add_action( 'init', 'repair_known_date_ranges' );

    That should have the same effect as going back and clicking Save. But the other snippet, which you were running at the same time, could override this one and cause strange behavior. Does running just that snippet work?

    If not I have to ask, how are you adding events? I notice you have a post duplicator plugin, along with some other import plugins. If you have ever used this for events it could very well be the source of the “bug”, or conflict. The issue you are facing is not typical. Only in very nonstandard environments have we seen this crop up, and it is usually the result of another plugin altering The Events Calendar data. If we know the plugin causing the conflict then it can become possible to isolate things down and maybe craft a compatibility path. It’s not really fixing a “bug” per se. But if we don’t know the other plugin it’s basically impossible to craft a fix without resorting to brute force solutions like the above snippet.

    Does that all make sense?

    Cheers!

    – Brook

    #1183216
    Craig
    Participant

    Hi Brook,

    It looks like the snippet you provided was corrupted by the editor somehow. Can you please put it in here in a different way?

    I’d be happy to try it again.

    Thanks,
    Craig

    #1184250
    Brook
    Participant

    Oh wow that really did get mangled. I just updated it to remove all the funky code. I was just resharing the snippet from before, the one that should rebuild the date ranges on each page load. Like I requested, above would you mind reinserting just that snippet into your theme and seeing if it works on its own?

    Cheers!

    – Brook

    #1191792
    Craig
    Participant

    Hi Brook,

    Sorry for the late reply. Unfortunately, that did not fix the issue. It does seem that another plugin could have caused the issue, but it’s probably too late to go back to change that.

    Is there a way to set it to, say, current month plus 5 months, so it’s always updating into the future?

    Thanks,
    Craig

    #1194591
    Brook
    Participant

    Howdy Craig,

    That is exceptionally odd! It’s hard to understand how that snippet doesn’t work but saving a post does.

    You have an interesting idea for a workaround. But I don’t really see a good way of implementing that workaround. I think the only other option on the table would be to disable the known date range entirely, and just have it always show next/prev links regardless of whether there are future or past events.

    https://theeventscalendar.com/knowledgebase/add-nextprevious-links/

    A lot of customers do that anyways, just because they find the disappearing links to not be intuitive. We are actually trying to work on making them more intuitive, but in the mean time always showing the links is a valid option and it would work for this circumstance.

    Does that all make sense? Please let me know.

    Cheers!

    – Brook

    #1196024
    Craig
    Participant

    Hi Brook,

    It appears this is working. I’ll let you know if there are problems.

    I suppose my one worry about this is that Google could index an unlimited number of next month links, but I’ll keep track of any problems that might occur.

    Thanks again for your help!

    Craig

    #1196324
    Brook
    Participant

    I can understand that fear. Fortunately those pages are all marked noindex. Google will however crawl a few of them, just to make sure they have spidered your site reasonably well. If you use Google’s Admin Dashboard you might see them mention crawling those pages. However, according to Google’s official documentation they will not index them and they will not impact SEO since they aren’t indexed.

    – Brook

    #1205953
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘lastest_date bug’ is closed to new replies.