Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Fails with latest Hugo / Go 1.6 #6

Open
bep opened this issue Apr 8, 2016 · 4 comments
Open

Fails with latest Hugo / Go 1.6 #6

bep opened this issue Apr 8, 2016 · 4 comments

Comments

@bep
Copy link

bep commented Apr 8, 2016

Not sure what it is, but the demo site fails:

ERROR: 2016/04/08 22:44:19 template.go:131: template: theme/partials/footer.html:10:70: executing "theme/partials/footer.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0 in theme/partials/footer.html
ERROR: 2016/04/08 22:44:19 template.go:131: template: theme/partials/footer.html:10:70: executing "theme/partials/footer.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0 in theme/partials/footer.html
ERROR: 2016/04/08 22:44:19 template.go:131: template: theme/partials/footer.html:10:70: executing "theme/partials/footer.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0 in theme/partials/footer.html
ERROR: 2016/04/08 22:44:19 template.go:131: template: theme/partials/footer.html:10:70: executing "theme/partials/footer.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0 in theme/partials/footer.html
ERROR: 2016/04/08 22:44:19 template.go:131: template: theme/partials/footer.html:10:70: executing "theme/partials/footer.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0 in theme/partials/footer.html
ERROR: 2016/04/08 22:44:19 template.go:131: template: theme/partials/footer.html:10:70: executing "theme/partials/footer.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0 in theme/partials/footer.html
@justinsteven
Copy link
Contributor

For what it's worth, I can reproduce this only when all of the following conditions are met:

  • Seems like any version of Hugo/Go e.g. Hugo 1.5 (latest binary release) or Hugo built from 9f6b5ad3b4f2ab7815a475cdf9d7dc354701ebb6 using Go 1.6 (Debian Stretch's package)
  • hugo-zen at 0b977e8 (i.e. before copyright started being pulled from the global config var as opposed to from params)
  • The "copyright" value in [params] is not set

Does it work when you update to the latest hugo-zen or set the "copyright" value in [params]?

@bep
Copy link
Author

bep commented Apr 9, 2016

I work with getting plenty of themes running on themes.gohugo.io and have limited time to debug individual themes. The use of params in footer should check if it exist before used.

@justinsteven
Copy link
Contributor

Gotcha. I'm not the author, just a user doing some maintenance.

https://github.com/spf13/HugoBasicExample works fine for me using hugo-zen at current HEAD. It fails using an old commit (hugo-zen at d052d19001b540c8670cccb050cb3fd3f52965c4)

The line in footer that you're kicking out errors on has been changed recently to pull the copyright text from .Site.copyright instead of .Site.Params.copyright which "fixes" the errrors.

Moving the unchecked string out of params might be simply paving over an issue though. Is it a party foul to not bother checking if .Site.copyright exists before using it?

@rakuishi
Copy link
Owner

rakuishi commented Oct 25, 2016

Well, OK, I'll fix it.

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

No branches or pull requests

3 participants