Skip to content

allEntries doesn't work with "created_at" #208

@greyskin

Description

@greyskin

I'm a little unsure if Steam is the correct repository for this issue - my apologies if it isn't.

The Locomotive CMS docs used to contain the following example for filtering on a Liquid action:

{% action "get all entries" %}
    var entries = allEntries('[content_type_slug]', { 'created_at.lte': getProp('now') });
    setProp('entries', entries);
{% endaction %}

{% for entry in entries %}
    {{ entry._slug }}
{% endfor %}

The above should render a list of all entry slugs (lte = "less than or equal to"). It does not.

I have tested extensively with created_at variations, including hard coded dates, ISO formats, etc. I have been unable to get anything to render whatsoever, when passing any created_at filters.

The above example has been removed from the docs at my suggestion to reduce confusion (as I spent many hours trying to get this to work thinking because it was in the docs I must be doing something wrong.)

Currently the only workaround I have found is to use {% with_scope created_at... %}. This becomes problematic when working with the Actions API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions