Liquid Exception: Liquid error

This is a new error I’m getting on both of my Jekyll sites since two days ago:

Liquid Exception: Liquid error (line 7): Unknown operator age in /_layouts/post.html

The layout in question looks like this:

If I remove the top three includes I get the same error, but on Line 15:

Liquid Exception: Liquid error (line 15): Unknown operator age in /_layouts/post.html
jekyll 3.4.3 | Error: Liquid error (line 15): Unknown operator age

Anybody else have this issue recently?

M

on line 13 try adding spaces around page.subtitle. I bet that age is really page and it doesn’t like that there is no space bettween the brackets and page. I am not aware that spacing is required but maybe it is.

What do the youtubeLoop.html and social-share.html includes look like? I’d put money on the issue being in one of those.

Liquid was updated recently in Jekyll and it’s likely flagging something that previously silently failed.

Also have you tried updating to the latest version? Looks like you’re at 3.4.3 while the current version is 3.5.2

on line 13 try adding spaces around page.subtitle. I bet that age is really page and it doesn’t like that there is no space bettween the brackets and page. I am not aware that spacing is required but maybe it is.

Tried that. Doesn’t seem to be the issue…

Updated to 3.5.2, same issue.

Here’s what those files look like:

youtubeLoop.html

social-share.html

You have a public repo? Might be easier for us to debug since you have a bit of Inception going on with includes inside an include inside another include.

Also have you tried running Jekyll with --verbose and --trace to maybe clue you in where the error is occurring? Might let you know what include is the problem or if there is content from a specific page/post causing issues.

jekyll build --verbose --trace

You can also put Liquid and YAML into strict modes by adding the following to your _config.yml

strict_front_matter: true
liquid:
  error_mode: strict

Might help you identify if you have bad YAML Front Matter in posts or invalid Liquid in your layouts/includes.

You have a public repo? Might be easier for us to debug since you have a bit of Inception going on with includes inside an include inside another include.

Here’s the repo: https://github.com/discoform/numberzs/

You can also put Liquid and YAML into strict modes by adding the following to your _config.yml

Added strict mode to my config file and now get:

Liquid Exception: Liquid syntax error (line 7): Expected end_of_string but found id in "p.url==p age.url" in /Applications/MAMP/htdocs/numberzs/_includes/nav.html, included in /_layouts/post.html
jekyll 3.5.2 | Error:  Liquid syntax error (line 7): Expected end_of_string but found id in "p.url==p age.url"

Check your nav.html include as that error suggests. You have a typo.

p age instead of page

Yep, two typos in the site. One in nav.html and one in footer.html

Strict mode was very very helpful. Thanks for the suggestions and solution. I’ll check and (hopefully) fix the other project now.

1 Like