# Development

**URL:** https://meta.discourse.org/c/dev/7.md?page=140

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

**Page:** 141

---

## [UndefinedTable: ERROR: relation "web\_hook\_event\_types" when trying to run rspec test](https://meta.discourse.org/t/undefinedtable-error-relation-web-hook-event-types-when-trying-to-run-rspec-test/50497)

<div class="topic-metadata">

**Author:** [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Replies:** 3\
**Last updated:** [September 22, 2016, 5:48pm UTC](https://meta.discourse.org/t/undefinedtable-error-relation-web-hook-event-types-when-trying-to-run-rspec-test/50497 "2016-09-22T17:48:21Z")

</div>

On my dev environment, on Mac, after running this: bundle exec rspec spec/components/new\_post\_manager\_spec.rb which results in an error bundler: failed to load command: rspec (/usr/local/bin/rspec) ActiveRecord::State…

---

## [Coffeescript vs Javascript](https://meta.discourse.org/t/coffeescript-vs-javascript/50494)

<div class="topic-metadata">

**Author:** [@Ramith](https://meta.discourse.org/u/Ramith)\
**Replies:** 0\
**Last updated:** [September 22, 2016, 3:05pm UTC](https://meta.discourse.org/t/coffeescript-vs-javascript/50494 "2016-09-22T15:05:01Z")

</div>

I got to know that discourse was using a hybrid Coffeescript platform. I found this Topic created by @sam back in 2013, where I got to know a lot of views from experienced developers. as at 2016, I was wondering whethe…

---

## [Reset my development environment, but it's stuck in read-only mode](https://meta.discourse.org/t/reset-my-development-environment-but-its-stuck-in-read-only-mode/50414)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 3\
**Last updated:** [September 21, 2016, 6:00am UTC](https://meta.discourse.org/t/reset-my-development-environment-but-its-stuck-in-read-only-mode/50414 "2016-09-21T06:00:08Z")

</div>

I was running a dev environment in ~/src/discourse-1.6/ and switched over to ~/src/discourse (Yes, I’m too stupid to actually use git, so this was my solution.) I did RAILS\_ENV=development export RAILS\_ENV …

---

## [Support for Twitter Cards with large images?](https://meta.discourse.org/t/support-for-twitter-cards-with-large-images/50215)

<div class="topic-metadata">

**Author:** [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)\
**Replies:** 7\
**Last updated:** [September 20, 2016, 3:56am UTC](https://meta.discourse.org/t/support-for-twitter-cards-with-large-images/50215 "2016-09-20T03:56:54Z")

</div>

Looking through Discourse’s code, it looks like only standard Twitter Summary Cards are supported. I’d prefer to use Summary Cards with large images, which is a simple change to make, but I’m not sure how to hook into th…

---

## [Event on widget's creation](https://meta.discourse.org/t/event-on-widgets-creation/50237)

<div class="topic-metadata">

**Author:** [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)\
**Replies:** 3\
**Last updated:** [September 17, 2016, 10:48am UTC](https://meta.discourse.org/t/event-on-widgets-creation/50237 "2016-09-17T10:48:34Z")

</div>

Is it possible to generate event when the widget created html-elements on page? I want to manipulate with this widget when it’s ready.

---

## [Maybe the network flow compress it not enough for phone](https://meta.discourse.org/t/maybe-the-network-flow-compress-it-not-enough-for-phone/50234)

<div class="topic-metadata">

**Author:** [@xiasummer](https://meta.discourse.org/u/xiasummer)\
**Replies:** 3\
**Last updated:** [September 17, 2016, 9:12am UTC](https://meta.discourse.org/t/maybe-the-network-flow-compress-it-not-enough-for-phone/50234 "2016-09-17T09:12:46Z")

</div>

I just tried to log on the discourse forum with my android phone 4G network(not wifi). Reading is quite good on the phone. But Writting is not. When I want to post many sentences, suddenly it stucked there and after a…

---

## [Link "comments number" to topic page](https://meta.discourse.org/t/link-comments-number-to-topic-page/50153)

<div class="topic-metadata">

**Author:** [@kam44](https://meta.discourse.org/u/kam44)\
**Replies:** 7\
**Last updated:** [September 15, 2016, 9:27pm UTC](https://meta.discourse.org/t/link-comments-number-to-topic-page/50153 "2016-09-15T21:27:19Z")

</div>

Hello everyone, For a custom project i need to link the number of comments (of homepage) to topics; instead of the date range popup. If someone has a trick, I’ll be very grateful. Thank you in advance Camille

---

## [How can I get the topic status](https://meta.discourse.org/t/how-can-i-get-the-topic-status/50180)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 1\
**Last updated:** [September 15, 2016, 3:07pm UTC](https://meta.discourse.org/t/how-can-i-get-the-topic-status/50180 "2016-09-15T15:07:21Z")

</div>

How can I get the topic status? I see that the method topic.closed? is available, but I’d like to get the status string back. Similar to topic.category.name.

---

## [HTML in site settings field for a plugin](https://meta.discourse.org/t/html-in-site-settings-field-for-a-plugin/50160)

<div class="topic-metadata">

**Author:** [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Replies:** 2\
**Last updated:** [September 15, 2016, 2:59pm UTC](https://meta.discourse.org/t/html-in-site-settings-field-for-a-plugin/50160 "2016-09-15T14:59:23Z")

</div>

I’m trying to figure out how to have some custom HTML added to a plugin setting and then display that HTML safely in a widget. My widget code is the following: import { createWidget } from 'discourse/widgets/widget'; i…

---

## [Plugin using own gem](https://meta.discourse.org/t/plugin-using-own-gem/50007)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 10\
**Last updated:** [September 14, 2016, 10:03pm UTC](https://meta.discourse.org/t/plugin-using-own-gem/50007 "2016-09-14T22:03:56Z")

</div>

I am developing a plugin that needs to use an external gem, namely docx in order to generate word docs. Is there someway to do this or do I have to append it to the Gemfile?

---

## [Disable the quote reply popup](https://meta.discourse.org/t/disable-the-quote-reply-popup/50161)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 1\
**Last updated:** [September 14, 2016, 9:18pm UTC](https://meta.discourse.org/t/disable-the-quote-reply-popup/50161 "2016-09-14T21:18:14Z")

</div>

I’ve developed a plugin which allows the user to select text, but the quote reply popup appears and gets in the way. Is there someway that I can disable it?

---

## [Getting information from the database](https://meta.discourse.org/t/getting-information-from-the-database/50137)

<div class="topic-metadata">

**Author:** [@Novice](https://meta.discourse.org/u/Novice)\
**Replies:** 0\
**Last updated:** [September 14, 2016, 11:42am UTC](https://meta.discourse.org/t/getting-information-from-the-database/50137 "2016-09-14T11:42:35Z")

</div>

I am creating a plugin which requires the number of reads from a user’s posts. Is there a better way to do it than querying the database directly from the plugin?

---

## [How to integrate a stronger markdown editor other than the basic one](https://meta.discourse.org/t/how-to-integrate-a-stronger-markdown-editor-other-than-the-basic-one/49982)

<div class="topic-metadata">

**Author:** [@xiasummer](https://meta.discourse.org/u/xiasummer)\
**Replies:** 2\
**Last updated:** [September 14, 2016, 11:13am UTC](https://meta.discourse.org/t/how-to-integrate-a-stronger-markdown-editor-other-than-the-basic-one/49982 "2016-09-14T11:13:55Z")

</div>

This markdown editor integrated in Discourse is not strong enough. You see, we cannot write tables easily, cannot write latex formulas easily. Look at the editor of www.zhihu.com, a famous Chinese website. You can w…

---

## [Boolean site settings undefined](https://meta.discourse.org/t/boolean-site-settings-undefined/50106)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 2\
**Last updated:** [September 13, 2016, 10:05pm UTC](https://meta.discourse.org/t/boolean-site-settings-undefined/50106 "2016-09-13T22:05:08Z")

</div>

For some weird reason, certain site settings are coming out as undefined where I use the following call from within my plugin: var siteSettings = api.container.lookup('site-settings:main'); console.log(siteSettings.mypl…

---

## [Sending email from a plugin](https://meta.discourse.org/t/sending-email-from-a-plugin/50064)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 2\
**Last updated:** [September 13, 2016, 12:31pm UTC](https://meta.discourse.org/t/sending-email-from-a-plugin/50064 "2016-09-13T12:31:05Z")

</div>

I’d like to send out a notification email whenever a given topic with a certain category is closed. So far I I have the following event handler defined: DiscourseEvent.on(:topic\_status\_updated) do |topic\_id, status, ena…

---

## [Delivering messages \[\] to client](https://meta.discourse.org/t/delivering-messages-to-client/50028)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 1\
**Last updated:** [September 12, 2016, 8:05pm UTC](https://meta.discourse.org/t/delivering-messages-to-client/50028 "2016-09-12T20:05:12Z")

</div>

I’m trying to debug my plugin but the output is getting cluttered by a bunch of messages that look like this: Delivering messages \[\] to client e4bd097558e54dcc8719aa68a4b5fc Where does this come from, and how can I dis…

---

## [How to redefine method in Ember Component?](https://meta.discourse.org/t/how-to-redefine-method-in-ember-component/49988)

<div class="topic-metadata">

**Author:** [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)\
**Replies:** 1\
**Last updated:** [September 12, 2016, 3:19pm UTC](https://meta.discourse.org/t/how-to-redefine-method-in-ember-component/49988 "2016-09-12T15:19:47Z")

</div>

I need to modify method \_dock in discourse/components/topic-progress.js.es6 file from my plugin. What is the syntax of modifying this component? So far I came to this construction, but it doesn’t work: import topicProg…

---

## [TypeError: Discourse.Dialect.postProcessText is not a function](https://meta.discourse.org/t/typeerror-discourse-dialect-postprocesstext-is-not-a-function/49963)

<div class="topic-metadata">

**Author:** [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)\
**Replies:** 11\
**Last updated:** [September 11, 2016, 11:40pm UTC](https://meta.discourse.org/t/typeerror-discourse-dialect-postprocesstext-is-not-a-function/49963 "2016-09-11T23:40:12Z")

</div>

I’m writing my first plugin for Discourse, modeled after the plugin in this tutorial, but I’m encountering an error. In my error log, I see the error “TypeError: Discourse.Dialect.postProcessText is not a function” for t…

---

## [Insert, Read and Update Post custom fields from plugin](https://meta.discourse.org/t/insert-read-and-update-post-custom-fields-from-plugin/49962)

<div class="topic-metadata">

**Author:** [@ShankarG](https://meta.discourse.org/u/ShankarG)\
**Replies:** 1\
**Last updated:** [September 11, 2016, 12:21pm UTC](https://meta.discourse.org/t/insert-read-and-update-post-custom-fields-from-plugin/49962 "2016-09-11T12:21:32Z")

</div>

I’m new to rails and ember and also i can’t find any documentation for using post custom fields in plugin. I have added two additional fields to post composer form (using plugin outlet) like below I need to save this…

---

## [User page stops loading when I add a link](https://meta.discourse.org/t/user-page-stops-loading-when-i-add-a-link/49961)

<div class="topic-metadata">

**Author:** [@Novice](https://meta.discourse.org/u/Novice)\
**Replies:** 0\
**Last updated:** [September 10, 2016, 9:28am UTC](https://meta.discourse.org/t/user-page-stops-loading-when-i-add-a-link/49961 "2016-09-10T09:28:17Z")

</div>

Hi, I am new to discourse. Firstly, a big ups to the discourse team for creating such a beautiful site. I am trying to add a button to the user-profile-controls plugin outlet. I have gone through the guides available on…

---

## [Plugin hook using a private repository](https://meta.discourse.org/t/plugin-hook-using-a-private-repository/49923)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 2\
**Last updated:** [September 9, 2016, 10:56am UTC](https://meta.discourse.org/t/plugin-hook-using-a-private-repository/49923 "2016-09-09T10:56:48Z")

</div>

Having created a discourse plug for a customer which is located in a private git repository, and added it to the hooks section of app.yml, I need to allow git access. How do I setup the proper credentials to make it wor…

---

## [Paginating while searching for multiple tags](https://meta.discourse.org/t/paginating-while-searching-for-multiple-tags/49795)

<div class="topic-metadata">

**Author:** [@cappslock](https://meta.discourse.org/u/cappslock)\
**Replies:** 2\
**Last updated:** [September 8, 2016, 6:46pm UTC](https://meta.discourse.org/t/paginating-while-searching-for-multiple-tags/49795 "2016-09-08T18:46:16Z")

</div>

I’d like to be able to search for topics matching an AND of multiple tags. I’ve determined that I can do this by playing around with the UI by making a query like this: I have two questions: Using the above method, I…

---

## [Does Gemfile need to include svg?](https://meta.discourse.org/t/does-gemfile-need-to-include-svg/49848)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 2\
**Last updated:** [September 7, 2016, 8:37pm UTC](https://meta.discourse.org/t/does-gemfile-need-to-include-svg/49848 "2016-09-07T20:37:01Z")

</div>

On my dev environment Sidekiq was whining that svgo worker: \`svgo\` not found; please provide proper binary or disable this worker (--no-svgo argument or \`:svgo =\> false\` through options) I finally did a gem install svg …

---

## [Categories Topic Replies](https://meta.discourse.org/t/categories-topic-replies/49782)

<div class="topic-metadata">

**Author:** [@ShankarG](https://meta.discourse.org/u/ShankarG)\
**Replies:** 7\
**Last updated:** [September 7, 2016, 11:16am UTC](https://meta.discourse.org/t/categories-topic-replies/49782 "2016-09-07T11:16:46Z")

</div>

I’m new to Ruby on Rails and Ember js(but have programming knowledge and working on PHP with laravel and also have experience with JavaScript). My requirement is while posting reply to a topic the user will select catego…

---

## [Destroying a users session via api](https://meta.discourse.org/t/destroying-a-users-session-via-api/49794)

<div class="topic-metadata">

**Author:** [@mb450](https://meta.discourse.org/u/mb450)\
**Replies:** 5\
**Last updated:** [September 7, 2016, 9:25am UTC](https://meta.discourse.org/t/destroying-a-users-session-via-api/49794 "2016-09-07T09:25:47Z")

</div>

Hi, I need to destory a session for a given user. (Using sso at the moment) but my users can logout of my main website but I want them to be able logged out of the forum at the same time. Here’s what I’ve tried (cut do…

---

## [PRs and granularity](https://meta.discourse.org/t/prs-and-granularity/49162)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 7\
**Last updated:** [September 7, 2016, 2:08am UTC](https://meta.discourse.org/t/prs-and-granularity/49162 "2016-09-07T02:08:46Z")

</div>

Say, hypothetically, after several days of ugly hacking, I’ve made a bunch of elegant changes to mbox.rb . Things like BUG: make topic post be the first message in thread rather than the last FEATURE: replace email add…

---

## [Document generator tool for ES6](https://meta.discourse.org/t/document-generator-tool-for-es6/49781)

<div class="topic-metadata">

**Author:** [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)\
**Replies:** 3\
**Last updated:** [September 6, 2016, 7:47pm UTC](https://meta.discourse.org/t/document-generator-tool-for-es6/49781 "2016-09-06T19:47:31Z")

</div>

I’ve tried many javascript generator tool to generate docs for JavaScript ES6, all of them had problem with new syntax of ES6. Is there a tested js doc generator to build documentation from Discourse sources?

---

## [Update current user fields through JavaScript?](https://meta.discourse.org/t/update-current-user-fields-through-javascript/49448)

<div class="topic-metadata">

**Author:** [@OzRamos](https://meta.discourse.org/u/OzRamos)\
**Replies:** 2\
**Last updated:** [September 6, 2016, 2:40pm UTC](https://meta.discourse.org/t/update-current-user-fields-through-javascript/49448 "2016-09-06T14:40:03Z")

</div>

Hi! So I’m starting a “How To” type community and wanted to give users the ability to create forms. For example, typing: \[\] Checkbox () Radio \_\_ Text Field … would autoconvert to their respective HTML fields. The plan…

---

## [Plugins and Continuous Integration Testing](https://meta.discourse.org/t/plugins-and-continuous-integration-testing/49757)

<div class="topic-metadata">

**Author:** [@rimian](https://meta.discourse.org/u/rimian)\
**Replies:** 0\
**Last updated:** [September 6, 2016, 12:44am UTC](https://meta.discourse.org/t/plugins-and-continuous-integration-testing/49757 "2016-09-06T00:44:57Z")

</div>

I’m looking at extending an existing plugin but it has no tests. I’d rather code to a TDD cycle but I cannot find much documentation on how to build plugins this way. Here’s an example of a plugin using Grunt as the tas…

---

## [Is there a way to get the uncached site.json for an anonymous user?](https://meta.discourse.org/t/is-there-a-way-to-get-the-uncached-site-json-for-an-anonymous-user/49716)

<div class="topic-metadata">

**Author:** [@simon](https://meta.discourse.org/u/simon)\
**Replies:** 1\
**Last updated:** [September 5, 2016, 5:11am UTC](https://meta.discourse.org/t/is-there-a-way-to-get-the-uncached-site-json-for-an-anonymous-user/49716 "2016-09-05T05:11:22Z")

</div>

I’m making an api call to site.json to get a site’s complete list of categories and subcategories. If I include an api key and username in the request I get the current list. If I make the request as an anonymous user I …

[Previous page](https://meta.discourse.org/c/dev/7.md?page=139)

[Next page](https://meta.discourse.org/c/dev/7.md?page=141)
