# Development

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

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

**Page:** 133

---

## [Discourse.\_registerPluginCode should never run code before objects are injected](https://meta.discourse.org/t/discourse--registerplugincode-should-never-run-code-before-objects-are-injected/62808)

<div class="topic-metadata">

**Author:** [@sam](https://meta.discourse.org/u/sam)\
**Replies:** 2\
**Last updated:** [May 16, 2017, 9:04pm UTC](https://meta.discourse.org/t/discourse--registerplugincode-should-never-run-code-before-objects-are-injected/62808 "2017-05-16T21:04:17Z")

</div>

Currently themes transpile code in \<script type="text/discourse-plugin" version="0.8"\> to: Discourse.\_registerPluginCode('0.8', function (api) This call often can happen before the application has initialized and thus a…

---

## [Sort Categories by name](https://meta.discourse.org/t/sort-categories-by-name/62764)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 2\
**Last updated:** [May 16, 2017, 6:00pm UTC](https://meta.discourse.org/t/sort-categories-by-name/62764 "2017-05-16T18:00:39Z")

</div>

I need to sort all of the subcategories in a category by name. Something like cats = Category.find\_by\_sql("select \* from categories where name like '%whatever%') x=0 cats.sort\_by\_name.each do |c| x += 1 c.positio…

---

## [Find a user by ID or username?](https://meta.discourse.org/t/find-a-user-by-id-or-username/62582)

<div class="topic-metadata">

**Author:** [@Radulf](https://meta.discourse.org/u/Radulf)\
**Replies:** 3\
**Last updated:** [May 12, 2017, 1:31pm UTC](https://meta.discourse.org/t/find-a-user-by-id-or-username/62582 "2017-05-12T13:31:56Z")

</div>

And another “simple” question from me and basically a follow up to Showing simple text with decorateWidget - #5 by vinothkannans I want to decorate the post with a custom field from the posting user. To do this, I want …

---

## [Showing simple text with decorateWidget](https://meta.discourse.org/t/showing-simple-text-with-decoratewidget/62521)

<div class="topic-metadata">

**Author:** [@Radulf](https://meta.discourse.org/u/Radulf)\
**Replies:** 4\
**Last updated:** [May 12, 2017, 11:52am UTC](https://meta.discourse.org/t/showing-simple-text-with-decoratewidget/62521 "2017-05-12T11:52:23Z")

</div>

Hi I started developing plugins for Discourse this week. I already finished my first one, that adds a button below each post that links to a homepage, depending on the post. Now, I’m on to my second project and I merely…

---

## [Embedding in more than one host](https://meta.discourse.org/t/embedding-in-more-than-one-host/62002)

<div class="topic-metadata">

**Author:** [@Patrick\_David](https://meta.discourse.org/u/Patrick_David)\
**Replies:** 15\
**Last updated:** [May 11, 2017, 6:14pm UTC](https://meta.discourse.org/t/embedding-in-more-than-one-host/62002 "2017-05-11T18:14:56Z")

</div>

Hello! I have a question that I’m hoping someone can help me answer. I have recently begun embedding for more than one site on my instance (pixls.us and digikam.org). I’m wondering if there’s a way to differentiate wh…

---

## [How to override assets with plugins?](https://meta.discourse.org/t/how-to-override-assets-with-plugins/62505)

<div class="topic-metadata">

**Author:** [@l3est](https://meta.discourse.org/u/l3est)\
**Replies:** 2\
**Last updated:** [May 11, 2017, 5:20pm UTC](https://meta.discourse.org/t/how-to-override-assets-with-plugins/62505 "2017-05-11T17:20:48Z")

</div>

I want to override one of the assets app/assets/javascripts/discourse/components/date-picker.js.es6 and load this file instead plugins/custom-plugin/assets/javascripts/date-picker.js.es6 is this possible ?

---

## [Non-permalink normalizations](https://meta.discourse.org/t/non-permalink-normalizations/62467)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 11\
**Last updated:** [May 11, 2017, 4:40pm UTC](https://meta.discourse.org/t/non-permalink-normalizations/62467 "2017-05-11T16:40:16Z")

</div>

Should permalink normalizations work for non-permalinks? I’m working on a Ning import. Links look like this: http://localhost:3000/forum/topics/ancillary-probate-procedure-oklahoma This link works fine (the slugs mat…

---

## [How to install customized discourse on docker?](https://meta.discourse.org/t/how-to-install-customized-discourse-on-docker/62443)

<div class="topic-metadata">

**Author:** [@l3est](https://meta.discourse.org/u/l3est)\
**Replies:** 1\
**Last updated:** [May 10, 2017, 3:49pm UTC](https://meta.discourse.org/t/how-to-install-customized-discourse-on-docker/62443 "2017-05-10T15:49:06Z")

</div>

I forked discourse on github and it’s working really good on development environment. How can I install this repository instead of the main one? https://github.com/l3est/discourse list of files I’ve edited: app\\asset…

---

## [2 different servers running the same Discourse instance?](https://meta.discourse.org/t/2-different-servers-running-the-same-discourse-instance/62247)

<div class="topic-metadata">

**Author:** [@mcbuzz](https://meta.discourse.org/u/mcbuzz)\
**Replies:** 5\
**Last updated:** [May 8, 2017, 8:25am UTC](https://meta.discourse.org/t/2-different-servers-running-the-same-discourse-instance/62247 "2017-05-08T08:25:22Z")

</div>

So I installed Discourse on an old computer I had laying around. I would like to use it to test stuff before rolling it out on the production site which is going to be on Digital Ocean. My old computer also has the same …

---

## [SSL error while installing dev environment](https://meta.discourse.org/t/ssl-error-while-installing-dev-environment/62278)

<div class="topic-metadata">

**Author:** [@Linh\_Vo](https://meta.discourse.org/u/Linh_Vo)\
**Replies:** 7\
**Last updated:** [May 8, 2017, 5:02am UTC](https://meta.discourse.org/t/ssl-error-while-installing-dev-environment/62278 "2017-05-08T05:02:30Z")

</div>

I have problem with SSL while installing Discourse

---

## [Can't run my Discourse locally](https://meta.discourse.org/t/cant-run-my-discourse-locally/41226)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 17\
**Last updated:** [May 7, 2017, 8:25pm UTC](https://meta.discourse.org/t/cant-run-my-discourse-locally/41226 "2017-05-07T20:25:56Z")

</div>

I go rails c then I get this… URGENT: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? Failed to initialize si…

---

## [Mentioning non-user emails / altering @-mention functionality](https://meta.discourse.org/t/mentioning-non-user-emails-altering-mention-functionality/62155)

<div class="topic-metadata">

**Author:** [@jacksongs](https://meta.discourse.org/u/jacksongs)\
**Replies:** 7\
**Last updated:** [May 6, 2017, 12:56am UTC](https://meta.discourse.org/t/mentioning-non-user-emails-altering-mention-functionality/62155 "2017-05-06T00:56:40Z")

</div>

Hello, Love your work Discourse team, keep it up. I’m a journalist from Australia working on a Discourse-based platform for investigative journalism teams. I chose Discourse because it offers thoughtful community mana…

---

## [User custom field with plugin](https://meta.discourse.org/t/user-custom-field-with-plugin/62035)

<div class="topic-metadata">

**Author:** [@Alavi1412](https://meta.discourse.org/u/Alavi1412)\
**Replies:** 2\
**Last updated:** [May 5, 2017, 10:30pm UTC](https://meta.discourse.org/t/user-custom-field-with-plugin/62035 "2017-05-05T22:30:10Z")

</div>

When I create a user\_custom\_field, the name in database is set custom\_field1 or custom\_field2 or… . But I want to set a specific name to this user\_custom\_field because I want to change this custom field at plugin.rb …

---

## [Vagrant up fails with "HTTP/2 stream 1 was not closed cleanly: INTERNAL\_ERROR (err 2)"](https://meta.discourse.org/t/vagrant-up-fails-with-http-2-stream-1-was-not-closed-cleanly-internal-error-err-2/54796)

<div class="topic-metadata">

**Author:** [@claas](https://meta.discourse.org/u/claas)\
**Replies:** 2\
**Last updated:** [May 5, 2017, 7:31pm UTC](https://meta.discourse.org/t/vagrant-up-fails-with-http-2-stream-1-was-not-closed-cleanly-internal-error-err-2/54796 "2017-05-05T19:31:31Z")

</div>

I already had trouble with vagrant before (when downloading the box was slow, which look like a known vagrant issue), but now it fails to download it at all: $ vagrant up Bringing machine 'default' up with 'libvirt' pr…

---

## [Error while running vagrant up](https://meta.discourse.org/t/error-while-running-vagrant-up/57342)

<div class="topic-metadata">

**Author:** [@kpdp](https://meta.discourse.org/u/kpdp)\
**Replies:** 3\
**Last updated:** [May 5, 2017, 7:27pm UTC](https://meta.discourse.org/t/error-while-running-vagrant-up/57342 "2017-05-05T19:27:20Z")

</div>

I’m trying to setup discourse with vagrant, but fails with the below error. Please help me on this. ==\> default: Importing base box 'discourse-16.04'... Progress: 80%There was an error while executing \`VBoxManage\`, a CL…

---

## [Discourse Rails as a proxy](https://meta.discourse.org/t/discourse-rails-as-a-proxy/61719)

<div class="topic-metadata">

**Author:** [@EndruK](https://meta.discourse.org/u/EndruK)\
**Replies:** 3\
**Last updated:** [May 4, 2017, 4:04pm UTC](https://meta.discourse.org/t/discourse-rails-as-a-proxy/61719 "2017-05-04T16:04:43Z")

</div>

Hi, I want to use my Discourse as a proxy. For that the rails server should work as a proxy between the ember frontend and a registered remote URL. Currently I am able to forward the HTTP response to ember and render …

---

## [Insufficient space problem](https://meta.discourse.org/t/insufficient-space-problem/62023)

<div class="topic-metadata">

**Author:** [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Replies:** 3\
**Last updated:** [May 3, 2017, 9:20pm UTC](https://meta.discourse.org/t/insufficient-space-problem/62023 "2017-05-03T21:20:43Z")

</div>

I’ve been wrestling with a Virtual Machine problem for a few days and playing sysadmin without much luck. Set-up Windows 10, VMware Player, Ubuntu 16.04 LTS 64-bit, 5 GB RAM I rebuild the app very frequently and have …

---

## [Importer: How to upload category logo images](https://meta.discourse.org/t/importer-how-to-upload-category-logo-images/62003)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 2\
**Last updated:** [May 3, 2017, 1:42pm UTC](https://meta.discourse.org/t/importer-how-to-upload-category-logo-images/62003 "2017-05-03T13:42:15Z")

</div>

I’m adding group support to the Ning importer (right now Ning groups are ignored; a trivial change to import the groups results in group posts going into uncategorized). It does this: Ning groups become Discourse grou…

---

## [Rerendering on widget keyUp / keyDown?](https://meta.discourse.org/t/rerendering-on-widget-keyup-keydown/61461)

<div class="topic-metadata">

**Author:** [@gdpelican](https://meta.discourse.org/u/gdpelican)\
**Replies:** 5\
**Last updated:** [May 1, 2017, 11:32pm UTC](https://meta.discourse.org/t/rerendering-on-widget-keyup-keydown/61461 "2017-05-01T23:32:18Z")

</div>

Hey Discourse team, I’m currently investigating why Babble slows down user input so much while typing. I’ve traced it to the keyUp / keyDown hooks in my composer widget, which do things like listen for submit on enter, …

---

## [Discourse autospec and JavaScript tests](https://meta.discourse.org/t/discourse-autospec-and-javascript-tests/61908)

<div class="topic-metadata">

**Author:** [@sam](https://meta.discourse.org/u/sam)\
**Replies:** 0\
**Last updated:** [May 1, 2017, 3:59pm UTC](https://meta.discourse.org/t/discourse-autospec-and-javascript-tests/61908 "2017-05-01T15:59:27Z")

</div>

I just did a little round of work on our JavaScript integration with bin/rake autospec https://asciinema.org/a/118485 In particular this takes care of: Rerunning current failing JS test on source code change Attempts…

---

## [How to get current login username from onebox?](https://meta.discourse.org/t/how-to-get-current-login-username-from-onebox/57061)

<div class="topic-metadata">

**Author:** [@suanfazu](https://meta.discourse.org/u/suanfazu)\
**Replies:** 3\
**Last updated:** [April 30, 2017, 10:47pm UTC](https://meta.discourse.org/t/how-to-get-current-login-username-from-onebox/57061 "2017-04-30T22:47:38Z")

</div>

I’m developing a plugin to embed jupyter notebooks into discourse posts. It’s a private jupyter server and the user can only share his notebooks. So i need to verify the user. how to get the current user (and maybe th…

---

## [Adding alt to img?](https://meta.discourse.org/t/adding-alt-to-img/61814)

<div class="topic-metadata">

**Author:** [@Stranik](https://meta.discourse.org/u/Stranik)\
**Replies:** 1\
**Last updated:** [April 29, 2017, 6:27am UTC](https://meta.discourse.org/t/adding-alt-to-img/61814 "2017-04-29T06:27:42Z")

</div>

I suggest adding an empty argument alt. + alt=""

---

## [TinyTDS for import](https://meta.discourse.org/t/tinytds-for-import/42884)

<div class="topic-metadata">

**Author:** [@Kevin\_McKinney](https://meta.discourse.org/u/Kevin_McKinney)\
**Replies:** 3\
**Last updated:** [April 28, 2017, 10:05pm UTC](https://meta.discourse.org/t/tinytds-for-import/42884 "2017-04-28T22:05:19Z")

</div>

I’m importing from a Snitz forum, which doesn’t have an existing import script. I’m not a Ruby developer, so I’m hacking things together as I go. Snitz uses an MS SQL Server backend, and when I look up “Ruby MS SQL Serv…

---

## [beforeModel replaceWith to /users/ URL broke in 1.8.0.beta11](https://meta.discourse.org/t/beforemodel-replacewith-to-users-url-broke-in-1-8-0-beta11/61775)

<div class="topic-metadata">

**Author:** [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)\
**Replies:** 2\
**Last updated:** [April 28, 2017, 3:33pm UTC](https://meta.discourse.org/t/beforemodel-replacewith-to-users-url-broke-in-1-8-0-beta11/61775 "2017-04-28T15:33:47Z")

</div>

Part of one of my plugins broke after installing the recent update from Discourse 1.8.0.beta10 to beta11 (11+3, to be precise). Any help understanding what broke and how to fix it would be much appreciated. Background T…

---

## [How to install the bootsnap gem?](https://meta.discourse.org/t/how-to-install-the-bootsnap-gem/61600)

<div class="topic-metadata">

**Author:** [@gerhard](https://meta.discourse.org/u/gerhard)\
**Replies:** 6\
**Last updated:** [April 27, 2017, 7:58pm UTC](https://meta.discourse.org/t/how-to-install-the-bootsnap-gem/61600 "2017-04-27T19:58:42Z")

</div>

@sam I managed to install the snappy gem by executing apt install libsnappy-dev, but I’m not sure what’s missing in order to install the bootsnap gem on my Ubuntu 16.10 machine. What’s the trick to get this working? …

---

## [Where to find User ID information](https://meta.discourse.org/t/where-to-find-user-id-information/61701)

<div class="topic-metadata">

**Author:** [@Ranga\_TA](https://meta.discourse.org/u/Ranga_TA)\
**Replies:** 8\
**Last updated:** [April 27, 2017, 3:04pm UTC](https://meta.discourse.org/t/where-to-find-user-id-information/61701 "2017-04-27T15:04:37Z")

</div>

Hi How to do we extract the username and user ID information for all the users Thanks Ranga

---

## [RSpec tests won't pass on discourse\_dev docker image](https://meta.discourse.org/t/rspec-tests-wont-pass-on-discourse-dev-docker-image/59515)

<div class="topic-metadata">

**Author:** [@david](https://meta.discourse.org/u/david)\
**Replies:** 4\
**Last updated:** [April 26, 2017, 4:23pm UTC](https://meta.discourse.org/t/rspec-tests-wont-pass-on-discourse-dev-docker-image/59515 "2017-04-26T16:23:19Z")

</div>

I’ve been experimenting with different dev environments, and am trying to get the development docker image working. While everything seems to work fairly well, I can’t get the rspec tests to pass. Repro steps: git clone…

---

## [More detailed response for API /post\_actions failures](https://meta.discourse.org/t/more-detailed-response-for-api-post-actions-failures/61536)

<div class="topic-metadata">

**Author:** [@kennym](https://meta.discourse.org/u/kennym)\
**Replies:** 4\
**Last updated:** [April 25, 2017, 6:07pm UTC](https://meta.discourse.org/t/more-detailed-response-for-api-post-actions-failures/61536 "2017-04-25T18:07:12Z")

</div>

TL;DR; I want to submit a PR for POST /post\_actions to be more verbose to an API user in order to reduce time debugging. As of now it only returns a 403 when a user couldn’t act upon a post. Please read the rest of the p…

---

## [A post's TopicEmbed isn't destroyed when the post is deleted](https://meta.discourse.org/t/a-posts-topicembed-isnt-destroyed-when-the-post-is-deleted/60904)

<div class="topic-metadata">

**Author:** [@simon](https://meta.discourse.org/u/simon)\
**Replies:** 5\
**Last updated:** [April 25, 2017, 2:44pm UTC](https://meta.discourse.org/t/a-posts-topicembed-isnt-destroyed-when-the-post-is-deleted/60904 "2017-04-25T14:44:27Z")

</div>

When a post is created through the API with an embed\_url property, the TopidEmbed that’s created on Discourse isn’t being destroyed when the topic is deleted. I don’t know if this is by accident or by design. The proble…

---

## [Include raw in json request response](https://meta.discourse.org/t/include-raw-in-json-request-response/60963)

<div class="topic-metadata">

**Author:** [@adam\_beers](https://meta.discourse.org/u/adam_beers)\
**Replies:** 3\
**Last updated:** [April 25, 2017, 2:18am UTC](https://meta.discourse.org/t/include-raw-in-json-request-response/60963 "2017-04-25T02:18:55Z")

</div>

Is there a way to include the raw as well as the cooked data for a search.json and user\_actions.json request? The “excerpt” in the response as urls, like the “cooked” entry for other responses. Wanted to have the raw d…

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

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