Download & Extend

Disqus Migration module revamp

Project:Disqus
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

It's strange!

Comments

#1

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!

#2

Subscribe

#3

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

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

#4

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

#5

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

#6

Subscribe

#7

Subscribe

#8

Subscribe

#9

subscribe

#10

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?

#11

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.

#12

attached

AttachmentSize
migrate_overhaul-1095194.patch 24.98 KB

#13

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!!!

#14

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

#15

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.

#16

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.

AttachmentSize
migrate_overhaul_num2-1095194.patch 25.47 KB

#17

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.

#18

:-)

#19

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

#20

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.

nobody click here