Fixing Disqus Comments
With the update to Blot on August 4th changes were made that had an impact for your Blog if you are using the Disqus plugin for comments. This changes could result in missing comments for all or some of your posts. Well the comments are still available via Disqus but due to a technicality the ‘old’ comments could not always be linked to the correct blog post. During the same weekend these changes have been reverted, so everything should be back in working order.
Since I also had to make a change to my template as a result of the change I had to review data stored at Disqus to figure out what was wrong and if I could fix something on my end.
The template could be easily fixed by a minor update to the code by using a different method of calling the Disqus count.js
. More information on this API can be found on their Developer page.
The other issue was related to switching from ids (numbers) to using the path of a post as identifier for the comments. Also Disqus tries to link comments to the first URL that has been used for a post. Time to have a look at the data stored by Disqus see why some comments could be linked while others could not…
Export Disqus data
To export your Disqus data, log in on Disqus.com and click on your profile icon and select ‘View Profile’, next click on the gear icon and select ‘Admin’. You then should see something like the following
Click on ‘Moderate Comments’, then ‘Export’ (under ‘Tools’) and as the last one on ‘Export Comments’. You will see the following message appear on the page
Your export has been queued. We will send an email to your registered address when it is available.
Depending on how many comments you have within your Disqus account it might take some time until you receive an email from Disqus with a link to download your data.
Reviewing the Disqus data
After reviewing the data I noticed several links for posts that were incorrect (even found a lot of URLs that didn’t have anything to do with any of my domains!). These either contained links to drafts or even a few referring to previews (when you are looking a different templates from your Blot.im dashboard). These are then also from the xxxx.blot.im
domain and not in my case the sharedmemorydump.net
domain.
Fixing the data
Disqus provides a couple of tools to allow for migrations between sites. The two tools of interest are ‘Domain Migration Tool’ and ‘URL mapper’.
Domain Migration Tool
I used ‘Domain Migration Tool’ to move comments from the domain *.drexore.blot.im
to sharedmemorydump.net
. Depending on how many incorrect domains you find in the exported data you might have to use this tool a couple of times. Here are two examples of URLs I found that were using incorrect domain names.
Location | URL generated by Blot |
---|---|
Draft | http://drexore.blot.im/draft/view/drafts/2016-03-28-automatic-post-to-twitter.md |
Preview | http://preview.original.drexore.blot.im/48/additional-hubsan-x4-mods |
After starting this tool an overview of possibly incorrect domains. Sadly I haven’t made screenshots and can’t remember exactly the content of the table. When pressing the ‘Next Step’ button you will be asked with which domain the comments should be associated, in my case I entered http://sharedmemorydump.net/
. Click ‘Next Step’ to get an overview of the old and new URLs. If everything looks correct you can press ‘Confirm Migration’ and you will be shown the following message
Threads will now begin migrating, which may take up to 24 hours to complete. Visit your Discussions Editor to check on progress.
Because of this message I suggest visit the Discussion Editor to see if all of the migrations have been performed.
URL mapper
First step is to download a CSV file that contains all of the URLs Disqus is storing comments for. Navigate back to the ‘Migration Tools’ and click on ‘Start URL mapper’. On this page click on the link titled ‘you can download a CSV here’. Again you will be mailed a link which allows you the download the CSV file.
The file contains all of the URLs tracked by Disqus, not just the ones with comments. Based on the data it is now just a matter of changing the incorrect URLs to the correct ones. If you still see incorrect domain names you might have to use the ‘Domain Migration Tool’ again.
First step is to clean-up the document so it only contains the URLs that are in need of an update. When you are using a simple text editor you can just provide the correct URL immediately after the incorrect URL (don’t forget the ,
between the old and the new URL), like so
http://sharedmemorydump.net/draft/view/Drafts/2016-05-21-workflow-for-uploading-bookmarks-to-blot.md, http://sharedmemorydump.net/workflow-for-uploading-bookmarks-to-blot
http://sharedmemorydump.net/draft/view/drafts/2016-03-28-automatic-post-to-twitter.md, http://sharedmemorydump.net/automatic-post-to-twitter-using-ifttt
When you are done you upload your CSV file by clicking on ‘Choose File’, select your CSV file followed by clicking the ‘Next Step’ button.
And then everything falls apart since (as of Saturday August 6th) the next page is an 404 error.I am not the only one having this issue as can be read from several threads on Disqus(Thread 1, Thread 2, Thread 3, Thread 4 and Thread 5). Send a tweet as well, you never know if it helps to get some attention
@disqus For a couple of days now the URL mapper tool (Migration Tools) has been broken, Any ETA on a fix? See also https://t.co/Atj2B5Fy0C
— Frank (@drexore) August 7, 2016
Hopefully this issue gets fixed soon, because I have the feeling this final step could solve the issue.