migrating to using disqus_identifier

330 views
Skip to first unread message

Jonathan

unread,
Jul 20, 2011, 7:35:08 PM7/20/11
to Disqus Developers
We want to change our site so that we use disqus_identifiers instead
of the URLs that are otherwise used, so that we have the option of
changing the URLs later. However, when I add a disqus_identifier,
comments given on a page before there was a disqus_identifier are no
longer shown on the page.

Support suggested using disqus.threads.update, and I've been able to
use that to add an identifier to threads that have none, but that
doesn't do the trick -- the old comments still don't show up.

Any suggestions how to do this?

Jonathan

unread,
Jul 21, 2011, 4:57:34 PM7/21/11
to Disqus Developers
An update, i case anyone runs into similar problems...

I had a misunderstanding of how disqus works. There is one thread per
URL, and it is created (initially with 0 posts) when the page is first
visited. If you add an identifier, then visit the page, the
identifier gets added successfully. When you move to a new URL,
though, you need to use the API (disqus.threads.update) to change the
link and title values. (For some reason, the parameter to update for
the link is "url".) I haven't found everywhere these are significant,
but I think that the link in notification email uses the "link" value,
and the link on the moderation page uses the "title" value.

I think the problem I ran across that was confusing me is that if a
page was visited before changing to identifiers, then not visited
again before moving the page, the thread will be lost. It should be
that if you use update to set the identifier, it will again be found,
but that wasn't working. It may be that the problem is that when you
visit the page (in the new location, with an identifier) and discover
that the comments are missing, a new thread (empty) is created for the
page, and that keeps disqus from seeing the old thread when it is
updated. Or maybe there was some other problem.

Ben Vinegar

unread,
Aug 9, 2011, 6:25:08 PM8/9/11
to disqu...@googlegroups.com
Hi Jonathan,

Sorry for the late reply. Sounds like we could add another configuration variable that overrides the previous identifier (i.e. disqus_new_identifier, or something better). Would that be (or have been) helpful?

--
Ben Vinegar
Software Engineer, DISQUS
Reply all
Reply to author
Forward
Message has been deleted
0 new messages