Disqus - the same comments showing up on multiple pages

Hello,
I found the following problem for the first time after months of use,
In some posts, if I write a comment, it also comes out in others.
It seems that the posts in question are always the same.

This is the code I implemented in the tags {{#post}} and closing {{/ post}} block on post.hbs file:

<Script>
var disqus_config = function () {
this.page.url = '{{url absolute = "true"}}';
this.page.identifier = "ghost - {{comment_id}}";
};

(function () {// DO NOT EDIT BELOW THIS LINE
var d = document, s = d.createElement ('script');
s.src = 'https: //*****.disqus.com/embed.js';
s.setAttribute ('data-timestamp', + new Date ());
(d.head || d.body) .appendChild (s);
}) ();
</ Script>
<noscript> Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"> comments powered by Disqus. </a> </ noscript>

These are the values ​​that I have extrapolated from two posts that give me this problem:
If I write a comment in this post:

id="dsq-app8766" name="dsq-app8766" src="https://disqus.com/embed/comments/?base=default&amp;f=EXAMPLE&amp;t_i=ghost-20&amp;t_u=https%3A%2F%2Fdomain.it%2Fcome-installare-wordpress-nginx-php7-phpmyadmin-ubuntu%2F&amp;t_d=Come%20installare%20Wordpress%20con%20Nginx%20PHP7%20e%20phpMyAdmin%20su%20Ubuntu%2016.04&amp;t_t=Come%20installare%20Wordpress%20con%20Nginx%20PHP7%20e%20phpMyAdmin%20su%20Ubuntu%2016.04&amp;s_o=default#version=6cb1727739307bf00a7ad3423d8f0b2a"

It also comes out in this:

id="dsq-app3028" name="dsq-app3028" src="https://disqus.com/embed/comments/?base=default&amp;f=EXAMPLE&amp;t_i=ghost-5ae5ea1bbaaed86338939473&amp;t_u=https%3A%2F%2Fomain.it%2Fcome-configurare-ufw-firewall-su-ubuntu-18-04-lts%2F&amp;t_d=Come%20configurare%20UFW%20Firewall%20su%20Ubuntu%2018.04%20LTS&amp;t_t=Come%20configurare%20UFW%20Firewall%20su%20Ubuntu%2018.04%20LTS&amp;s_o=default#version=6cb1727739307bf00a7ad3423d8f0b2a"

If I’m not mistaken, this is the "ghost-{{comment_id}}"
it’s different, I should not have problems:
ghost-20
ghost-5ae5ea1bbaaed86338939473

I’m using Ghost last version

What can the problem depend on?
Thank you

Are you using two disqus apps on the same url?

Hello, thanks for the answer.

What do you mean “two app”?

I have only this code block inside {{post}} tag in post.hbs file.

<Script>
var disqus_config = function () {
this.page.url = '{{url absolute = "true"}}';
this.page.identifier = "ghost - {{comment_id}}";
};

(function () {// DO NOT EDIT BELOW THIS LINE
var d = document, s = d.createElement ('script');
s.src = 'https: //*****.disqus.com/embed.js';
s.setAttribute ('data-timestamp', + new Date ());
(d.head || d.body) .appendChild (s);
}) ();
</ Script>
<noscript> Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"> comments powered by Disqus. </a> </ noscript>

d=“dsq-app8766” name=“dsq-app8766”

Was just wondering about the id’s here.

These are two different articles where the same comment appears :thinking:

hi :wave:t3: This is not valid code, you can’t use spaces.

There are examples of correct usage in Ghost docs here:

https://help.ghost.org/article/15-disqus

and in Disqus docs here:

If you still see the same problem after fixing the page.identifier - you’ll need to reach out to Disqus support :slight_smile:

1 Like

Hello,
There is no space, copying and pasting the code added it

I’ve already read all of these links before opening a topic here, and the identifier looks different in the various urls.

I do not understand where the problem is

If the spaces were rendered on copy/paste then there is a chance that there UTF NULL characters (basically: hidden spaces) which actually are there.

Beyond that, as mentioned, you’ll need to contact Disqus / their support community as this is an issue with their software rather than anything in Ghost

Well, i’ll try to contact them, thank you for help

Hello again,
I would like to add a new identifier for disqus,

this.page.title = 'a unique title for the page where Disqus is present';

Is there something like “ghost-{{title}}”?

Thank you

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