# Missing comment-reply JS out-of-the-box

**URL:** https://discourse.roots.io/t/missing-comment-reply-js-out-of-the-box/12948
**Category:** sage
**Created:** 2018-07-15T09:15:01Z
**Posts:** 5

## Post 1 by @jakub — 2018-07-15T09:15:01Z

When I download and install the sage theme, the comment replies don’t work. When I click on Reply on a comment, it doesn’t move the comment form to the proper position and I get this error in the console:

```
Uncaught ReferenceError: addComment is not defined
at HTMLAnchorElement.onclick ((index):181)
onclick @ (index):181
```

Line 181 in index is this:

```
<div class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-101175' onclick='return addComment.moveForm( "div-comment-101175", "101175", "respond", "14898" )'>
```

I checked the history and it was removed in this commit (9.0.0-alpha.1: August 30th, 2016) but it doesn’t say why: [https://github.com/roots/sage/commit/d217ba6](https://github.com/roots/sage/commit/d217ba6)

I was able to fix for myself by adding it back here:

```
/**
 * Theme assets
 */
add_action('wp_enqueue_scripts', function () {
    wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), false, null);
    wp_enqueue_script('sage/main.js', asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script( 'comment-reply' ); // this fixes comment replies
}, 100);
```

Can anyone please elaborate on why was this removed? Is this a bad practice? What’s the best way to fix it then?

---

## Post 2 by @ben — 2018-07-15T17:06:02Z

Yikes, not exactly sure why I made that change but definitely didn’t expect it to cause any errors. We should probably just re-add [https://github.com/roots/sage/commit/d217ba6](https://github.com/roots/sage/commit/d217ba6)

---

## Post 3 by @jakub — 2018-07-15T20:02:27Z

Alright, do you want to do that, or how can I help?

---

## Post 4 by @ben — 2018-07-18T18:55:07Z

This would be good/easy PR for anyone wanting to dip their hands into open-source :smiley:

---

## Post 5 by @jakub — 2018-07-20T19:33:29Z

Oh I see that @danielroe just [fixed it](https://github.com/roots/sage/pull/2085/commits/ca66c0c43d4645b2bcf946f6b38f0fbfbe587597) 2 days ago. Thanks so much!
