# Comments iframe not rendering in local dev

**URL:** <https://forum.ghost.org/t/comments-iframe-not-rendering-in-local-dev/56853>\
**Category:** Developer help\
**Created:** [April 15, 2025, 3:42pm UTC](https://forum.ghost.org/t/comments-iframe-not-rendering-in-local-dev/56853 "2025-04-15T15:42:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![djskinner](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/djskinner/32/35740_2.png) [@djskinner](https://forum.ghost.org/u/djskinner)\
**Post date:** [April 15, 2025, 3:42pm UTC](https://forum.ghost.org/t/comments-iframe-not-rendering-in-local-dev/56853/1 "2025-04-15T15:42:03Z")

</div>

Hello,

I’m familiarising myself with the codebase have successfully got a local setup by following [Ghost Docs](https://ghost.org/docs/install/source/). I was planning to have a go at fixing [if all comments are hidden, no comments (not even hidden ones) are visible · Issue #22331 · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/issues/22331).

However, the comments section is not rendering below a post. It looks like this is a separate app loaded into an iframe. Is there some additional setup required to get this working locally?

The hbs template `post.hbs` has:

```auto
    {{#if comments}}
        <div class="gh-comments gh-canvas">
            {{comments}}
        </div>
    {{/if}}

```

And the rendered HTML is:

```auto
<div class="gh-comments gh-canvas"></div>

```

Which is suggesting the `comments` variable is present in the template but empty.

Further info:

- I’ve got " Who can comment on posts?" set to “All members”
- Tried running with `yarn dev --comments` (after running `yarn` in `apps/comments-ui`)

Additionally I see the announcement bar isn’t shown if I set one which suggests I’m missing a step to get these microfrontend components working locally.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [April 15, 2025, 4:45pm UTC](https://forum.ghost.org/t/comments-iframe-not-rendering-in-local-dev/56853/2 "2025-04-15T16:45:03Z")

</div>

You’re correct about it being a separate app in an iframe. That code lives at apps/comments-ui

It’s probably worth confirming in Ghost admin (under the gear icon \> access ) that you have comments set to members.

The code that should produce the script tag within the gh-comments div has not been changed in several years:

> **[Blaming Ghost/ghost/core/core/frontend/helpers/comments.js at main ·...](https://github.com/TryGhost/Ghost/blame/main/ghost/core/core/frontend/helpers/comments.js)**
>
> Independent technology for modern publishing, memberships, subscriptions and newsletters. - Blaming Ghost/ghost/core/core/frontend/helpers/comments.js at main · TryGhost/Ghost

So, please check the access setting! Having it off would give exactly the behavior described.

---

<div class="post-metadata">

**Author:** ![djskinner](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/djskinner/32/35740_2.png) [@djskinner](https://forum.ghost.org/u/djskinner)\
**Post date:** [April 15, 2025, 5:58pm UTC](https://forum.ghost.org/t/comments-iframe-not-rendering-in-local-dev/56853/3 "2025-04-15T17:58:23Z")

</div>

> It’s probably worth confirming in Ghost admin (under the gear icon \> access ) that you have comments set to members.

I double checked and I do have it set to “All members”.

Thanks for pointing me to the comments template helper. So what I’m seeing is that `this.comment_id` is `null`, hence the early return here:

```auto
    // todo: For now check on the comment id to exclude normal pages (we probably have a better way to do this)
    const commentId = this.comment_id;
    if (!commentId) {
        return;
    }

```

I don’t yet understand why a post page (e.g. [http://localhost:2368/sit-quae-dolore-a-aspernatur-dolor-molestiae-quia-eligendi-726/](http://localhost:2368/sit-quae-dolore-a-aspernatur-dolor-molestiae-quia-eligendi-726/)) would have a comment id in its context.

However, if I comment that early return out then the comments app renders which unblocks me to look at what I was originally aiming to do.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![djskinner](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/djskinner/32/35740_2.png) [@djskinner](https://forum.ghost.org/u/djskinner)\
**Post date:** [April 16, 2025, 9:18am UTC](https://forum.ghost.org/t/comments-iframe-not-rendering-in-local-dev/56853/4 "2025-04-16T09:18:10Z")

</div>

FYI I’ve attempted a fix for the aforementioned bug here: [🐛 Fixed if all comments are hidden, no comments are visible by djskinner · Pull Request #22912 · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/pull/22912)
