mitydigital / statamic-scheduled-cache-invalidator

MIT License
2 stars 3 forks source link

[Bug] Orderable collections with publish dates enabled causes exception #7

Closed insight-media closed 5 months ago

insight-media commented 5 months ago

I've noticed an issue when a collection is configured as follows:

The NowScope will be applied, comparing the date on the 'order' field, which throws an exception.

martyf commented 5 months ago

Can you please provide more detail (including the exception) and a link to a repo that replicates the issue.

insight-media commented 5 months ago

I've created a sample project: https://github.com/insight-media/statamic-scheduled-cache-invalidator-issue

martyf commented 5 months ago

Thanks for the project - this was great to play with to nail this down.

It is to do with what Statamic does with ordered and dated collections - and it falls back to the order index instead of the date field.

2.0.3 (just tagged) will address this.

Let me know how you go.

insight-media commented 4 months ago

Thanks @martyf ! Works perfectly.

martyf commented 4 months ago

Huzzah! Glad it's sorted.