# Deprecated functions

**URL:** <https://discourse.gohugo.io/t/deprecated-functions/24255>\
**Category:** support\
**Created:** [March 26, 2020, 11:03am UTC](https://discourse.gohugo.io/t/deprecated-functions/24255 "2020-03-26T11:03:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DirkC](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dirkc/32/8628_2.png) [@DirkC](https://discourse.gohugo.io/u/DirkC)\
**Post date:** [March 26, 2020, 11:03am UTC](https://discourse.gohugo.io/t/deprecated-functions/24255/1 "2020-03-26T11:03:25Z")

</div>

When I launch Hugo I get the following messages:

```
WARN 2020/03/26 11:19:23 Page.Hugo is deprecated and will be removed in a future release. Use the global hugo function.

WARN 2020/03/26 11:19:23 Page.Dir is deprecated and will be removed in a future release. Use .File.Dir

WARN 2020/03/26 11:19:23 Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url

```

I searched this forum - and the first one seems to be generated by .Hugo.Generator. When I replace by hugo.Generator the warning changes to  
`WARN 2020/03/26 11:33:08 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}`

I checked all the templates both in the theme & my own - but I can’t find Page.Dir or Page.URL in the source files so I’m a bit lost. I guess like with the first warning caused by .Hugo.Generator they are called by some other function but I wouldn’t know where to look.

Any suggestions? I use Hugo v0.68.3 on Mac. Code is here [https://github.com/dceuppens/hugo-testing](https://github.com/dceuppens/hugo-testing)

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [March 26, 2020, 11:47am UTC](https://discourse.gohugo.io/t/deprecated-functions/24255/2 "2020-03-26T11:47:57Z")

</div>

You have a reference to `.Dir` [here](https://github.com/dceuppens/hugo-testing/blob/master/layouts/partials/subnav.html#L8)

`.URL` [here](https://github.com/dceuppens/hugo-testing/blob/master/layouts/_default/single.html#L8)

and `.Hugo` [here](https://github.com/dceuppens/hugo-testing/blob/master/layouts/partials/header.html#L9).

---

<div class="post-metadata">

**Author:** ![DirkC](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dirkc/32/8628_2.png) [@DirkC](https://discourse.gohugo.io/u/DirkC)\
**Post date:** [March 26, 2020, 11:55am UTC](https://discourse.gohugo.io/t/deprecated-functions/24255/3 "2020-03-26T11:55:41Z")

</div>

Problem was that I was looking for the page. rather than .url or .dir  
Really appreciate your help.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [March 28, 2020, 11:55am UTC](https://discourse.gohugo.io/t/deprecated-functions/24255/4 "2020-03-28T11:55:52Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
