# Development

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

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

**Page:** 137

---

## [Find total topics in category](https://meta.discourse.org/t/find-total-topics-in-category/55524)

<div class="topic-metadata">

**Author:** [@fishb6nes](https://meta.discourse.org/u/fishb6nes)\
**Replies:** 1\
**Last updated:** [January 11, 2017, 6:49pm UTC](https://meta.discourse.org/t/find-total-topics-in-category/55524 "2017-01-11T18:49:24Z")

</div>

I’m looking for the file that tells me what else I can access on a category like ‘stat’ on line 35 in: https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/categories-…

---

## [Manifest.json has orientation set to portrait, Users cannot turn device to landscape](https://meta.discourse.org/t/manifest-json-has-orientation-set-to-portrait-users-cannot-turn-device-to-landscape/55579)

<div class="topic-metadata">

**Author:** [@jms](https://meta.discourse.org/u/jms)\
**Replies:** 2\
**Last updated:** [January 11, 2017, 9:34am UTC](https://meta.discourse.org/t/manifest-json-has-orientation-set-to-portrait-users-cannot-turn-device-to-landscape/55579 "2017-01-11T09:34:32Z")

</div>

When a User has installed the android web app via the “Add to Homescreen” feature the device is locked in the portrait orientation. Especially on a tablet, this is annyoing. The manifest.json route is configured to poin…

---

## [Correct way to build components](https://meta.discourse.org/t/correct-way-to-build-components/55407)

<div class="topic-metadata">

**Author:** [@piratdavid](https://meta.discourse.org/u/piratdavid)\
**Replies:** 3\
**Last updated:** [January 10, 2017, 5:01pm UTC](https://meta.discourse.org/t/correct-way-to-build-components/55407 "2017-01-10T17:01:25Z")

</div>

Here’s the structure of a component that I’m presenting in a News feed plugin on a page that’s not tied to the forum part of Discourse. My question is: Am I doing it right? A controller that creates the components model…

---

## [Twitter Stream on Forum](https://meta.discourse.org/t/twitter-stream-on-forum/55365)

<div class="topic-metadata">

**Author:** [@SeemlyLeo](https://meta.discourse.org/u/SeemlyLeo)\
**Replies:** 1\
**Last updated:** [January 8, 2017, 7:27pm UTC](https://meta.discourse.org/t/twitter-stream-on-forum/55365 "2017-01-08T19:27:33Z")

</div>

Hi there, I want to implement something like this: https://meta.discourse.org/t/twitter-stream-plugin/35085 However, since the plugin is broken and I’m no HTML/CSS expert I need some help. I figured out how to add a b…

---

## [Debugging a running Discourse on DigitalOcean](https://meta.discourse.org/t/debugging-a-running-discourse-on-digitalocean/55300)

<div class="topic-metadata">

**Author:** [@adam\_beers](https://meta.discourse.org/u/adam_beers)\
**Replies:** 1\
**Last updated:** [January 7, 2017, 1:07am UTC](https://meta.discourse.org/t/debugging-a-running-discourse-on-digitalocean/55300 "2017-01-07T01:07:03Z")

</div>

I’m having some issues with uploading images and wanted to try to debug the upload\_controller.rb. How do I do that? Can I add debug print statements? I’ve never done anything with Ruby, so I’m a beginner there. Can I…

---

## [Cannot upload a file through the API with the synchronous parameter](https://meta.discourse.org/t/cannot-upload-a-file-through-the-api-with-the-synchronous-parameter/43799)

<div class="topic-metadata">

**Author:** [@PeterWells](https://meta.discourse.org/u/PeterWells)\
**Replies:** 5\
**Last updated:** [January 6, 2017, 7:33am UTC](https://meta.discourse.org/t/cannot-upload-a-file-through-the-api-with-the-synchronous-parameter/43799 "2017-01-06T07:33:44Z")

</div>

I have been trying to add uploaded files through the API using PowerShell. The call appears to work correctly when I use it to upload an image file, but if I try the same call with a synchronous=1 parameter added, it ret…

---

## [Rspec test failure about relative url](https://meta.discourse.org/t/rspec-test-failure-about-relative-url/55142)

<div class="topic-metadata">

**Author:** [@woongbinni](https://meta.discourse.org/u/woongbinni)\
**Replies:** 0\
**Last updated:** [January 4, 2017, 5:46am UTC](https://meta.discourse.org/t/rspec-test-failure-about-relative-url/55142 "2017-01-04T05:46:55Z")

</div>

Hello I’ve got trouble about discourse settings. discourse version is 1.6.1 and I Have Some Question. File : config/discourse\_defaults.conf # set to relative URL (for subdirectory hosting) # IMPORTANT: path must not i…

---

## [When does the Plugin.rb run?](https://meta.discourse.org/t/when-does-the-plugin-rb-run/55046)

<div class="topic-metadata">

**Author:** [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Replies:** 1\
**Last updated:** [January 2, 2017, 8:38am UTC](https://meta.discourse.org/t/when-does-the-plugin-rb-run/55046 "2017-01-02T08:38:27Z")

</div>

sorry for my question but it is annoying me for long time. in plugins I use JS. in javascript we our code run in special event for example when we use outlets we now our code will run when the outlet is shown. but for …

---

## [Postgres data structure](https://meta.discourse.org/t/postgres-data-structure/52374)

<div class="topic-metadata">

**Author:** [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Replies:** 6\
**Last updated:** [January 1, 2017, 9:05pm UTC](https://meta.discourse.org/t/postgres-data-structure/52374 "2017-01-01T21:05:14Z")

</div>

Hi.how can I connect to postgres database and see the structure and tables in ubuntu terminal.I want to write a plugin but I don’t khow the database structures

---

## [How to make new DiscourseEvent?](https://meta.discourse.org/t/how-to-make-new-discourseevent/55016)

<div class="topic-metadata">

**Author:** [@maxtortime](https://meta.discourse.org/u/maxtortime)\
**Replies:** 0\
**Last updated:** [January 1, 2017, 3:09am UTC](https://meta.discourse.org/t/how-to-make-new-discourseevent/55016 "2017-01-01T03:09:28Z")

</div>

Hello, Everyone and Happy new year! I want to create new discourse plugin which sends posts and replies to GitHub issues. So, I fonund :post\_created symbols on discourse-official-slack-plugin and used it (like below ex…

---

## [Unable to save custom fields after skipping post validation](https://meta.discourse.org/t/unable-to-save-custom-fields-after-skipping-post-validation/54939)

<div class="topic-metadata">

**Author:** [@meriksson](https://meta.discourse.org/u/meriksson)\
**Replies:** 1\
**Last updated:** [December 31, 2016, 3:01am UTC](https://meta.discourse.org/t/unable-to-save-custom-fields-after-skipping-post-validation/54939 "2016-12-31T03:01:47Z")

</div>

I am working on an importer script. To be able to import some weirdly formatted posts I tried passing skip\_validations: true to PostCreator. This solved my problem but created a new one. It seems that the posts which are…

---

## [Redis errors on import](https://meta.discourse.org/t/redis-errors-on-import/54922)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 1\
**Last updated:** [December 29, 2016, 3:12pm UTC](https://meta.discourse.org/t/redis-errors-on-import/54922 "2016-12-29T15:12:25Z")

</div>

I’m running an import (for an importer I wrote). I’m getting this error: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabl…

---

## [Connector Classes and Actions](https://meta.discourse.org/t/connector-classes-and-actions/54813)

<div class="topic-metadata">

**Author:** [@skoota](https://meta.discourse.org/u/skoota)\
**Replies:** 7\
**Last updated:** [December 29, 2016, 9:34am UTC](https://meta.discourse.org/t/connector-classes-and-actions/54813 "2016-12-29T09:34:19Z")

</div>

I am using the plugin outlet composer-fields to add a new text field to the compose window for a new topic. When the user clicks the “Create Topic” button I would like the data in that field to be stored as a custom fiel…

---

## [Need help developing plugin to customize S3 meta](https://meta.discourse.org/t/need-help-developing-plugin-to-customize-s3-meta/54887)

<div class="topic-metadata">

**Author:** [@DanielMarquard](https://meta.discourse.org/u/DanielMarquard)\
**Replies:** 0\
**Last updated:** [December 28, 2016, 5:20pm UTC](https://meta.discourse.org/t/need-help-developing-plugin-to-customize-s3-meta/54887 "2016-12-28T17:20:45Z")

</div>

I’m still pretty new to Ruby, and I’ve tried pouring through Discourse plugins on Github for guidance on modifying code in Discourse’s core code, but I’m a little overwhelmed with the complexity. I believe that a plugin …

---

## [Which ruby and postgres version discourse v1.7.0.beta10 use?](https://meta.discourse.org/t/which-ruby-and-postgres-version-discourse-v1-7-0-beta10-use/54685)

<div class="topic-metadata">

**Author:** [@darkrasid](https://meta.discourse.org/u/darkrasid)\
**Replies:** 3\
**Last updated:** [December 27, 2016, 12:02pm UTC](https://meta.discourse.org/t/which-ruby-and-postgres-version-discourse-v1-7-0-beta10-use/54685 "2016-12-27T12:02:23Z")

</div>

Hi, I try to install discourse v1.7.0.beta10 version. There are some reason that I can’t use docker which discourse offer. so I try to install from source directly. I have base ubuntu which installed discourse v1.6.4 …

---

## [Template override "if homepage" conditional](https://meta.discourse.org/t/template-override-if-homepage-conditional/54815)

<div class="topic-metadata">

**Author:** [@planted](https://meta.discourse.org/u/planted)\
**Replies:** 0\
**Last updated:** [December 27, 2016, 6:23am UTC](https://meta.discourse.org/t/template-override-if-homepage-conditional/54815 "2016-12-27T06:23:09Z")

</div>

Hi there, I am wanting to show a block on the homepage only by overriding a template and putting a conditional in there along the lines of: {{#if homepage}} homepage content {{/if}} Can someone please give me a hand …

---

## [Plugin admin button broken styling](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 4\
**Last updated:** [December 25, 2016, 12:53pm UTC](https://meta.discourse.org/t/plugin-admin-button-broken-styling/54719 "2016-12-25T12:53:57Z")

</div>

Since the latest upgrade, my plugin button in the admin dashboard menu has lost the correct styling, as you can see here: My /connectors/admin-menu/app-admin-connector.hbs template looks like this: {{#link-to 'admin.…

---

## [How to add helper for connector?](https://meta.discourse.org/t/how-to-add-helper-for-connector/54745)

<div class="topic-metadata">

**Author:** [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Replies:** 1\
**Last updated:** [December 24, 2016, 8:50pm UTC](https://meta.discourse.org/t/how-to-add-helper-for-connector/54745 "2016-12-24T20:50:01Z")

</div>

How can I add add helpers for a connector in templates folder for an outlet?

---

## [Write Javascript in .hbs fils](https://meta.discourse.org/t/write-javascript-in-hbs-fils/54737)

<div class="topic-metadata">

**Author:** [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Replies:** 2\
**Last updated:** [December 24, 2016, 11:44am UTC](https://meta.discourse.org/t/write-javascript-in-hbs-fils/54737 "2016-12-24T11:44:37Z")

</div>

Hi.I have writen a plugin and my plugin is working with an outlet. in my connector (.hbs folder) I have accessed the username I want by typing {{username}}. \<script type="text/javascript"\> var temp = Handlebars.compil…

---

## [Urdu language support added](https://meta.discourse.org/t/urdu-language-support-added/53877)

<div class="topic-metadata">

**Author:** [@ibnesayeed](https://meta.discourse.org/u/ibnesayeed)\
**Replies:** 11\
**Last updated:** [December 23, 2016, 2:27pm UTC](https://meta.discourse.org/t/urdu-language-support-added/53877 "2016-12-23T14:27:42Z")

</div>

Last week I created a PR to add Urdu language support in Discourse. However, the build was failing due to the missing moment.js Urdu locale file in the repo. It turned out that Urdu locale was not present in the main mom…

---

## [Toolbar button to reformat textarea](https://meta.discourse.org/t/toolbar-button-to-reformat-textarea/54673)

<div class="topic-metadata">

**Author:** [@kgish](https://meta.discourse.org/u/kgish)\
**Replies:** 1\
**Last updated:** [December 23, 2016, 1:12pm UTC](https://meta.discourse.org/t/toolbar-button-to-reformat-textarea/54673 "2016-12-23T13:12:00Z")

</div>

I’m trying to create a toolbar button that will take the current contents of the textarea, scan the text and reformat it, thereby completely replacing the contents with new text. The API only provides e.addText() and e.…

---

## [Upgrading Ember to 2.10](https://meta.discourse.org/t/upgrading-ember-to-2-10/52724)

<div class="topic-metadata">

**Author:** [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Replies:** 71\
**Last updated:** [December 22, 2016, 11:20pm UTC](https://meta.discourse.org/t/upgrading-ember-to-2-10/52724 "2016-12-22T23:20:04Z")

</div>

After a few stumbling blocks, I have a branch of Discourse that runs on Ember 2.4. Our goal for the next major Discourse release is to upgrade to the latest Glimmer 2 technology which has many performance improvements, a…

---

## [Change data in user card by plugin](https://meta.discourse.org/t/change-data-in-user-card-by-plugin/54595)

<div class="topic-metadata">

**Author:** [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Replies:** 5\
**Last updated:** [December 22, 2016, 11:32am UTC](https://meta.discourse.org/t/change-data-in-user-card-by-plugin/54595 "2016-12-22T11:32:29Z")

</div>

I’m writing a plugin to give every user a score and now I want to show the score in the user card. I have generated the score from api with an algorithm. now I want to add a code to my javascript plugin to run when some…

---

## [Custom Onebox engine](https://meta.discourse.org/t/custom-onebox-engine/54588)

<div class="topic-metadata">

**Author:** [@skoota](https://meta.discourse.org/u/skoota)\
**Replies:** 6\
**Last updated:** [December 21, 2016, 11:17pm UTC](https://meta.discourse.org/t/custom-onebox-engine/54588 "2016-12-21T23:17:45Z")

</div>

I am interested in developing a Onebox engine to neatly display/embed content from one of my own websites in a custom format - similar to the GitHub custom engines. Assuming that I fork the Onebox repo on GitHub, and pu…

---

## [Questions about GitHub bug fix commits and tests-passed](https://meta.discourse.org/t/questions-about-github-bug-fix-commits-and-tests-passed/54545)

<div class="topic-metadata">

**Author:** [@Lutz](https://meta.discourse.org/u/Lutz)\
**Replies:** 4\
**Last updated:** [December 20, 2016, 2:03pm UTC](https://meta.discourse.org/t/questions-about-github-bug-fix-commits-and-tests-passed/54545 "2016-12-20T14:03:33Z")

</div>

I hope this is the correct category for this question. I am new and trying to understand what you are doing. Speaking about Permissions buttons not working - #4 by zogstrip This fix (and others from today) goes into th…

---

## [Is it possible to disable all title/body validations?](https://meta.discourse.org/t/is-it-possible-to-disable-all-title-body-validations/54521)

<div class="topic-metadata">

**Author:** [@meriksson](https://meta.discourse.org/u/meriksson)\
**Replies:** 2\
**Last updated:** [December 20, 2016, 8:56am UTC](https://meta.discourse.org/t/is-it-possible-to-disable-all-title-body-validations/54521 "2016-12-20T08:56:39Z")

</div>

I am working on a script for importing large numbers of posts into Discourse. I have been spending a lot of time managing problems like title or body fields being too short, titles being all-caps, titles consisting of un…

---

## [Permalink normalization regex problem](https://meta.discourse.org/t/permalink-normalization-regex-problem/54373)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 1\
**Last updated:** [December 17, 2016, 4:47pm UTC](https://meta.discourse.org/t/permalink-normalization-regex-problem/54373 "2016-12-17T16:47:37Z")

</div>

I’m trying to fix permalinks from URLs like this: http://hostname/forum/category-slug-not-in-the-database/ID-slug-not-matching-title.html My plan is to create permalinks like forum/ID --\> topic id and then a permali…

---

## [How to send http request](https://meta.discourse.org/t/how-to-send-http-request/54125)

<div class="topic-metadata">

**Author:** [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Replies:** 9\
**Last updated:** [December 14, 2016, 1:01pm UTC](https://meta.discourse.org/t/how-to-send-http-request/54125 "2016-12-14T13:01:22Z")

</div>

Hi. I want to send http get request but discourse doesn’t allow me to send it and I see this error while sending this in firebug: locked loading mixed active content but I doesn’t have any problem with https request. …

---

## [What exactly goes on when DELETE /session/username is invoked?](https://meta.discourse.org/t/what-exactly-goes-on-when-delete-session-username-is-invoked/53993)

<div class="topic-metadata">

**Author:** [@Kevin\_Wildenradt](https://meta.discourse.org/u/Kevin_Wildenradt)\
**Replies:** 5\
**Last updated:** [December 9, 2016, 11:11pm UTC](https://meta.discourse.org/t/what-exactly-goes-on-when-delete-session-username-is-invoked/53993 "2016-12-09T23:11:52Z")

</div>

I am invoking this endpoint using a CSRF token just like the Discourse UI does. Observing the backend logs seems to indicate that the session is deleted on some level, but this seems to have no effect on logging the user…

---

## [oEmbed + Embed.ly](https://meta.discourse.org/t/oembed-embed-ly/47275)

<div class="topic-metadata">

**Author:** [@shri](https://meta.discourse.org/u/shri)\
**Replies:** 2\
**Last updated:** [July 14, 2016, 5:55am UTC](https://meta.discourse.org/t/oembed-embed-ly/47275 "2016-07-14T05:55:45Z")

</div>

Here’s what I’d like to setup as a plugin. Not sure where to begin and how this would work. Perhaps this can be done using onebox or something else? I’d like to be able to create a more generic embedding interface - On…

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

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