Blog post plugin

You should be able to use it an a previously existing category. I’ll take a look. Is your category name in Persian?

3 Likes

yes, the name is in Persian but the slug is English. and when I put the name instead of the slug, it worked!

Thanks for the clue :blush:

1 Like

May the Discourse team ever be willing to endorse this plugin and make it available on their managed hosting? If so, what would need to be done / updated in the plugin to make it suitable? Or does it contradict to the main kit’s idea of never being a blog-like thing on its own?

When I’d installed this plugin, it’s conflicting with Quick Message Plugin functionality and the generated error is related to Blog post plugin. For more details please review the below link.

Thanks for reporting that. I was trying to get the category without first making sure that there was a category. It should be fixed now.

2 Likes

Thank you for your quick reply.

I’m getting the following error now after I’d re-enabled Blog Post plugin. The following error repeated 4 times at the same minute!

failed to deliver message, skipping #<struct MessageBus::Message global_id=247486, message_id=363, channel="/writing-reply", data={"channel_id"=>"279", "user_id"=>"3"}>
 ex: Couldn't find Topic with 'id'=279 [WHERE ("topics"."deleted_at" IS NULL)] backtrace: ["/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/relation/finder_methods.rb:324:in `raise_record_not_found_exception!'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/relation/finder_methods.rb:444:in `find_one'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/relation/finder_methods.rb:423:in `find_with_ids'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/relation/finder_methods.rb:71:in `find'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/querying.rb:3:in `find'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/core.rb:131:in `find'", "/var/www/discourse/plugins/discourse-presence/plugin.rb:49:in `block (2 levels) in activate!'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:535:in `block (2 levels) in global_subscribe_thread'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:549:in `each'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:549:in `block in multi_each'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:548:in `each'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:548:in `multi_each'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:533:in `block in global_subscribe_thread'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/backends/redis.rb:331:in `block (2 levels) in global_subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:45:in `block in subscription'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:141:in `block (3 levels) in call_loop'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:135:in `loop'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:135:in `block (2 levels) in call_loop'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:231:in `block (2 levels) in process'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:367:in `ensure_connected'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:221:in `block in process'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:306:in `logging'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:220:in `process'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:134:in `block in call_loop'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:280:in `with_socket_timeout'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:133:in `call_loop'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:43:in `subscription'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:12:in `subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2760:in `_subscription'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2138:in `block in subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:58:in `block in synchronize'", "/usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:58:in `synchronize'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2137:in `subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/backends/redis.rb:304:in `global_subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:513:in `global_subscribe_thread'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:461:in `block in new_subscriber_thread'

Backtrace

/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/logster-1.2.5/lib/logster/logger.rb:76:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/logster-1.2.5/lib/logster/logger.rb:37:in `add'
/usr/local/lib/ruby/2.3.0/logger.rb:498:in `warn'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:537:in `rescue in block (2 levels) in global_subscribe_thread'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:534:in `block (2 levels) in global_subscribe_thread'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:549:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:549:in `block in multi_each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:548:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:548:in `multi_each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:533:in `block in global_subscribe_thread'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/backends/redis.rb:331:in `block (2 levels) in global_subscribe'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:45:in `block in subscription'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:141:in `block (3 levels) in call_loop'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:135:in `loop'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:135:in `block (2 levels) in call_loop'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:231:in `block (2 levels) in process'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:367:in `ensure_connected'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:221:in `block in process'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:306:in `logging'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:220:in `process'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:134:in `block in call_loop'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:280:in `with_socket_timeout'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:133:in `call_loop'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:43:in `subscription'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:12:in `subscribe'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2760:in `_subscription'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2138:in `block in subscribe'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:58:in `block in synchronize'
/usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:58:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2137:in `subscribe'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/backends/redis.rb:304:in `global_subscribe'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:513:in `global_subscribe_thread'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:461:in `block in new_subscriber_thread'

Edit:
When I’ve got this error I’d made just two actions (after rebuilding). I deleted a post, and I created another post. Then I did noticed these errors. But now I’m trying to replicate the errors. It didn’t happened again. I’ll be watching and I’ll report here if anything I catch again!

I’ll look at that, but I can’t do it today. Remove the blog-post plugin for now.

2 Likes

It’s not likely to happen, mostly for the reasons you already mentioned. While it’s a cool feature, it’s very niche and has not been requested by a lot of customers. Many tools do blogging way better than Discourse ever will, so our primary focus will be on interoperability with these specialised tools.

3 Likes

This plugin doesn’t work on the latest master branch. Having it installed shouldn’t break your site, it just won’t create a blog post. I have a fix for it here: https://github.com/scossar/discourse-blog-post/tree/update-for-ember-2.1. I’ll merge that into the plugin’s master branch in the next couple of days.

2 Likes

pls can i use this plugin in my site (laptop2all.com) and how ?

If you have a Discourse forum you can install it. I looked at your site. I don’t see a forum there.

If you have a website and a forum, you don’t need this plugin. Just create your posts on the website and then link from the post to the discussion on the forum. The wp-discourse WordPress plugin is good for doing that.

Hi guys!

Does that plugin compatible with 1.8 Discourse?

Yes it works, but installing a third party plugin on Discourse is always risky. Unless you really need it, I think that a better solution is to create blog posts on a WordPress site and use this WordPress plugin to connect your forum with a blog: WP Discourse 1.0.0 release

3 Likes

I installed this plugin on Discourse v2.0.0.beta4 and it does not work.
The install went fine, and there are plugin settings in the dashboard, but there book icon does not appear to turn a post into the specially formatted blog post.

I would really like to use this, if possible.

Since it seems that this plugin is basically deprecated, is there any other plugin that allows for alternate formatting for specific posts or categories?

I haven’t looked at this in over a year, so I’m not surprised that it’s broken. Since Discourse now adds a Category class to the body tag, it should be fairly simple to give individual styles to categories. For example, this post has the class category-plugin-broken-plugin to indicate its parent and sub category.

3 Likes

Just checked the source on the body tag on my Discourse and there is no category class there. Is that supposed to be on by default?

Yes, it should be added. You need to select ‘inspect’ for the page, not ‘view page source.’ On Chrome, right click and select ‘inspect’ from the menu. On Firefox, select ‘inspect element.’

ok, I see it now. That’s … weird. Why doesn’t the page source show css classes, is that an ember thing?

Going to load your plugin’s css on one of my categories… fingers crossed.

It’s added with javascript.

Ok this is quick and dirty. I used the css below to hide some page elements give a more streamlined look to posts in a given category. It’s not a blog, but it’s something.

.category-your-category-name .topic-meta-data {
  display: none;
}

.category-your-category-name .topic-avatar {
  display: none;
}

.category-your-category-name .topic-timeline {
  display: none;
}

.category-your-category-name #topic-footer-buttons  {
  display: none;
}

.category-your-category-name #main-outlet {
  padding-left: 40px;
}
1 Like