You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Passing data through a partial to a grandchild partial results in "NULL" #2671
I'm attempting to pass data from the CMS via a {{ collection }} loop through a child partial to the origin's grandchild partial. This is because I have a base card partial that I've extended with modified card partials like _card_featured
I think this is a bug based on my testing. I've tried a bunch of different solutions including different syntax, raw modifier and scoping the passed data.
Inspect the centered <a> tag on the page and you will see the gradient classes have NULL in them. However when you {{ dump }} you will see the data is correct there.
Rendered HTML:
Whoa, now that is very interesting. I swear I tried to fix that line break (which was from my prettier/eslint/edtior config I think) and it still didnt work. Thanks for digging in @damcclean, I'll try that on my repo and let you know.
Follow up: I can confirm fixing the line break fixed my particular issue! Thanks so much Duncan! I'm actually happy it was just an error in my code rather than error in the gentlemen's code. 😀
Should I close this? Or if its left open, rename it?
Activity
duncanmcclean commentedon Oct 17, 2020
Alright, after I bit of playing around, I think I figured out the issue.
In the
_card_featuredpartial, when you are calling the other partial, it's split into two lines, this bit below...If you were to put it into a single line like so, it starts working... as if by magic.
Hopefully that solves the problem for you. Thanks for creating the demo repo, super helpful!
I'm keeping this issue open because fixing parameter values being split into multiple lines might be a bug that should be fixed.
austriker27 commentedon Oct 17, 2020
Whoa, now that is very interesting. I swear I tried to fix that line break (which was from my prettier/eslint/edtior config I think) and it still didnt work. Thanks for digging in @damcclean, I'll try that on my repo and let you know.
austriker27 commentedon Oct 17, 2020
Follow up: I can confirm fixing the line break fixed my particular issue! Thanks so much Duncan! I'm actually happy it was just an error in my code rather than error in the gentlemen's code. 😀
Should I close this? Or if its left open, rename it?
duncanmcclean commentedon Oct 17, 2020
Just keep it open until the gents confirm if it's something that should be fixed or not.
jasonvarga commentedon Oct 23, 2020
Yeah line breaks like that shouldn't affect it. This is a bug.