Closed helleholmsen closed 3 days ago
Hey @helleholmsen
Since Craft 5, you need to add a second parameter to the isFutue()
function, see the upgrade documentation here:
https://github.com/studioespresso/craft-date-range?tab=readme-ov-file#upgrading-to-craft-5
Could you give that a try?
Getting some error messages after updating to craft 5. For example this isnt working anymore:
{% set events = craft.entries.section('events').relatedTo(relatedTo).isFuture('dateFromTo').orderBy('dateFromTo asc').all() ?? [] %}
gives me: Invalid entryType specified
I tried with both
{% set events = craft.entries.section('events').entryType('events').relatedTo(relatedTo).isFuture('dateFromTo').orderBy('dateFromTo asc').all() ?? [] %}
and
{% set events = craft.entries.section('events').type('events').relatedTo(relatedTo).isFuture('dateFromTo').orderBy('dateFromTo asc').all() ?? [] %}