Hello.
Recently a user alerted me to a bug in the Editorial theme, really strange. When a blog page with a future post date is published, this page is not displayed on the blog until the set post date arrives. However, on the Recent Posts modular page, the same is not the case, showing the future date page.
I’ve reviewed the recent posts template code and found the following:
If I change the current line
{% for p in blog.children.order('date', 'desc').slice(0,limit) %}
it is based on the blog page previously defined in
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
{% set limit = page.header.limit|default(3) %}
by the following:
{% for p in blog.collection.slice(0,limit) %}
then the page behaves as normal, not showing any future blog posts.
Why is this happening? I have some confusion about the difference between using a collection and children pages