solspace / craft-calendar

Calendar for Craft: The most reliable and powerful event management plugin for Craft.
http://docs.solspace.com/craft/calendar/v5
Other
16 stars 14 forks source link

Duration objects no longer have an events property #298

Closed CodaKris closed 1 week ago

CodaKris commented 1 month ago

Describe the bug or issue you're experiencing Because the AbstractDuration class no longer has an event property, none of the groupBy methods work. Instead of seeing events, a runtime error like Neither the property "events" nor one of the methods "events()", "getevents()"/"isevents()"/"hasevents()" or "__call()" exist and have public access in class "Solspace\Calendar\Library\Duration\DayDuration". is thrown

Steps to reproduce

  1. Paste the code from https://docs.solspace.com/craft/calendar/v5/templates/queries/events/#grouping-events-by-month-week-day into a craft template
  2. load page

Expected behavior see events Craft & Plugin Info (please complete the following information):

Additional context

kjmartens commented 1 month ago

Sorry for the trouble @CodaKris.

I can duplicate this as well. It's on our list to resolve shortly. 🙂

TUSAB-web commented 2 weeks ago

I just wanted to add some additional information because I’m now experiencing this problem as well. For me, the problem didn’t appear to surface until upgrading to Craft 5 (Same version of Calendar running under Craft 4 seemed to be ok). The line of twig code that produces the error is:

{% for event in month.events %}

Other aspects of the plugin work fine (after running the fix-titles script mentioned in a closed GitHub issue)

kjmartens commented 1 week ago

Sorry for the delay @TUSAB-web... can you try Calendar 5.0.7 now? 🙂