Issue with Reject Array Filter filter when using the Section Rendering API
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
Hi everyone,
I am trying to use the new | reject filter for arrays. It works fine when the page is rendered normally (even though theme-check still considers it an unknown filter). However, when I fetch the same section using the Section Rendering API, it returns an error.
Liquid Code:
{% assign final_actives_promos = final_actives_promos | reject: 'display_name', promo.display_name %}
Error Message:
Liquid syntax error (snippets/cart-drawer line 53): Expected end_of_string but found dash in "{{final_actives_promos -check-: 'display_name', promo.display_name }}"
Has anyone encountered this issue or can provide some insights?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with snippets/cart-drawer line 53 and reproduce the same Liquid code through normal rendering and the Section Rendering API. Compare how the reject filter is parsed in each path; the issue is resolved when the API handles this filter consistently with normal rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100