Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allEntries doesn't work with "created_at" #208

Open
greyskin opened this issue Dec 5, 2021 · 0 comments
Open

allEntries doesn't work with "created_at" #208

greyskin opened this issue Dec 5, 2021 · 0 comments

Comments

@greyskin
Copy link

greyskin commented Dec 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant