Support » Plugin: My Calendar » upcoming events shortcode does not find any events

  • Resolved bhammondCVL

    (@bhammondcvl)


    The shortcode on this page is:
    [my_calendar_upcoming fallback="No events, sorry." template="abcd206b575b82d604522ca7bf01021f" after="120" show_today="yes" type="event" order="asc"]
    Yet if you look at the main calendar (https://www.jcfld.org/my-calendar/), you can see there are many events scheduled.

    Similarly, shortcodes like
    [my_calendar_today template="abcd206b575b82d604522ca7bf01021f"]
    generate nothing.

    But the main calendar, and shortcodes like this:
    [my_calendar format="mini" time="month" above="nav,toggle,jump,print,timeframe" below="key,feeds"]
    seem to work fine.

    I’ve tried installing the plugin on a new WordPress site, with no other plugins active, and all the shortcodes seem to work fine. We’ve not installed any new plugins or themes lately, and the shortcodes were working fine until recently. So we’re not sure what’s changed, or how to figure out why the shortcodes are no longer working.

    Any ideas where we should look next?

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

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

    (@joedolson)

    If you set up the same options in the widget, does that return results?

    bhammondCVL

    (@bhammondcvl)

    No, the Upcoming Events widget does not display any events. Only the fallback text I added.

    Plugin Author Joe Dolson

    (@joedolson)

    What versions of My Calendar & WordPress are you on?

    bhammondCVL

    (@bhammondcvl)

    WordPress 5.0.3, and My Calendar 3.15 (just updated from 3.14).

    Generally, we apply any available update pretty quickly.

    bhammondCVL

    (@bhammondcvl)

    I think we figured it out. Apparently there was a category the name of which had been deleted. This, for whatever reason, seemed to cause the shortcode and widgets to fail–without throwing any errors, either, which made it a bit more difficult to track down.

    When we named or deleted the category, the shortcode and widgets resumed working. If we then created a new blank category–which you can do just by clicking the ‘add category’ button without entering a name or color–the shortcodes and widgets no longer worked.

    So, problem solved! Perhaps some work on the UI in the category admin page might make this problem easier to avoid.

    Plugin Author Joe Dolson

    (@joedolson)

    Interesting. I’ll have to look at that – while having no category name is unusual, it shouldn’t really throw errors in the plug-in. The UI is fine; that’s allowed, but causing an error isn’t so great!

    Thanks for the plugin, and the support. Sorry we’re not using the pro version, but I’ve chipped in a little via your donation page, and bought the manual.

    Plugin Author Joe Dolson

    (@joedolson)

    I found the issue. The function that generates limiting by category didn’t ignore empty strings. So when an empty category name was passed to that function, it generated the SQL to filter to only events in the category with no name.

    Easily fixed; it’ll be in the next release. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘upcoming events shortcode does not find any events’ is closed to new replies.