Status of Disqus updates, and a tool for URL migration

This post is more than 2 years old.

Well, I'm disappointed to say the least. I've had good luck with Disqus pretty much everywhere I've used it, but my attempts to migrate my 50K+ comments over have been met with a great amount of difficulty. I'm not giving up, but hopefully my notes here will help others.

I created a tool that read my database and exported comments in the XML format described by Disqus. I built it so it could do a "slice" of blog entries. My first test covered the first three blog entries ever posted and the second test covered the fourth entry plus a thousand more.

When I had these imported, and Disqus got them in pretty darn quickly (they warn you it can take 24 hours, but for me it was no more than 5 minutes), I ran into two issues.

The first thing I noticed was that comments on my very first blog post did not show up. I looked in the Disqus admin and they were there. Clicking to go to that thread from the admin worked. But they didn't actually load on the page.

The second thing I noticed was that my order was wrong on a particular thread. I discovered that my export script had screwed up the time output. Totally my fault. I fixed it and resubmitted the XML. I noticed though that it wasn't updating.

So Thursday night I submitted both issues as support problems via the Disqus site. I got a reply around noon on Friday. For the "missing comments" issue I sent them the URL. For the "replacing" issue, their email seemed to imply that you couldn't replace comments. I asked for clarification.

In both cases, I replied within minutes of getting their email. I've heard nothing back since then.

So I thought - screw it. I went into the admin and began deleting comments. You can sort by oldest so I knew I was safe to just mass delete the old ones. You can delete 25 at a time. I did this for 6000+ comments.

I resubmitted and... nothing. I seem to be unable to get these comments back in - even though they don't exist. I submitted another help request, but I guess they don't work the weekends.

Ok - so how about another issue? I found that some of my discussion threads had the wrong URL in them. This is because by default, Disqus uses window.location.href for the identifier. Their docs say you should not allow this default to happen, but if you don't know that, don't read carefully, etc, you miss that. I guess that's my fault too, but I really think Disqus should call this out. Heck, you only see this if you go into the JavaScript configuration variables page which is not the default. Disqus should really do a better job of pushing this on end users.

So luckily they have a URL migration tool. You can submit a CSV file of old URLs to new URLs so they can be migrated. Their docs suggest using their export tool to get the old URLs. That's fine and all but I've got almost 2000 old URLs in the system and guess what? The export can't be used for the import because it is only an old URL. You would have to copy and paste every URL so you have a valid CSV file.

Fine. So - I wrote a ColdFusion script to let me do this. You point it to an input file, tell it what to export, and modify a UDF that maps old URLs to new.

//change to the file disqus gave you
input = "raymondcamden-2014-11-23T15_12_05.133412-links.csv";
//change to the name you want to use for the new file
output = "new.csv";

//Will be passed the URL. Mod it as you see fit.
function map(s) {
	//fix 2015.raymondcamden etc
	s = replace(s, "", "");
	s = replace(s, "", "");
	//change mode=entry
	//this requires a db call
	if(findNoCase("mode=entry", s)) {
		var id = listLast(s, "=");
		var q = queryExecute("select posted from tblblogentries where id = :id", {id:id}, {datasource:"myblog"});
		//technically this doesn't take into account date offset, but screw it
		var newurl = "";
		return newurl;
	//wordpress adds / at the very end
	if(right(s,1) == "/") s = mid(s, 1, len(s)-1);
	return s;

myData = fileOpen(expandPath("./#input#"),"read");
myOutput = fileOpen(expandPath("./#output#"),"write");

while(not fileisEOF(myData)) {
	line = fileReadLine(myData);
	newURL = map(line);
	newLine = line & "," & newURL;	
	fileWriteLine(myOutput, newLine);
writeoutput("Done processing.");

I've done this - and submitted the CSV - but while comment imports worked pretty quickly, this seems to be taking longer. Also, Disqus doesn't provide a status for this feature. (They do for importing.)

I know I'm a free user, but I'm really disappointed by the support from Disqus. At this point I'd pay to get technical support. I know once the import is done - and now that I've fixed the URL issue - I'll be good - but this delay is very frustrating.

Finally, and I don't think this is really impacting anyone, but I am sorry for regular readers of this blog who may be having issues now!

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Birgit Pauli-Haack posted on 11/24/2014 at 11:13 AM

This IS very,very helpful. Thanks!

Comment 2 by Daniel Schmid posted on 11/24/2014 at 1:24 PM

Coincidentally, I also migrated just last week comments to Disqus. I strongly recommand to use a "test account" first till you sure all got right. Imported comments I could also not update anymore. But I have to say they recommand to register first a test forum to make shure everything is smooth.

Comment 3 (In reply to #2) by Raymond Camden posted on 11/24/2014 at 2:08 PM

Yeah, fair enough. I honestly would never have imagined that 'updating' would be such an issue. There is a unique ID I'm applying to my comments and you would think it would just replace them. And heck - I've deleted the darn comments now and they still won't update.

Comment 4 by Dan Vega posted on 11/28/2014 at 5:53 PM

I messed up my import and forgot add "/blog" in my entry URLs. Since there is no way to delete should I just remove the domain and data and then just add the same site back in Disqus?

Comment 5 (In reply to #4) by Raymond Camden posted on 11/28/2014 at 5:58 PM

I'd mass delete. It took me maybe 30 minutes to kill my 6k imported. You could probably do it much quicker. Of course, I also had new live comments so making a new site may be simpler for you.

Comment 6 (In reply to #5) by Dan Vega posted on 12/1/2014 at 2:09 PM

So I am using your updated script and I still can't figure out what is going wrong. I also see all of my comments in the admin moderation section. I can also click on the entry link of the comment and be taken to the new site and the correct page. However none of the comments actually show up but any new comments created work just fine. I'm lost at this point.

Comment 7 (In reply to #6) by Raymond Camden posted on 12/1/2014 at 3:25 PM

In the Moderation section? Or in the released section?

Comment 8 (In reply to #7) by Dan Vega posted on 12/1/2014 at 3:29 PM

This is the comments / approved section of the Disqus admin.

Comment 9 (In reply to #8) by Raymond Camden posted on 12/1/2014 at 3:33 PM

So, as I mentioned, I *had* seen an issue where some early comments didn't show up, but it went away. Thinking. Are you using the JS variable to set the URL on the page? I mentioned that in one of my posts.

Comment 10 (In reply to #9) by Dan Vega posted on 12/1/2014 at 4:01 PM

I looked through all of your related posts and couldn't find anything. I have a question into them about it as well as a thread on StackOverflow. Thanks for the help Ray!

Comment 11 by Ashish Rana posted on 5/15/2015 at 10:16 AM

Thanks for sharing this information. I also facing same problem after update in my blog All Url Opener