# Template file being ignored by writeStats

**URL:** <https://discourse.gohugo.io/t/template-file-being-ignored-by-writestats/26447>\
**Category:** support\
**Created:** [June 23, 2020, 1:51am UTC](https://discourse.gohugo.io/t/template-file-being-ignored-by-writestats/26447 "2020-06-23T01:51:18Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![divinerites](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/divinerites/32/12625_2.png) [@divinerites](https://discourse.gohugo.io/u/divinerites)\
**Post date:** [September 28, 2020, 5:52pm UTC](https://discourse.gohugo.io/t/template-file-being-ignored-by-writestats/26447/7 "2020-09-28T17:52:08Z")

</div>

OK. I could narrow the problem, and produce it at will.

### Case 1 : Original code : The problem occurs in partial `crise.html`.

```go-html-template
<a href="{{ site.Params.cta.btnURL | relURL }}" class="btn btn-default btn-contact wow fadeInDown" data-wow-delay=".4s" data-wow-duration="500ms" title="Plus d'information">{{ site.Params.cta.btnText }}</a>

{{ partial "crise.html" . }}

```

### Case 2 : Not working either : If I add the class in a href =\> not added to json.

```go-html-template
<a href="{{ site.Params.cta.btnURL | relURL }}" class="crise btn btn-default btn-contact wow fadeInDown" data-wow-delay=".4s" data-wow-duration="500ms" title="Plus d'information">{{ site.Params.cta.btnText }}</a>

```

### Case 3 : And here we go ! : If I add the same line but with **only the crise class** it works !!

```go-html-template
<a href="{{ site.Params.cta.btnURL | relURL }}" class="crise">{{ site.Params.cta.btnText }}</a>

```

And it also add some other missing classes I had in my partial: “crise”, “crise-text”,“crise-titre”,

So it seem that the parsing was interrupted or something.

[EDIT]

### FOUND THE CAUSE

I could narrow the problem.  
When I remove the **title=“Plus d’information”** (simplified case 2) it works too !

So the **minimal code to have the problem** is this line :

```html
<a href="{{ site.Params.cta.btnURL | relURL }}" class="crise" title="Plus d'information">{{ site.Params.cta.btnText }}</a>

```

So the culprit seems **title=“Plus d’information”** clashing with something.  
Strange

### Same problem than OP

> [@AlanBreck](#):
>
> `<a title="Learn more about Brave's release channel."`

Yes, this is the same pattern than OP. Problem occurs when there is a `'` in title value.  
Whoa ! Nasty one.

[EDIT] Filled a bug in GitHub : [Class not writen in hugo\_stats.json when there is an apostrophe (') in (a href) title value. · Issue #7746 · gohugoio/hugo · GitHub](https://github.com/gohugoio/hugo/issues/7746)

---

_[View the full topic](https://discourse.gohugo.io/t/template-file-being-ignored-by-writestats/26447)._
