Breaking change from 0.79.0 to 0.83.1 in Unix

@runhide

I apologize. I believe I am responsible for your use of this construct:

{{ range where .Pages "Params.valid_through.Unix" "gt" now.Unix }}

In June of 2020 I recommended this while discussing “How do I use where with now function.” Although this worked with v0.72.0 (the current version at that time) through v0.82.1, I don’t understand why I didn’t just recommend:

{{ range where .Pages "Params.valid_through" "gt" now }}

This construct worked with v0.72.0 also.

Many years ago it didn’t work, but that was fixed in 2015 with:
https://github.com/gohugoio/hugo/pull/1169.

With v0.83.0 and later you cannot use my original recommendation due to this fix:
https://github.com/gohugoio/hugo/pull/8450.

Yes, we broke something that used to work, but (a) I am not convinced the broken construct is widely used, and (b) I believe the fix introduced in v0.83.0 solves a common, confusing, and time-consuming problem.

5 Likes