Migrating from Disqus to Discourse for static blog comments?


(Justin Gordon) #1

Any experience stories on moving from disqus to discourse for blog comments for a Jekyll or Octopress site? I’m wondering if it might just make sense to just not worry about old comments. I’m thinking about this for my blog: http://www.railsonmaui.com.

Related to this discussion:

and

http://eviltrout.com/2014/01/22/embedding-discourse.html


(Jeff Atwood) #2

I believe @eviltrout moved his comments from Disqus (that’s what you mean?) to Discourse. Not sure if we have a formal importer, but we probably should.


(Robin Ward) #3

I did in fact write an importer for that. The code hasn’t been used in a while so it might have fallen a little out of favor but it’s still in the repo:

https://github.com/discourse/discourse/blob/master/lib/tasks/disqus.thor


(Justin Gordon) #4

@eviltrout Now that you’ve had this for a while, can you paint some color on the pros/cons of the approach. I was also thinking of incorporating a general forum into my blog in case somebody wants to ask me a question. Or maybe I just want to post some notes that justify a blog article.


(Robin Ward) #5

It’s hard to be objective about it when I work on Discourse all day :smile:

Discourse is not an exact substitute for Disqus as you can’t post comments while on the origin site. This alone makes the volume of comments drop as people will have to sign up for your forum and post. Personally I’ve found the higher barrier to entry has raised the quality of the average comment, but there are definitely fewer of them.


(Justin Gordon) #6

Hi @eviltrout, can you please provide some basic instructions on how to run the thor command?

I’m guessing you have to copy the xml file to the docker instance, and maybe even do:

./launcher ssh app

But after that, I’m stuck. rake is in the path, but thor is not.


(Sam Saffron) #7

sudo -iu discourse
cd /var/www/discourse
bundle exec thor


(Justin Gordon) #8

After getting thor running, the next issue is the database for production.

So what’s needed is:

RAILS_ENV=production bundle exec thor

(Justin Gordon) #9

The next issue is that I get a 404 for new users on their profile pictures.

Turns out that the user records are there! I didn’t know that disqus gave me the emails!

Should I manually activate all the users? Is there a way to do this more easily than clicking on each user?

Would it makes sense to modify the thor script to offer an option for creating users that are active? I’m guessing the activation is to confirm email addresses, and since the emails come from disqus, then the emails are valid.

It also turns out that the script emails all those new users asking them activate, which might be confusing to those folks!

@sam, @eviltrout, how did you handle this for your blogs?


(Jeff Atwood) #10

That code predates not showing profiles for unactivated users.


(Justin Gordon) #11

Another oddity is that admins (and only logged in admins) see the timing. I verified that for an incognito session, these do not show up.


(Justin Gordon) #12

If you click on user in comments from my blog and user is not activated, this shows up.

Scroll down to bottom here:
http://www.railsonmaui.com//blog/2014/03/11/rocking-with-tmux-tmuxinator-and-iterm2-for-rails-development/

That goes to: Profile - masond - ShakaCode Forum


(Jeff Atwood) #13

Correct, unactivated users are no longer considered valid. Otherwise spammers could create unlimited user pages for users who were never activated.


(Justin Gordon) #14

I’d agree with that, but the we should consider not placing to links to pages that don’t exist. I.e., I think this is a minor bug.


#16

This seems like a fairly killer feature for Discourse adoption. Is it on the “roadmap”?


(Jeff Atwood) #17

No, we have no plans to support complete embedding. Community should happen in the community space. Not a fan of the “slap comments on the bottom of a web page” model as that does not build a viable, sustainable long term community.


#18

For some webpages, I suppose that’s true. It doesn’t seem to be the case for blogs.

I think it also makes sense for applications like bug trackers, where the goal is not so much community but just giving better commenting features.

Just seems to be writing off a potentially large market, and certainly something I’ve seen several people talking about on here.


(Justin Gordon) #19

FYI, I published my notes on migrating from Disqus to Discourse:

My engagement rate, however is about zero. :frowning:.

It think even if Discourse is not embedded, we should test if displaying a comment text box with an event handler that really does a page load to the forum. Yes, kind of not totally legit, I think it’s just something worth testing, as that is what people are used to on FB, Disqus, etc.


(Stephen) #20

We’ve attempted to use the importer to bring our Disqus comments across and the --dry-run option passed without a hitch.

Repeating the process for real though hasn’t gone smoothly. Lots of element validity errors as 20-30 of our threads were re-created (successful), before it failed with the below. Is this something to nudge @eviltrout on, or does someone else own the importer now?

/var/www/discourse/app/models/topic_embed.rb:83:in `block in find_remote': undefined method `empty?' for nil:NilClass (NoMethodError)
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.4.1/lib/nokogiri/xml/node_set.rb:237:in `block in each'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.4.1/lib/nokogiri/xml/node_set.rb:236:in `upto'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.4.1/lib/nokogiri/xml/node_set.rb:236:in `each'
from /var/www/discourse/app/models/topic_embed.rb:80:in `find_remote'
from /var/www/discourse/app/models/topic_embed.rb:102:in `import_remote'
from /var/www/discourse/lib/tasks/disqus.thor:148:in `block in import'
from /var/www/discourse/lib/tasks/disqus.thor:143:in `each'
from /var/www/discourse/lib/tasks/disqus.thor:143:in `import'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `load'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `<main>'

(Justin Gordon) #21

My engagement rate is much better now! Discourse rocks!!!

It’s a super cool place to chat about Rails and cool JavaScript technologies like ReactJs and Webpack.