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

Unknown Liquid filters fail silently #183

Closed
kleinfreund opened this issue Jul 26, 2018 · 4 comments
Closed

Unknown Liquid filters fail silently #183

kleinfreund opened this issue Jul 26, 2018 · 4 comments
Assignees
Milestone

Comments

@kleinfreund
Copy link
Contributor

kleinfreund commented Jul 26, 2018

The following works with or without a cssmin filter being defined.

example.liquid:

{% capture testcss %}
  {% include css/test.css %}
{% endcapture %}
<style>{{ testcss | cssmin | safe }}</style>

When a filter is not defined, an error should be produced.

(as seen in Quick Tip #005—Super Simple CSS Concatenation)

@zachleat
Copy link
Member

I did make a fair number of changes to the error reporting stuff in 0.5.4, this is what it reports in Nunjucks:

image

But you’re absolutely right that it fails silently in Liquid templates.

@zachleat zachleat added bug and removed needs-triage labels Sep 11, 2018
@zachleat zachleat changed the title Unknown filters fail too silently Unknown Liquid filters fail silently Sep 11, 2018
@zachleat
Copy link
Member

Ah, looks like there is a strict_filters option: https://github.com/harttle/liquidjs#options

@zachleat
Copy link
Member

With this option enabled:
image

I added this to the Liquid setLiquidOptions documentation example and created another issue to change this to true by default when we go 1.0.

https://www.11ty.io/docs/languages/liquid/

Closing this one—follow along at #222 for the default change—thanks!

@zachleat zachleat self-assigned this Sep 11, 2018
@zachleat zachleat added this to the 0.5.4 milestone Sep 11, 2018
zachleat added a commit that referenced this issue Sep 11, 2018
@zachleat
Copy link
Member

zachleat commented Sep 8, 2020

#222 is shipping with 1.0

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

No branches or pull requests

2 participants