Support » Plugin: My Calendar » Calendar Widget Not Displaying Correct Days or Events

  • Hi – for the last week or so (maybe a bit longer?), the My Calendar widget on our front page – http://www.larchmontbuzz.com – is not displaying the correct dates and events. The main calendar page – http://www.larchmontbuzz.com/calendar – works fine…but the front page widget shows all sorts of events not for today or the next few days, and all with today’s date instead of their correct dates. I think this happened around the time that I installed the update before last, but I’m not 100% sure, since I didn’t really look at the widget for a couple of days after that. I did notice the problem before installing the most recent update, but that update didn’t help the situation at all. We’ve been using the widget for several years, and have not changed any settings recently.

    Thanks…

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    I haven’t been able to reproduce this problem; can you share the widget settings with me, and confirm that you’re on the most recent version of My Calendar?

    My Calendar 3.1.7 and My Calendar Pro 1.9.5

    Further FYI: we did recently install the WP Super Cache plugin, as well as a firewall/CDN on our server, but when some other possibly cache-related problems came up, I disabled WP Super Cache…and it didn’t affect the calendar widget appearance. Also, we have a link that bypasses the CDN, and lets you see what the page would look like without it, and the widget problem still shows there, too, so I doubt the CDN is the issue either.

    Plugin Author Joe Dolson

    (@joedolson)

    Do you mean My Calendar 3.1.17?

    It looks like you’re not using the My Calendar widget; you’re using the shortcode. I’ll need you to also share your template with me, so I can see what’s going on.

    As a note: if this is a My Calendar Pro related issue, I cannot support it in these forums; you’ll need to use the support request form on the Help screen. I have no reason to believe, at this time, that this is a Pro issue, however.

    Yes, sorry, it’s My Calendar 3.1.17.

    Here’s what’s in wp-admin/widgets.php for the sidebar displaying the wrong dates:

    ccs classes: mcw_cal-widget

    Content:
    [my_calendar_upcoming template=”73bde8c2b589223d638f32997acef8bb” before=”0″ after=”14″ show_today=”yes” type=”days” order=”asc”]

    Using template=”” shows the right dates, but without the desired formatting.

    How in the world is that template string generated? We clearly need to buy a clue 🙂

    Plugin Author Joe Dolson

    (@joedolson)

    Go to My Calendar > Template Editor; all custom templates are managed there.

    Thanks.

    Freaky. That long hex string for the template wasn’t some
    encoded string; it was a cruel joke by whoever set up this site,
    or at least a misplaced fondness for uuids.

    Clicking on that in the template editor shows:

    <div class=”mcw_datablock”>{daterange before=”<div class=’mcw_month’>” after=”</div>” format=”M”}{daterange before=”<div class=’mcw_date’>” after=”</div>” format=”j”}{daterange before=”<div class=’mcw_day’>” after=”</div>” format=”D”}</div><div class=”mcw_infoblock”>{time} {title} @ {location}<br><div id= ‘d{id}’ class=’mcw_hidden’>{excerpt}</div>

    I’ve been using printf since 1980, but I can’t see which part of that
    is a date, exactly, nor why the date would always be ‘today’ rather than the
    date of the event, nor why this broke recently.

    May I buy another clue?

    Plugin Author Joe Dolson

    (@joedolson)

    Oh, that’s super messy. I don’t know why somebody would use the daterange to generate this. I can see that they wanted specific classes around each date component, for styling, but using daterange is going to be problematic, since daterange doesn’t return a date value.

    I’m wondering if your past developer customized My Calendar’s templating functions so that daterange would return a date, and updating the plug-in broke those customizations.

    There are a lot of ways to accomplish this goal without customizing My Calendar; the easiest change for you is probably to use

    {date before="<div class='mcw_month'>" after="</div>" format="M"}{date before="<div class='mcw_date'>" after="</div>" format="j"}{date before="<div class='mcw_day'>" after="</div>" format="D"}

    What I would probably do, given a choice, would be to create a new template tag that generated the whole desired string, using filters, e.g.: https://github.com/joedolson/plugin-extensions/blob/master/my-calendar/mc-custom-template-tag.php

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.