Is this a bug? where_exp not supporting more than 2 or operator

I have this code working

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

and this one generating the following error

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

error generated

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

@sigul Yep, this looks like a bug to me.
Could you open an issue ticket at…?

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.

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.

I did and he fixed and it was pulled as far as I understand here:

ah, that makes a lot more sense!

@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:

# 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:
#        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.

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


[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.
    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: git submodule add vendor/bundle/ruby/2.6.0/bundler/gems/jekyll-a1c18b6e8712
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: git rm --cached vendor/bundle/ruby/2.6.0/bundler/gems/jekyll-a1c18b6e8712
hint: See “git help submodule” for more information.

will do it later

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.

here’s the repo

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.