error code help - ERR: reflect: call of reflect.Value.Int on string Value

35 views
Skip to first unread message

David Kebler

unread,
Sep 16, 2014, 4:31:03 PM9/16/14
to hugo-d...@googlegroups.com
ERROR: 2014/09/16 error processing shortcode shortcodes/image.html
 ERR: reflect: call of reflect.Value.Int on string Value


Have started to get the above error code from my shortcode (derived from figure).   It's not coming from anything in the md file parsing as I turned off draftbuilds

I've narrowed it down to this part of the code which as I mentioned is unchanged from the original figure shortcode!

I don't need that part of the code right now (the figure title) but still wondering what is going on and what that error means

<figure {{ with .Get "position" }}class="{{.}}"{{ end }}>
{{ with .Get "link"}}<a href="{{.}}">{{ end }}
<img src="{{ .Page.Params.imagespath }}{{ .Get "filename" }}"{{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
{{ if .Get "link"}}</a>{{ end }}

{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>

<!-- throws error from this part -->
{{ if isset .Params "title" }}
<h4>{{ .Get "title" }}</h4>{{ end }}
<!-- throws error --
>

{{ if or (.Get "caption") (.Get "attr")}}<p>
{{ .Get "caption" }}
{{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
{{ .Get "attr" }}
{{ if .Get "attrlink"}}</a> {{ end }}
</p> {{ end }}

</figcaption>

{{ end }}

</figure>

Guy Mograbi

unread,
May 28, 2015, 5:46:37 PM5/28/15
to hugo-d...@googlegroups.com

Getting the same thing. is there any answer to this?
Reply all
Reply to author
Forward
0 new messages