You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the most recent Craft update, my date logic stopped working correctly on my archive page—it was working previously. My setup is similar to the Craft guide for making an archive page though I pull in the year from a portion of my archive URL and have a set default that is not the current year.
The content does not appear at all on the archive page. Removing the before from the passage in entriesInYear makes the content appear again, but does not filter by year. Switching the current date to now.year as shown in the guide does not resolve the error.
Sorry about that, this has been fixed for the next release. The bug was that when you passed a year-only value to before() or after(), Craft was mistaking the value for a Unix timestamp.
To get the fix early. change your craftcms/cms requirement in composer.json to:
"require": {
"craftcms/cms": "dev-develop#404caffbf0cfcd2b70cee384904db0b9dc4ac465 as 3.1.7",
"...": "..."
}
Description
With the most recent Craft update, my date logic stopped working correctly on my archive page—it was working previously. My setup is similar to the Craft guide for making an archive page though I pull in the year from a portion of my archive URL and have a set default that is not the current year.
The content does not appear at all on the archive page. Removing the
before
from the passage inentriesInYear
makes the content appear again, but does not filter by year. Switching the current date tonow.year
as shown in the guide does not resolve the error.My issue is explained in more detail on Stack Exchange: https://craftcms.stackexchange.com/questions/29349/archive-page-date-logic-stopped-working
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: