Skip to content
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

Liquid syntax error / warning: Expected dotdot but found id in ... #479

Closed
1 of 5 tasks
vwchu opened this issue Aug 25, 2016 · 4 comments
Closed
1 of 5 tasks

Liquid syntax error / warning: Expected dotdot but found id in ... #479

vwchu opened this issue Aug 25, 2016 · 4 comments

Comments

@vwchu
Copy link
Contributor

vwchu commented Aug 25, 2016

  • This is a question about using the theme.
  • I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.
  • This is a feature request.
  • I have updated all gems with bundle update.
  • I have tested locally with bundle exec jekyll build.

Environment informations

  • Minimal Mistakes version: 3.4.3
  • github-pages or jekyll gem version: Github-pages 93 and Jekyll 3.2.1 and Liquid 3.0.6
  • Operating system: Ubuntu 14.04 LTS (Vagrant ubuntu/trusty64)

Expected behavior

I updated the theme to 3.4.3 and ran bundle install. After upgrading while trying to generate the site with bundle exec jekyll build, I encountered the following warning / error for Liquid:

Liquid Warning: Liquid syntax error (line 3): Expected dotdot but found id in "(page.header.overlay_color or page.header.overlay_image) or page.header.image" in /_layouts/single.html
Liquid Warning: Liquid syntax error (line 1): Expected dotdot but found id in "(page.header.overlay_color or page.header.overlay_image) or page.header.image" in /_layouts/archive.html
Liquid Warning: Liquid syntax error (line 3): Expected dotdot but found id in "(page.header.overlay_color or page.header.overlay_image) or page.header.image" in /_layouts/splash.html

Appears to be the same error as mmistakes/so-simple-theme#141, where parentheses are not permitted by Liquid. So to fix this issue we should just remove the offending parentheses as specified by the error message.

@mmistakes
Copy link
Owner

Curious do the page header images or overlays still render properly in the _site files? What are the contents of your Gemfile.lock.

I haven't been able to reproduce the error on Mac OS X or Windows, so curious if it's an older gem or just an environment thing.

I'll have to do some testing with your pull request since it fundamentally changes the conditional and it might miss some edge cases doing "x or y or z" instead of "(x or y) or z"

@mmistakes
Copy link
Owner

So I just did bundle update and it bumped Jekyll to 3.2.1 and now I'm seeing the warning. Looks to be just a warning and the HTML generates fine.

I'll test out your PR and get back to you to verify nothing breaks.

glennsarti added a commit to glennsarti/glennsarti.github.io that referenced this issue Sep 2, 2016
B-Galati added a commit to B-Galati/b-galati.github.io that referenced this issue Sep 6, 2016
@yanlee26
Copy link

yanlee26 commented Feb 4, 2018

Waiting for the bug's fix ASAP...

@MoralCode
Copy link

MoralCode commented Nov 26, 2020

I was able to get rid of the warning by removing the parenthesis. in your case where doing so would fundamentally affect the conditional, maybe you could use jekyll to assign a variable with just the part of the conditional in parenthesis to force it to evaluate first, and then use that in place of the parenthesis in the original location of your conditional.

Considering I don't even use this theme, i suspect this may be a jekyll issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants