# Updating from V0.48 to V0.49 broke build

**URL:** <https://discourse.gohugo.io/t/updating-from-v0-48-to-v0-49-broke-build/14519>\
**Category:** support\
**Created:** [October 1, 2018, 3:44pm UTC](https://discourse.gohugo.io/t/updating-from-v0-48-to-v0-49-broke-build/14519 "2018-10-01T15:44:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Apollinaire](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/apollinaire/32/6420_2.png) [@Apollinaire](https://discourse.gohugo.io/u/Apollinaire)\
**Post date:** [October 1, 2018, 3:44pm UTC](https://discourse.gohugo.io/t/updating-from-v0-48-to-v0-49-broke-build/14519/1 "2018-10-01T15:44:48Z")

</div>

After updating to v0.49, running `hugo serve` failed. The errors were of the kind :  
`Failed to render "people/single.html": reflect.AppendSlice: interface {} != map[string]interface {}`  
There were like 10 errors, all related to what was inside my `/layouts` folder. I could get the build to run by removing the files that appeared in the errors, but then all my pages were blank.  
The most basic page I had to remove was:  
`{{ define "main" }} <div> Some static html for my 404 page </div> {{ end }}`  
and this was located at `layouts/404.html`. I must add that there is a pretty big `_default/baseof.html` file, but I could get the build to run without changing it.  
What am I doing wrong ?  
I’m guessing it has to do with the update on page bundles in v0.49, but I don’t know what’s wrong. Also, `reflect.AppendSlice: interface {} != map[string]interface {}` seems like a Go error about types, but my only Go knowledge is what I learnt building hugo sites, so I don’t know how to understand it.  
Could someone explain me ?  
Thanks

---

<div class="post-metadata">

**Author:** ![Hanzei](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hanzei/32/5738_2.png) [@Hanzei](https://discourse.gohugo.io/u/Hanzei)\
**Post date:** [October 1, 2018, 4:54pm UTC](https://discourse.gohugo.io/t/updating-from-v0-48-to-v0-49-broke-build/14519/2 "2018-10-01T16:54:16Z")

</div>

I did run into the same problem. There is a GitHub issue for this: [https://github.com/gohugoio/hugo/issues/5269](https://github.com/gohugoio/hugo/issues/5269)

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [October 1, 2018, 4:56pm UTC](https://discourse.gohugo.io/t/updating-from-v0-48-to-v0-49-broke-build/14519/3 "2018-10-01T16:56:45Z")

</div>

This is my mistake and I will fix it. But would it be possible to see your failing template code? What are you calling when this fails? `slice`?

---

<div class="post-metadata">

**Author:** ![Apollinaire](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/apollinaire/32/6420_2.png) [@Apollinaire](https://discourse.gohugo.io/u/Apollinaire)\
**Post date:** [October 2, 2018, 5:26pm UTC](https://discourse.gohugo.io/t/updating-from-v0-48-to-v0-49-broke-build/14519/4 "2018-10-02T17:26:08Z")

</div>

Hi and thanks for the quick feedback.  
I reinstalled v0.49 from the .deb package (i’m running on Ubuntu 16.04) and tried to locate where I was using `slice` in my templates. I located one place in a partial used to generate the menu bar, removed it, and my code ran again with v0.49.  
Here is the code snippet that was problematic:

```auto
{{- $.Scratch.Set "submenu" slice -}}
{{- $.Scratch.Add "submenuHas" "" -}}

{{- range .Site.Params.menu.main -}}
{{- if not .identifier -}}
{{- $.Scratch.Add "submenu" (slice .) -}}
{{- end -}}
{{- end -}}

```

**Behavior** : It’s pretty weird because in the snippet above you can see that the `slice` function is being used twice. Whenever there is only once `slice` call made the build succeds. It does not depend on which one I remove, as log as I only use `slice` once.

Hope that helps.

If anyone wonders, it’s used to generate the submenus for [this site](https://live-for-good.org).

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [October 2, 2018, 6:01pm UTC](https://discourse.gohugo.io/t/updating-from-v0-48-to-v0-49-broke-build/14519/5 "2018-10-02T18:01:08Z")

</div>

> <https://github.com/gohugoio/hugo/issues/5275>

But note that the scratch constructs with Add should now be possible to write cleaner with append.
