# Development

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

[最新版本](https://meta.discourse.org/latest.md) · [分類](https://meta.discourse.org/categories.md) · [標簽](https://meta.discourse.org/tags.md)

**Page:** 131

---

## [Running git commands in private repo inside docker not working correctly](https://meta.discourse.org/t/running-git-commands-in-private-repo-inside-docker-not-working-correctly/67321)

<div class="topic-metadata">

**Author:** [@net\_deamon](https://meta.discourse.org/u/net_deamon)\
**回覆:** 6\
**Last updated:** [2017年八月4日 16:38 UTC](https://meta.discourse.org/t/running-git-commands-in-private-repo-inside-docker-not-working-correctly/67321 "2017-08-04T16:38:31Z")

</div>

I am working on bitbucket support for the docker\_manager plugin. It does not work well with private repositories. The plugin works by running the following commands to check the commits behind latest\_local\_commit git r…

---

## [Add custom verification image upload for new signups?](https://meta.discourse.org/t/add-custom-verification-image-upload-for-new-signups/67330)

<div class="topic-metadata">

**Author:** [@sizzlecookie](https://meta.discourse.org/u/sizzlecookie)\
**回覆:** 6\
**Last updated:** [2017年八月4日 05:14 UTC](https://meta.discourse.org/t/add-custom-verification-image-upload-for-new-signups/67330 "2017-08-04T05:14:56Z")

</div>

Hello! New to Discourse, I need new users to upload a verification image before their account is created… I’ve already required new users to be approved before allowing access, but I also need: an upload button on the…

---

## [Plugin not loaded when route not found](https://meta.discourse.org/t/plugin-not-loaded-when-route-not-found/67265)

<div class="topic-metadata">

**Author:** [@jack2](https://meta.discourse.org/u/jack2)\
**回覆:** 2\
**Last updated:** [2017年八月1日 19:34 UTC](https://meta.discourse.org/t/plugin-not-loaded-when-route-not-found/67265 "2017-08-01T19:34:16Z")

</div>

Whenever I start Discourse on an unknown route (such as https://www.mydiscourse.org/tag/zzz where zzz is a tag that doesn’t exist), my plugin doesn’t load. Is this the intended behavior? If it is, is there something I ca…

---

## [Is using a GUID for an uploaded filename secure?](https://meta.discourse.org/t/is-using-a-guid-for-an-uploaded-filename-secure/67062)

<div class="topic-metadata">

**Author:** [@rriemann](https://meta.discourse.org/u/rriemann)\
**回覆:** 16\
**Last updated:** [2017年七月31日 14:56 UTC](https://meta.discourse.org/t/is-using-a-guid-for-an-uploaded-filename-secure/67062 "2017-07-31T14:56:30Z")

</div>

Continuing the discussion from Quick image resizing and markdown image dimensions: I decided that we are already quite off-topic. So let’s discuss notions of security in this thread. In many applications, security is …

---

## [Backup failed with postgresql connection error](https://meta.discourse.org/t/backup-failed-with-postgresql-connection-error/67145)

<div class="topic-metadata">

**Author:** [@xiangzhuyuan](https://meta.discourse.org/u/xiangzhuyuan)\
**回覆:** 0\
**Last updated:** [2017年七月31日 06:29 UTC](https://meta.discourse.org/t/backup-failed-with-postgresql-connection-error/67145 "2017-07-31T06:29:24Z")

</div>

I have tried the latest discourse with official Docker image few days, and I found the regular backup operation would be failed every time, the error log contains: FATAL: Peer authentication failed for user "postgres" W…

---

## [\[API\] Database timeout error when deleting topics in bulk](https://meta.discourse.org/t/api-database-timeout-error-when-deleting-topics-in-bulk/66930)

<div class="topic-metadata">

**Author:** [@jack2](https://meta.discourse.org/u/jack2)\
**回覆:** 4\
**Last updated:** [2017年七月28日 22:05 UTC](https://meta.discourse.org/t/api-database-timeout-error-when-deleting-topics-in-bulk/66930 "2017-07-28T22:05:05Z")

</div>

I’m trying to delete 8 topics with the API but I get the following error after 4 of them have been deleted: W20170727-16:21:10.014(2)? (STDERR) Request: \[DELETE http://forum.docuss.org/t/6 75.json \] W20170727-16:21:10.0…

---

## [How to render Component inside Widget?](https://meta.discourse.org/t/how-to-render-component-inside-widget/52872)

<div class="topic-metadata">

**Author:** [@mrded](https://meta.discourse.org/u/mrded)\
**回覆:** 3\
**Last updated:** [2017年七月28日 14:20 UTC](https://meta.discourse.org/t/how-to-render-component-inside-widget/52872 "2017-07-28T14:20:36Z")

</div>

Let’s say, I have a component assets/javascripts/discourse/templates/components/example-component.hbs: \<h2\>Hello component!\</h2\> And I have a widget /assets/javascripts/discourse/widgets/example-widget.js.es6: import …

---

## [Attention Onebox experts: Help requested resizing an iFrame embedded via oEmbed](https://meta.discourse.org/t/attention-onebox-experts-help-requested-resizing-an-iframe-embedded-via-oembed/45603)

<div class="topic-metadata">

**Author:** [@Travis\_Kriplean](https://meta.discourse.org/u/Travis_Kriplean)\
**回覆:** 22\
**Last updated:** [2017年七月27日 13:52 UTC](https://meta.discourse.org/t/attention-onebox-experts-help-requested-resizing-an-iframe-embedded-via-oembed/45603 "2017-07-27T13:52:43Z")

</div>

I’ve extracted this question from this thread I’ve been working on an oEmbed endpoint for consider.it that returns HTML that can be Oneboxed in a Discourse thread. Currently, the oEmbed html snippet is mostly just an if…

---

## [Issue regarding Docker development image](https://meta.discourse.org/t/issue-regarding-docker-development-image/53702)

<div class="topic-metadata">

**Author:** [@zuzust](https://meta.discourse.org/u/zuzust)\
**回覆:** 25\
**Last updated:** [2017年七月27日 13:04 UTC](https://meta.discourse.org/t/issue-regarding-docker-development-image/53702 "2017-07-27T13:04:18Z")

</div>

I’ve tried to setup my Discourse development environment the Docker way, but I’ve realized that boot\_env script tries to pull a non existent discourse/discourse\_dev:latest docker image. Instead, a discourse/dev:latest im…

---

## [SiteSetting file format update for locale override and hidden params based on Rails.env](https://meta.discourse.org/t/sitesetting-file-format-update-for-locale-override-and-hidden-params-based-on-rails-env/66254)

<div class="topic-metadata">

**Author:** [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**回覆:** 8\
**Last updated:** [2017年七月26日 06:11 UTC](https://meta.discourse.org/t/sitesetting-file-format-update-for-locale-override-and-hidden-params-based-on-rails-env/66254 "2017-07-26T06:11:40Z")

</div>

I am working on the feature to allow overriding site setting based on the default\_locale. @sam have talked with me that site setting based on environment is misleading. So I’d like to draw some proposals here to see whic…

---

## [QUnit tests won't pass in discourse\_dev docker image](https://meta.discourse.org/t/qunit-tests-wont-pass-in-discourse-dev-docker-image/62797)

<div class="topic-metadata">

**Author:** [@david](https://meta.discourse.org/u/david)\
**回覆:** 19\
**Last updated:** [2017年七月25日 15:50 UTC](https://meta.discourse.org/t/qunit-tests-wont-pass-in-discourse-dev-docker-image/62797 "2017-07-25T15:50:27Z")

</div>

I’m trying to use the docker image for tests both on my mac, and also on travis. For a while now the qunit tests have been failing on exactly the same tests, and I can’t figure out why. The steps I’m taking are the same…

---

## [Removal of timecop ⏲ 👮🏼](https://meta.discourse.org/t/removal-of-timecop-timer-clock-policeman-t3/66773)

<div class="topic-metadata">

**Author:** [@sam](https://meta.discourse.org/u/sam)\
**回覆:** 0\
**Last updated:** [2017年七月25日 12:52 UTC](https://meta.discourse.org/t/removal-of-timecop-timer-clock-policeman-t3/66773 "2017-07-25T12:52:32Z")

</div>

Yesterday I committed a change that removed the timecop gem and replaced it with these lines of code: class TrackTimeStub def self.stubbed false end end def freeze\_time(now=Time.now) datetime = …

---

## [Discourse CommonMark migration plans 🎊 🎈](https://meta.discourse.org/t/discourse-commonmark-migration-plans-confetti-ball-balloon/64234)

<div class="topic-metadata">

**Author:** [@sam](https://meta.discourse.org/u/sam)\
**回覆:** 8\
**Last updated:** [2017年七月21日 21:42 UTC](https://meta.discourse.org/t/discourse-commonmark-migration-plans-confetti-ball-balloon/64234 "2017-07-21T21:42:15Z")

</div>

I have commenced our migration to markdown-it , all rejoice :confetti\_ball: markdown-it is a compliant CommonMark JavaScript library that is super fast, well maintained and straight forward to extend. I already have it…

---

## [Improving pain points on bootstrap and rebuild](https://meta.discourse.org/t/improving-pain-points-on-bootstrap-and-rebuild/63674)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 5\
**Last updated:** [2017年七月21日 21:14 UTC](https://meta.discourse.org/t/improving-pain-points-on-bootstrap-and-rebuild/63674 "2017-07-21T21:14:53Z")

</div>

Continuing the discussion from Can Discourse ship frequent Docker images that do not need to be bootstrapped?: Well, it took me two years, but I finally bothered to learn how to create a separate data container and reb…

---

## [inlineRegexp with the new Markdown-it](https://meta.discourse.org/t/inlineregexp-with-the-new-markdown-it/66525)

<div class="topic-metadata">

**Author:** [@mr8](https://meta.discourse.org/u/mr8)\
**回覆:** 3\
**Last updated:** [2017年七月20日 19:35 UTC](https://meta.discourse.org/t/inlineregexp-with-the-new-markdown-it/66525 "2017-07-20T19:35:17Z")

</div>

Hello, Had a few plugins that utilized inlineRegexp and worked great until the switch to Markdown-it. I’m completely lost with the new markdown-it… Any suggestion or example plugins that I might be able to look at? My…

---

## [How do i install plugins after doing a fork?](https://meta.discourse.org/t/how-do-i-install-plugins-after-doing-a-fork/66442)

<div class="topic-metadata">

**Author:** [@Guilherme\_Goncalves](https://meta.discourse.org/u/Guilherme_Goncalves)\
**回覆:** 2\
**Last updated:** [2017年七月19日 14:46 UTC](https://meta.discourse.org/t/how-do-i-install-plugins-after-doing-a-fork/66442 "2017-07-19T14:46:51Z")

</div>

I’ve installed one discourse app in my server, but I just cant put the plugins inside it.

---

## [通过API将用户添加到组时出现 "BAD CSRF" 错误](https://meta.discourse.org/t/adding-user-to-group-from-api-gets-bad-csrf/66430)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 4\
**Last updated:** [2017年七月19日 14:36 UTC](https://meta.discourse.org/t/adding-user-to-group-from-api-gets-bad-csrf/66430 "2017-07-19T14:36:06Z")

</div>

我试图通过API将用户添加到组中。根据文档和我在网页浏览器中添加用户时看到的情况，似乎这是可行的，但我收到“BAD CSRF”错误 curl -H 'Content-Type: ap…

---

## [Plugin: notification on change to user settings](https://meta.discourse.org/t/plugin-notification-on-change-to-user-settings/66419)

<div class="topic-metadata">

**Author:** [@bcd](https://meta.discourse.org/u/bcd)\
**回覆:** 0\
**Last updated:** [2017年七月19日 04:52 UTC](https://meta.discourse.org/t/plugin-notification-on-change-to-user-settings/66419 "2017-07-19T04:52:08Z")

</div>

I’m developing a plugin to utilize Discourse as the SSO for another web application. The other site utilizes the same username, email address, and avatar as the Discourse forum. Its the opposite of the normal SSO integra…

---

## [Disable serve static files](https://meta.discourse.org/t/disable-serve-static-files/66341)

<div class="topic-metadata">

**Author:** [@leo.proctor](https://meta.discourse.org/u/leo.proctor)\
**回覆:** 3\
**Last updated:** [2017年七月17日 22:48 UTC](https://meta.discourse.org/t/disable-serve-static-files/66341 "2017-07-17T22:48:00Z")

</div>

Somehow i want to disable public access to assets. In development by config.serve\_static\_files = false, it serves the purpose. It routes requests to upload controller, where i can authenticate or deny access. While in pr…

---

## [Plugin QUnit tests are not running as part of rake qunit:test](https://meta.discourse.org/t/plugin-qunit-tests-are-not-running-as-part-of-rake-qunit-test/59577)

<div class="topic-metadata">

**Author:** [@david](https://meta.discourse.org/u/david)\
**回覆:** 7\
**Last updated:** [2017年七月17日 18:26 UTC](https://meta.discourse.org/t/plugin-qunit-tests-are-not-running-as-part-of-rake-qunit-test/59577 "2017-07-17T18:26:45Z")

</div>

It is my understanding that running rake qunit:test should run all of the qunit tests in Discourse, including those for any installed plugins. However, when I run the task in the docker development environment it only ru…

---

## [Dev environments scripts](https://meta.discourse.org/t/dev-environments-scripts/66319)

<div class="topic-metadata">

**Author:** [@LeoMcA](https://meta.discourse.org/u/LeoMcA)\
**回覆:** 0\
**Last updated:** [2017年七月17日 11:46 UTC](https://meta.discourse.org/t/dev-environments-scripts/66319 "2017-07-17T11:46:18Z")

</div>

I’ve been using the docker scripts bundled with discourse for a while, but I’ve found they don’t work particularly well with my want to often switch between different dev instances (for instance, one running tests-passed,…

---

## [Why is the node\_modules folder not present in discourse project folder?](https://meta.discourse.org/t/why-is-the-node-modules-folder-not-present-in-discourse-project-folder/66252)

<div class="topic-metadata">

**Author:** [@He-Man](https://meta.discourse.org/u/He-Man)\
**回覆:** 4\
**Last updated:** [2017年七月16日 00:57 UTC](https://meta.discourse.org/t/why-is-the-node-modules-folder-not-present-in-discourse-project-folder/66252 "2017-07-16T00:57:53Z")

</div>

I was going through discourse code, and comparing it with standard emberjs projects. Discourse uses version 2.13 of emberjs. The emberjs directory structure includes node\_modules folder. But the front end part of dis…

---

## [Registering assets for mobile and desktop - making site responsive](https://meta.discourse.org/t/registering-assets-for-mobile-and-desktop-making-site-responsive/65041)

<div class="topic-metadata">

**Author:** [@Tech\_Domain](https://meta.discourse.org/u/Tech_Domain)\
**回覆:** 3\
**Last updated:** [2017年七月13日 10:35 UTC](https://meta.discourse.org/t/registering-assets-for-mobile-and-desktop-making-site-responsive/65041 "2017-07-13T10:35:07Z")

</div>

I am trying to register mobile specific stylesheet and desktop specific stylesheet. But the discourse always takes the stylesheet which is registered last. For example in plugin.rb file # General change register\_asset…

---

## [Search API parameters](https://meta.discourse.org/t/search-api-parameters/66079)

<div class="topic-metadata">

**Author:** [@Milena\_Marin](https://meta.discourse.org/u/Milena_Marin)\
**回覆:** 15\
**Last updated:** [2017年七月13日 09:03 UTC](https://meta.discourse.org/t/search-api-parameters/66079 "2017-07-13T09:03:33Z")

</div>

Hi guys! Have a question regarding the search API - we are using Discourse for this crowdsourcing project: https://decoders.amnesty.org/projects/decode-oil-spills Basically, thousands of people from around the world ar…

---

## [Canned Replies Plugin Update](https://meta.discourse.org/t/canned-replies-plugin-update/64904)

<div class="topic-metadata">

**Author:** [@nbianca](https://meta.discourse.org/u/nbianca)\
**回覆:** 18\
**Last updated:** [2017年七月12日 17:36 UTC](https://meta.discourse.org/t/canned-replies-plugin-update/64904 "2017-07-12T17:36:54Z")

</div>

Hello everyone! :wave: Some of you are probably already familiar with @adrapereira 's canned replies plugin. For those who are not, canned replies are quick replies that can be inserted into the editor. The current plug…

---

## [How to modify the user activity screen right side section](https://meta.discourse.org/t/how-to-modify-the-user-activity-screen-right-side-section/65451)

<div class="topic-metadata">

**Author:** [@net\_deamon](https://meta.discourse.org/u/net_deamon)\
**回覆:** 2\
**Last updated:** [2017年七月11日 18:22 UTC](https://meta.discourse.org/t/how-to-modify-the-user-activity-screen-right-side-section/65451 "2017-07-11T18:22:58Z")

</div>

I am trying to add another new tab in the plugin outlet user-activity-bottom ( after Solved,Votes …) . After adding a vertical tab, how do I display its data on the right side. The template file that has this plugin…

---

## [Model in Topic title connector is undefined - Ctrl+enter to save topic title edits](https://meta.discourse.org/t/model-in-topic-title-connector-is-undefined-ctrl-enter-to-save-topic-title-edits/65857)

<div class="topic-metadata">

**Author:** [@net\_deamon](https://meta.discourse.org/u/net_deamon)\
**回覆:** 4\
**Last updated:** [2017年七月11日 16:03 UTC](https://meta.discourse.org/t/model-in-topic-title-connector-is-undefined-ctrl-enter-to-save-topic-title-edits/65857 "2017-07-11T16:03:57Z")

</div>

https://github.com/discourse/discourse/commit/df213639f15e6e2df3de59a025145da77f503abd Earlier, in the topic-title connector, the model variable used to be set which had the details for the topic. But now the model is …

---

## [Plugin: performing DOM manipulation on pages](https://meta.discourse.org/t/plugin-performing-dom-manipulation-on-pages/65936)

<div class="topic-metadata">

**Author:** [@jack2](https://meta.discourse.org/u/jack2)\
**回覆:** 2\
**Last updated:** [2017年七月10日 16:27 UTC](https://meta.discourse.org/t/plugin-performing-dom-manipulation-on-pages/65936 "2017-07-10T16:27:48Z")

</div>

I would like to run jQuery operations on Disourse topic pages from my plugin, but I cannot find a hook that fires after a topic page is displayed. I’ve tried route:didTransition, route:setupController, component:didInse…

---

## [Stuck trying to add new locale files](https://meta.discourse.org/t/stuck-trying-to-add-new-locale-files/65899)

<div class="topic-metadata">

**Author:** [@suvla](https://meta.discourse.org/u/suvla)\
**回覆:** 0\
**Last updated:** [2017年七月9日 16:07 UTC](https://meta.discourse.org/t/stuck-trying-to-add-new-locale-files/65899 "2017-07-09T16:07:53Z")

</div>

Hi, I’m trying to display the user interface of my installation of Discourse in a language that already has a partial translation in Transifex, but their files aren’t already in the Discourse repo. To grab the files, I …

---

## [Dynamic open graph and twitter images in meta tags of topic page when image is not present in topic](https://meta.discourse.org/t/dynamic-open-graph-and-twitter-images-in-meta-tags-of-topic-page-when-image-is-not-present-in-topic/65684)

<div class="topic-metadata">

**Author:** [@net\_deamon](https://meta.discourse.org/u/net_deamon)\
**回覆:** 4\
**Last updated:** [2017年七月6日 15:08 UTC](https://meta.discourse.org/t/dynamic-open-graph-and-twitter-images-in-meta-tags-of-topic-page-when-image-is-not-present-in-topic/65684 "2017-07-06T15:08:22Z")

</div>

I have seen one solution where the first image in the topic will be used for open graph and twitter tags https://meta.discourse.org/t/difficulties-with-facebook-sharing-and-opengraph-tags-wrong-images-excerpt-contains-i…

[上一頁](https://meta.discourse.org/c/dev/7.md?page=129)

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