Async filters not working since 29 Apr
See original GitHub issueJust today I updated nunjucks in one of my apps. In particular, I was using Async filters, but they have stopped working completely, failing to output anything in place.
env.addFilter('test', function(obj, callback) {
setTimeout(function() {
callback(null, 'FOO');
}, 1000);
}, true);
Strangely, the following does work (but this is besides the point):
env.addFilter('test', function(obj, callback) {
callback(null, 'FOO');
}, true);
I was able to pinpoint the issue to this commit:
https://github.com/mozilla/nunjucks/commit/9e160e8d13bda3830e5799f75ed02ccb53550fdd
Whereas the following commit is still fine:
https://github.com/mozilla/nunjucks/commit/eadeb67deaf1f805ef34f953391e52503bc09273
I noticed that there are no tests to validate async filter behavior, which probably explains why it went unnoticed for so long … @jlongster care to take a look, please? Thanks!
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Async Action Filter not working. ASP.NET Core Web Api
Show activity on this post. To disable the default model state handling, you need to add the below setting in Program.cs. builder.Services.
Read more >Support for async filters for Liquid · Issue #831 · 11ty/eleventy
I did reinstate our Liquid test for async filters in 1.0 and it's working fine! It does not work in the old version...
Read more >Asynchronous action filters in ASP.NET Web API - StrathWeb
It is rather to common to use filters in Web API to perform common tasks around your actions in an AOP (aspect oriented...
Read more >[Update: Dec. 22] YouTube bugs/issues & pending ...
Here we are tracking all the bugs and problems found on YouTube and their status as ... Update 29 (February 15) ... Update...
Read more >Deeply Understanding JavaScript Async and Await with ...
It is important to note the async functions work on top of promises. They are not a fundamentally different concept.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Well, tested this out. It works. You need to ensure, that you’re using async renderer:
Any progress on this?