Comments

robloach’s picture

Title: Missing the Disqus Migration module for Drupal 7 » Disqus Migration module for Drupal 7

It's not missing, it's non-existent! It would be great to get their new API v3 working with it: #298540: Add support for API version 3 in migrate module. Definitely needs a re-thinking in Drupal 7. Thanks!

XiaN Vizjereij’s picture

Subscribe

robloach’s picture

Title: Disqus Migration module for Drupal 7 » Disqus Migration module revamp
Category: task » feature

Redesign the architecture here to take advantage of http://docs.disqus.com/developers/export/ and http://docs.disqus.com/developers/api/ on cron.

c-c-m’s picture

I'd love to use this module in an existing D7 with content. Hope there's progress on this.

c-c-m’s picture

Hello,

Is there any progress on this issue? This functionallity is the only thing that doesn't allow me to use this great module.

Thanks

daco’s picture

Subscribe

kevinwalsh’s picture

Subscribe

chefmungus’s picture

Subscribe

jugglerpm’s picture

subscribe

bkosborne’s picture

Isn't this sort of a duplicate of the API v3 thread?

Anyway, I agree that this needs a revamp. But there are certainly things to consider here. The import/export functionality of the module as it stands seems to be best suited for those that either want to completely switch to using Disqus and no longer use Drupal comments, or the opposite. I know that the export to Disqus functionality doesn't work that well at all (I've had countless issues with it) and could really benefit from using the new API.

However, there are also a group that would like to use Disqus, but want the SEO benefits of having the comments displayed on a page during server-side processing and not Javascript. This involves having a synchronization cron function to periodically bring in Disqus comments into Drupal somewhere. Presumably, this would "somewhere" would be Drupal's comment system. This may not be the best approach and could over-complicate things for users that simply want the comments output somehow on the page and just hide them using CSS. See http://drupal.org/node/298540#comment-4174698 and the sandbox module for that type of implementation.

Personally, I don't think it's really worth doing a full integration with the API for this module. Importing comments into Drupal from Disqus works without the API at all (uses an XML file), and Exporting comments into Disqus from Drupal also works without the API at all, but not as this module currently implements it (an XML file can instead be generated and brought into Disqus). I think the only reason for the API is to "sync" the comments that exist in Disqus into some sort of datastore in Drupal, whether it be a new schema or working it into the Drupal comments table.

Thoughts?

bkosborne’s picture

I've patched the migrate module to handle exporting comments to Disqus in a completely different manner. Like I stated above, I had a ton of issues with exporting with the API. I spent a while trying to debug the issues, but after running into these problems I decided to just implement a much easier method: an XML file.

Disqus supports importing comments via a WXR-style XML file. It's modeled after WordPress, but it doesn't matter. Please review this patch. It simplifies the module a whole lot (removes need for the export DB table, and disqus.php).

The patch is against the latest code in the DRUPAL 6 branch. If this is reviewed well, I'll port to D7 as well.

bkosborne’s picture

StatusFileSize
new24.98 KB

attached

robloach’s picture

Status: Active » Reviewed & tested by the community

This is great! Thanks so much for putting this together. Definitely is worth a commit. Once it's in, it'll be easier to test and get feedback on too. So, I'd say commit this, and then let's clean things up afterwards. Well done, Brian!!!

robloach’s picture

Is this for Drupal 6 or 7? We should target Drupal 7 first, and then get things back into Drupal 6.

bkosborne’s picture

Thanks! The patch certainly needs to be tested first ... I think I missed adding the return array in the update. I'll put it through some additional testing tonight.

bkosborne’s picture

StatusFileSize
new25.47 KB

Updated the patch with some refinements and fixes. I'm pretty sick at the moment so lets hope the code all makes sense :). Once someone else reviews and tests, I'll commit to 6.x dev and work on 7.x.

bkosborne’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

Moving this to 6.x until I patch for 7.x.

FYI: I tested this on a site with nearly 4,000 comments. The generate function didn't take long.

robloach’s picture

:-)

kstrauser’s picture

THANK YOU. This worked perfectly for my ~1600 comments after repeated errors with the API.

bkosborne’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

FYI - the code in this patch is being refactored into a larger patch that revamps the whole migrate module. Exporting via the API will also be available, which will integrate with the rest of the module a bit better. I'm closing this and marking it as a duplicate of #298540: Add support for API version 3 in migrate module. Please use that thread to track progress of getting this integrated into the module.

pichot’s picture

For what it's worth, I just released a small script that exports Drupal 6 comments into DISQUS compatible XML files. It doesn't support threaded comments, but it might still be helpful to someone.

The challenge with the DISQUS API for importing comments is that they only allow 1000 calls an hour. For sites with many comments (I used this script on one with 180,000 comments), using the API would take weeks. DISQUS doesn't seem to have a limit on the number of XML files you can upload, just the size of the files, which the script takes care of.

https://github.com/pichot/drupal6-to-disqus-xml