My month/year archive template code no longer works in 3.2 My blog has a date archive page that uses a variation of this code. Here's the code that I've been using:

{% set allEntries = craft.entries.section('entries').type(['posts','reviews']).limit(null).all() %}

&lt;ul&gt;

{% for year, entriesInYear in allEntries | group("postDate.year") %}
    &lt;li&gt;

        &lt;h3&gt;{{ year }}&lt;/h3&gt;

        &lt;ol&gt;
        {% for month, entriesInMonth in entriesInYear|group("postDate|date('F Y')") %}
            &lt;li&gt;&lt;a href="/archives/{{ month|date('Y') }}/{{ month|date('m') }}"&gt;{{ month|date('M') }}&lt;/a&gt;&lt;/li&gt;
        {% endfor %}
        &lt;/ol&gt;

    &lt;/li&gt;
{% endfor %}

&lt;/ul&gt;


Basically, it printed out a list of the years and months in a grid a la kottke.org's "Monthly archives" section. But after upgrading to Craft v3.2.9, the code no longer works. Instead, the page just displays a generic "Internal Server Error" message.

Looking at the error logs, the server ran out of memory trying to run the above code. If I remove the above code, then the page loads in a snap.

As a test, I streamlined the code by removing the nested grouping:

{% set allEntries = craft.entries.section('entries').type(['posts','reviews']).limit(null) %}

&lt;ul&gt;

{% for year, entriesInYear in allEntries | group("postDate.year") %}
    &lt;li class="dtsY u-flexWrap"&gt;

        &lt;h3&gt;{{ year }}&lt;/h3&gt;

    &lt;/li&gt;
{% endfor %}

&lt;/ul&gt;


But that still results in the same memory-related error.

FWIW, my blog has 4,100+ entries spanning 22 years, so is there just too much content for the above queries to handle? And if so, are there ways to optimize the code and/or make it less dependent on DB queries? While I can increase the server memory, I'd prefer to find a template-based solution first.
This should be fixed for the upcoming 3.2.11 release.

To get the fix early, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#87fd6ca6b0c57f524c8ccae895c13eb9724d0efa as 3.2.10",
  "...": "..."
}


Then run composer update.