Wowchemy-hugo-modules: Talk.html : runtime error : index out of range

Created on 20 Dec 2017  路  5Comments  路  Source: wowchemy/wowchemy-hugo-modules

Hello,

I pulled the latest revision, and now I cannot build my site anymore, using Hugo v0.31.1 (latest version). The site was building just fine yesterday, and now I get an error message related to talk.html:

Failed to render "theme/section/talk.html": runtime error: index out of range

Any hints on how to fix it ?

Thanks !

Most helpful comment

I had the same error after updating the theme. It seems there were two things causing the problem:

  • I only had a date field in my talk page, no time_start field; I had to change date to time_start.
  • The date/time_start value had _quotes_ around the datetime object; I had to remove the quotes.

Previous content/talk/sometalkpage.md:

+++
date = "2017-10-10T17:00:00"
title = [...]

Corrected:

+++
time_start = 2017-10-10T17:00:00
title = [...]

All 5 comments

It seems to be related to commit https://github.com/gcushen/hugo-academic/commit/ed61956cfa649598a36211e39e27bb621dfb9507, as when I rebase my repo to commit https://github.com/gcushen/hugo-academic/commit/18080b113754b3044ad89eb68aaca37c4364ad20, my problem is gone.

EDIT:

And of course I added time_start at the beginning of my talk .md file. I tried with date + time_start, only time_start and only date, same problem.

There is an example of a fully functioning talk front matter in the Demo site, perhaps it might help: https://raw.githubusercontent.com/gcushen/hugo-academic/master/exampleSite/content/talk/example-talk.md

I had the same error after updating the theme. It seems there were two things causing the problem:

  • I only had a date field in my talk page, no time_start field; I had to change date to time_start.
  • The date/time_start value had _quotes_ around the datetime object; I had to remove the quotes.

Previous content/talk/sometalkpage.md:

+++
date = "2017-10-10T17:00:00"
title = [...]

Corrected:

+++
time_start = 2017-10-10T17:00:00
title = [...]

Since v2.0.0, date is used to represent the date that the talk page was created or last updated and time_start and time_end are used to represent the time of the talk. Note that time_end is optional.

Also, the date/time fields were converted from string format to the TOML date/time format by removing the quotes as @sbibauw mentioned.

Thanks for your replies, @gcushen and @sbibauw !

It was indeed the quotes that I forgot to remove, my bad ! It's fixed now, and building fine :)

Was this page helpful?
0 / 5 - 0 ratings