You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@regisphilibert reports at gohugoio/hugo#6472 that hugo --minify breaks on JSON since 59.0, which was right after Hugo updated the versioned dependency on tdewolff/parse and tdewolff/minify. The error message is:
Building sites … ERROR 2019/11/01 16:57:44 parse error:1:1: unexpected character
1: {"output":{"data":{"created":"2010-02-11T12:46:02Z","draf...
^
ERROR 2019/11/01 16:57:44 parse error:1:1: unexpected character
1: {"output":{"data":{"created":"2010-03-08T16:25:25Z","draf...
^
which seems to point to a bug in parse's JSON parser calling valid JSON an error.
@regisphilibert later on produced a MWE for us to test on, but with a different error message:
Error: Error building site: failed to render pages: parse error:1:1: unexpected character '<'
1: <!DOCTYPE html><html><head><title>http://example.org/article/</title><link rel="canonical" href="http://example.org/article/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=http://example.org/article/" /></head></html>
which in turns seem to indicate a bug in Hugo passing HTML code as if it were JSON to Minify (and to parse)
Further tests revealed that commit 7763141 in tdewolff/parse 7763141 as the oldest version of parse in which I could trigger the error.
When you have time, please read gohugoio/hugo#6472 for more details. Unfortunately, I am still struggling to understand the code, and I have exceeded my quota for today for further investigation. So, I'd better turn to expert like you to determine whether there is any bug in parse or minify at all regarding this issue.
Many thanks for your help!
The text was updated successfully, but these errors were encountered:
Looks like this is fixed for parse. Error messages now show correct location and context, and the error messages have been improved. The remaining problem is that in Hugo HTML is being parsed by a JSON parser.
@regisphilibert reports at gohugoio/hugo#6472 that
hugo --minify
breaks on JSON since 59.0, which was right after Hugo updated the versioned dependency on tdewolff/parse and tdewolff/minify. The error message is:which seems to point to a bug in parse's JSON parser calling valid JSON an error.
@regisphilibert later on produced a MWE for us to test on, but with a different error message:
which in turns seem to indicate a bug in Hugo passing HTML code as if it were JSON to Minify (and to parse)
Further tests revealed that commit 7763141 in tdewolff/parse
7763141 as the oldest version of parse in which I could trigger the error.
When you have time, please read gohugoio/hugo#6472 for more details. Unfortunately, I am still struggling to understand the code, and I have exceeded my quota for today for further investigation. So, I'd better turn to expert like you to determine whether there is any bug in parse or minify at all regarding this issue.
Many thanks for your help!
The text was updated successfully, but these errors were encountered: