# Is this a bug? where\_exp not supporting more than 2 or operator

**URL:** <https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016>\
**Category:** Help\
**Created:** [March 5, 2020, 9:59am UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016 "2020-03-05T09:59:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sigul](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sigul/32/1554_2.png) [@sigul](https://talk.jekyllrb.com/u/sigul)\
**Post date:** [March 5, 2020, 9:59am UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/1 "2020-03-05T09:59:22Z")

</div>

I have this code working

```
<ul>
{% assign posts=site.posts | where_exp: "post", "post.categories contains 'one' or post.categories contains 'four' " %}
<ul>
{% for post in posts %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>

```

and this one generating the following error

```
<ul>
{% assign posts=site.posts | where_exp: "post", "post.categories contains 'one' or post.categories contains 'four' or post.categories contains 'two' " %}
<ul>
{% for post in posts %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>

```

error generated

` Liquid Exception: Liquid syntax error (line 4): Expected end_of_string but found id in /_layouts/archive.html`

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 5, 2020, 12:49pm UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/2 "2020-03-05T12:49:08Z")

</div>

@sigul Yep, this looks like a bug to me.  
Could you open an issue ticket at [https://github.com/jekyll/jekyll](https://github.com/jekyll/jekyll)…?  
Thanks.

---

<div class="post-metadata">

**Author:** ![sigul](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sigul/32/1554_2.png) [@sigul](https://talk.jekyllrb.com/u/sigul)\
**Post date:** [March 6, 2020, 10:21pm UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/3 "2020-03-06T22:21:52Z")

</div>

thanks @ashmaroli for fixing it! but, how am I supposed to get the fix? I mean, do I need to edit the Gemfile with this

`gem "jekyll", github: "jekyll/jekyll"`

?

I did a `gem update jekyll` followed by `bundle install` but the bug persist, so I assume it’s not yet available through the gems. Please understand I am a total newbie and not a dev.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 6, 2020, 10:54pm UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/4 "2020-03-06T22:54:22Z")

</div>

I don’t think it is fixed, he is just saying he thinks it is a bug.

The link he put is for you to go and file an issue there, which is where the people working on jekyll want to look for things they actually need to fix. So click that link, then look for the Issues tab and make a post there just like your first post so that it will be an Issue they can track.

---

<div class="post-metadata">

**Author:** ![sigul](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sigul/32/1554_2.png) [@sigul](https://talk.jekyllrb.com/u/sigul)\
**Post date:** [March 7, 2020, 9:52am UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/5 "2020-03-07T09:52:07Z")

</div>

I did and he fixed and it was pulled as far as I understand here: [https://github.com/jekyll/jekyll/issues/8046#event-3105944926](https://github.com/jekyll/jekyll/issues/8046#event-3105944926)

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 7, 2020, 6:23pm UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/6 "2020-03-07T18:23:10Z")

</div>

ah, that makes a lot more sense!

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 8, 2020, 6:06am UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/7 "2020-03-08T06:06:31Z")

</div>

@sigul, Are you saying that the bug still exists even when you use the `master` branch of the Jekyll repository?  
If yes, I want to make sure that your project is indeed using the `master` branch. You can check by running `bundle info jekyll` in your project directory. The steps would be:

```bash
# 1. ensure that you're in your project directory
cd /absolute_path/to/project/directory 

# 2. check Bundler version
bundle -v
# => Bundler version 2.1.4

# 3. Get info about jekyll used..
# If Bundler version is older than v2.0 use `bundle show` instead.
bundle info jekyll
# => * jekyll (4.0.0 a1c18b6)
# Summary: A simple, blog aware, static site generator.
# Homepage: https://jekyllrb.com
# Path: <ruby-location>/lib/ruby/gems/<ruby-series>/bundler/gems/jekyll-a1c18b6e8712

```

In the above example,

- `<ruby-location>` refers to the root dir where you have Ruby installed.
- `<ruby-series>` refers to the Ruby series. e.g. `2.5.0`, or `2.6.0`
- `jekyll-a1c18b6e8712` refers to the gem-name and commit SHA (from the repository) currently used.

If in spite of having used the `master` branch doesn’t resolve the issue (or caused some other bug), please let me know. I will try and patch it.  
Also, it’d be great if you could provide a test repo that I can just clone at my end to reproduce this issue.

* * *

P.S. If the info tells you that you’re using `<gem-dir-path>/jekyll-4.0.0` instead, please _edit_ your Gemfile to use the `master` branch. Jekyll 4.1 will take some time to be available via the `gem` command.

---

<div class="post-metadata">

**Author:** ![sigul](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sigul/32/1554_2.png) [@sigul](https://talk.jekyllrb.com/u/sigul)\
**Post date:** [March 8, 2020, 4:29pm UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/8 "2020-03-08T16:29:07Z")

</div>

Hi thanks for supporting, but I am not sure I understood.  
So, once I add `gem "jekyll", github: "jekyll/jekyll"`to my Gemfile, I get ` **ERROR: directory is already being watched!** `, but the server starts and everything works fine.

My question was if I could just use `gem "jekyll"` and the answer is not because otherwise the server won’t even start because of the bug.

everything seems ok once I add the jekyll/jekyll option (is this the master?)

Directory: /Users/admin/Desktop/building-jekyll/vendor/bundle/ruby/2.6.0/bundler/gems/jekyll-a1c18b6e8712/test/fixtures/test-theme/\_symlink

```
    is already being watched through: /Users/admin/Desktop/building-jekyll/vendor/bundle/ruby/2.6.0/bundler/gems/jekyll-a1c18b6e8712/test/fixtures/test-theme/_layouts

    MORE INFO: https://github.com/guard/listen/wiki/Duplicate-directory-errors

```

[2020-03-08 17:12:12] ERROR `/apple-touch-icon-precomposed.png' not found. [2020-03-08 17:12:12] ERROR `/apple-touch-icon.png’ not found.  
^C% ➜ building-jekyll bundle -v  
Bundler version 2.1.4  
➜ building-jekyll bundle info jekyll

- jekyll (4.0.0 a1c18b6)  
Summary: A simple, blog aware, static site generator.  
Homepage: [https://jekyllrb.com](https://jekyllrb.com)  
Path: /Users/admin/Desktop/building-jekyll/vendor/bundle/ruby/2.6.0/bundler/gems/jekyll-a1c18b6e8712

I will create a repo, but I am having some issue with setting up the local git repository because I can’t fix this  
hint: You’ve added another git repository inside your current repository.  
hint: Clones of the outer repository will not contain the contents of  
hint: the embedded repository and will not know how to obtain it.  
hint: If you meant to add a submodule, use:  
hint:  
hint: git submodule add vendor/bundle/ruby/2.6.0/bundler/gems/jekyll-a1c18b6e8712  
hint:  
hint: If you added this path by mistake, you can remove it from the  
hint: index with:  
hint:  
hint: git rm --cached vendor/bundle/ruby/2.6.0/bundler/gems/jekyll-a1c18b6e8712  
hint:  
hint: See “git help submodule” for more information.

will do it later

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 8, 2020, 5:07pm UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/9 "2020-03-08T17:07:00Z")

</div>

Yes, `bundler/gems/jekyll-a1c18b6e8712` is pointing to the `master`.  
I’m not sure why you keep getting the symlink warning because Jekyll 4.0 ignores `vendor/bundle` directory automatically.

Regarding creating a test repo, you have to do it as a fresh directory. Not within your existing Git repository.  
If you’re not comfortable, no issues. From your post, it is clear that the fix on `master` doesn’t throw an error and abort your build midway.

---

<div class="post-metadata">

**Author:** ![sigul](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/sigul/32/1554_2.png) [@sigul](https://talk.jekyllrb.com/u/sigul)\
**Post date:** [March 9, 2020, 11:24am UTC](https://talk.jekyllrb.com/t/is-this-a-bug-where-exp-not-supporting-more-than-2-or-operator/4016/10 "2020-03-09T11:24:18Z")

</div>

[here’s the repo](https://github.com/sigul/building-jekyll)

still can’t fix the “directory its already being watched” error, I thought it was related to the fact I initialised a repo for error in the parent directory, but I removed the .git related staff and didn’t solve.
