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

When building/serving, "error calling index: index of untyped nil" #57

Closed
ryanstraight opened this issue Dec 19, 2018 · 3 comments
Closed

Comments

@ryanstraight
Copy link

Attempting to build/serve site and receive this error. Osprey version 1.3.0, Hugo version 0.52/extended windows/amd64.

Building sites … ERROR 2018/12/19 08:57:13 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial " header.html...>: error calling partial: "C:\Hugo\Sites\site\git\themes\osprey\layouts\partials\header.html:79:95": execute of template failed: template: partials/header.html :79:95: executing "partials/header.html" at <index .Site.Data.cac...>: error calling index: index of untyped nil

ERROR 2018/12/19 08:57:13 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "header.html...>: error calling partial: "C:\Hugo\Sites\site\git\themes\osprey\layouts\partials\header.html:79:95": execute of template failed: template: partials/header.html:79:95: executing "partials/header.html" at <index .Site.Data.cac...>: error calling index: index of untyped nil

ERROR 2018/12/19 08:57:13 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "header.html...>: error calling partial: "C:\Hugo\Sites\site\git\themes\osprey\layouts\partials\header.html:79:95": execute of template failed: template: partials/header.html:79:95: executing "partials/header.html" at <index .Site.Data.cac...>: error calling index: index of untyped nil Total in 175 ms

Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: index.html:3:5: executing "index.html" at <partial "header.html ...>: error calling partial: "C:\Hugo\Sites\site\git\themes\osprey\layouts\partials\header.html:79:95": execute of template failed: template: partials/header.html:79:95: exe cuting "partials/header.html" at <index .Site.Data.cac...>: error calling index: index of untyped nil

@tomanistor
Copy link
Owner

@ryanstraight, could I please see your config file also? Did you try to set up cache busting of assets?

@chrisarusso
Copy link

FWIW @ryanstraight when I updated the two lines from the included config.toml

from

# Cache busting of static resources (additional set up required)
cacheBustCSS = true
cacheBustJS = true

to

# Cache busting of static resources (additional set up required)
cacheBustCSS = false
cacheBustJS = false

the site loaded for me. I did not set up cachebusting initially, so it should probably work for you too if you hadn't set it up.

@tomanistor
Copy link
Owner

That's likely the issue.

That cache-busting feature was added to the theme before Hugo Asset Pipelines were released with Hugo v0.43. One of my goals is to update this theme to use the Hugo Asset Pipelines instead of
relying on users of the theme manually setting up cache-busting, which would prevent errors like this.

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

No branches or pull requests

3 participants