-
-
Notifications
You must be signed in to change notification settings - Fork 519
Unable to override Liquid include arguments locally after upgrading to v1.0.0-beta.1 #2000
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
Comments
I’d try again to install Beta.1. You’re likely running into #1995, which is fixed on Beta.1 but broken on the canary releases. |
You should be able to use the installation instructions on https://www.11ty.dev/blog/eleventy-v1-beta/ |
Removed and reinstalled, and now the version is correct: Other things I've tried:
Additional context: Now, I get this warning on startup:
I guess this is why it was defaulting to canary 44 before. If I run |
@zachleat I didn't have time to throw together a minimally reproducible example yesterday, but I just created a repo for it now: https://github.com/AleksandrHovhannisyan/11ty-sandbox. Steps to reproduce:
{{ arg | log }}
{%- assign arg = '12' | append: arg -%}
{{ arg | log }} Expected behavior
Environment The only dependency is |
I spent a little time looking at this and I think it needs to be filed upstream at https://github.com/harttle/liquidjs Good needs is that repo is well maintained! I would note that this exhibits the same issue (logging
(tested in both liquidjs 9.25.1 and 9.28.0) |
Sounds good! And thanks for the simplified test case + version numbers. I'll file a bug over on their repo. |
when this gets fixed, just as an FYI it may be blocked by #1995 because we’re locked in |
Oh, that's unfortunate I don't want to bug the owner of the repo, so I'm waiting to hear back on the status. I fixed this issue but broke other tests 😅 |
I believe this is resolved now thanks to #2071. Going to close, but feel free to reopen! |
Worth noting that the fix was only for https://github.com/harttle/liquidjs/releases/tag/v9.28.4 |
Hmm, yeah, it looks like this is still a problem on beta 5; the solution is to use |
Describe the bug
On beta 1 (which appears as canary 44?), one of my includes is breaking because I'm doing this:
Somewhere else:
Expected result:
arg
is now1234
locally, within the context of the include file.Here's the line: https://github.com/AleksandrHovhannisyan/aleksandrhovhannisyan.com/blob/master/src/_includes/img.html#L2
Unfortunately, while this works on 0.12.1, it does not work in beta 1. I logged the value of the overridden variable before and after that line, and it remains unchanged.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It's weird that this changed, so I'm wondering if it's something on Liquid's end that changed to disallow this kind of overriding. If I rename the local variable so that it doesn't shadow the include's argument, then I don't get the error anymore.
Environment:
Additional context
I'm using a custom Liquid config as follows:
The text was updated successfully, but these errors were encountered: