# Development

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

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

**Page:** 86

---

## [OAuth 2 flow for imgur in Discourse plugin](https://meta.discourse.org/t/oauth-2-flow-for-imgur-in-discourse-plugin/165974)

<div class="topic-metadata">

**Author:** [@mlavault](https://meta.discourse.org/u/mlavault)\
**Replies:** 4\
**Last updated:** [October 2, 2020, 1:19pm UTC](https://meta.discourse.org/t/oauth-2-flow-for-imgur-in-discourse-plugin/165974 "2020-10-02T13:19:46Z")

</div>

Hi, I’m building a very specific plugin for our discourse instance and had a few questions. At some point, the plugin will have to send a collection of our discourse topic images to Imgur. The part that gathers those i…

---

## [Import the User class instead of using User](https://meta.discourse.org/t/import-the-user-class-instead-of-using-user/139586)

<div class="topic-metadata">

**Author:** [@Varsii](https://meta.discourse.org/u/Varsii)\
**Replies:** 8\
**Last updated:** [October 1, 2020, 9:43am UTC](https://meta.discourse.org/t/import-the-user-class-instead-of-using-user/139586 "2020-10-01T09:43:11Z")

</div>

Hello dear community, I have some time to fix the warnings in our community. One of them is the following: Deprecation notice: Import the User class instead of using User (deprecated since Discourse 2.4.0) (removal in…

---

## [Webhooks: could we get the "actor ID" and the webhook timestamp?](https://meta.discourse.org/t/webhooks-could-we-get-the-actor-id-and-the-webhook-timestamp/165831)

<div class="topic-metadata">

**Author:** [@tomekw](https://meta.discourse.org/u/tomekw)\
**Replies:** 0\
**Last updated:** [September 30, 2020, 1:59pm UTC](https://meta.discourse.org/t/webhooks-could-we-get-the-actor-id-and-the-webhook-timestamp/165831 "2020-09-30T13:59:03Z")

</div>

Hi, I’m working on a Discourse-related app. It processes the webhooks to create an activity feed. Sometimes it’s problematic to get all the interesting / needed info. For example, there is no header / meta value returne…

---

## [Is it possible to modify a function in a helper via the plugin or theme component system?](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964)

<div class="topic-metadata">

**Author:** [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Replies:** 20\
**Last updated:** [September 28, 2020, 10:18pm UTC](https://meta.discourse.org/t/is-it-possible-to-modify-a-function-in-a-helper-via-the-plugin-or-theme-component-system/140964 "2020-09-28T22:18:51Z")

</div>

Is there a way to reopen a class and overwrite a function? The one I need to overwrite is function categoryStripe(color, classes) {} on line 15 from here: javascripts/discourse/helpers/category-link.js.es6.

---

## [Secure way of encrypting payload in Javascript for user authentification](https://meta.discourse.org/t/secure-way-of-encrypting-payload-in-javascript-for-user-authentification/160259)

<div class="topic-metadata">

**Author:** [@owengot](https://meta.discourse.org/u/owengot)\
**Replies:** 6\
**Last updated:** [September 28, 2020, 4:02am UTC](https://meta.discourse.org/t/secure-way-of-encrypting-payload-in-javascript-for-user-authentification/160259 "2020-09-28T04:02:25Z")

</div>

I have created a login flow that authenticates a front end application (written in Vue.js) to retrieve the user\_api\_key of a Discourse user, following the guidelines written by @sam here. The authentification works, how…

---

## [How to register a helper in Discourse?](https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904)

<div class="topic-metadata">

**Author:** [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Replies:** 4\
**Last updated:** [September 27, 2020, 7:33am UTC](https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904 "2020-09-27T07:33:29Z")

</div>

I’m trying to figure out the best way to register a handlebars helper for my Discourse plugin. I have an ajax call in my initializer that determines whether the currentUser is part of a particular group. If they are, th…

---

## [\[API\] Cleaner way to create a tag?](https://meta.discourse.org/t/api-cleaner-way-to-create-a-tag/70526)

<div class="topic-metadata">

**Author:** [@jack2](https://meta.discourse.org/u/jack2)\
**Replies:** 16\
**Last updated:** [September 25, 2020, 4:21pm UTC](https://meta.discourse.org/t/api-cleaner-way-to-create-a-tag/70526 "2020-09-25T16:21:44Z")

</div>

Right now, in order to create a tag with the API, I create a temporary topic with the new tag, then delete the temporary topic. Is there a cleaner way?

---

## [Using discourse's plugin outlets](https://meta.discourse.org/t/using-discourses-plugin-outlets/165221)

<div class="topic-metadata">

**Author:** [@akapetzoglou](https://meta.discourse.org/u/akapetzoglou)\
**Replies:** 2\
**Last updated:** [September 24, 2020, 1:56pm UTC](https://meta.discourse.org/t/using-discourses-plugin-outlets/165221 "2020-09-24T13:56:50Z")

</div>

I am targeting plugin-outlets to test as specified in this guide: but I cannot make it work for me. What am I doing wrong?

---

## [Make groups index the home page](https://meta.discourse.org/t/make-groups-index-the-home-page/163959)

<div class="topic-metadata">

**Author:** [@JQ331](https://meta.discourse.org/u/JQ331)\
**Replies:** 3\
**Last updated:** [September 23, 2020, 3:12pm UTC](https://meta.discourse.org/t/make-groups-index-the-home-page/163959 "2020-09-23T15:12:02Z")

</div>

Is there a way to make the groups index page the home page of my site? This is not an option in the setup wizard or, as far as I can tell, in the settings.

---

## [Salesforce Named Credentials](https://meta.discourse.org/t/salesforce-named-credentials/165024)

<div class="topic-metadata">

**Author:** [@ybi](https://meta.discourse.org/u/ybi)\
**Replies:** 0\
**Last updated:** [September 23, 2020, 3:59am UTC](https://meta.discourse.org/t/salesforce-named-credentials/165024 "2020-09-23T03:59:29Z")

</div>

I am currently using following apex code to check if the user exists in discourse. HttpRequest req3 = new HttpRequest(); req3.setEndpoint('https://forumname/admin/users/list/all.json?&email=' + emailaddress); req3.setMe…

---

## [Adding a new email template via a plugin](https://meta.discourse.org/t/adding-a-new-email-template-via-a-plugin/164723)

<div class="topic-metadata">

**Author:** [@pezholio](https://meta.discourse.org/u/pezholio)\
**Replies:** 1\
**Last updated:** [September 21, 2020, 2:50pm UTC](https://meta.discourse.org/t/adding-a-new-email-template-via-a-plugin/164723 "2020-09-21T14:50:52Z")

</div>

I’m currently working on a Discourse plugin, and I’d like to hook into the email functionality, and allow email templates to be customised by a admin. I’ve found the controller that displays the templates and allows them…

---

## [Creating and activating users from the API](https://meta.discourse.org/t/creating-and-activating-users-from-the-api/162124)

<div class="topic-metadata">

**Author:** [@yerttle](https://meta.discourse.org/u/yerttle)\
**Replies:** 3\
**Last updated:** [September 21, 2020, 8:46am UTC](https://meta.discourse.org/t/creating-and-activating-users-from-the-api/162124 "2020-09-21T08:46:49Z")

</div>

Hi there, we are using version 2.5.0.beta3 and are having some problems creating a user via the API. We would like to create a user and be able to post a topic straight away using the API without them having to click th…

---

## [Disable click count with underlined links?](https://meta.discourse.org/t/disable-click-count-with-underlined-links/164510)

<div class="topic-metadata">

**Author:** [@j127](https://meta.discourse.org/u/j127)\
**Replies:** 2\
**Last updated:** [September 20, 2020, 8:41pm UTC](https://meta.discourse.org/t/disable-click-count-with-underlined-links/164510 "2020-09-20T20:41:46Z")

</div>

Does anyone know if there is a way to disable click counts when the links are underlined? (We underline the links for accessibility.) I removed the click counts with this: span.badge-notification.clicks { display: …

---

## ["Your topic is similar to..."-box has class=hidden](https://meta.discourse.org/t/your-topic-is-similar-to-box-has-class-hidden/97561)

<div class="topic-metadata">

**Author:** [@Bas](https://meta.discourse.org/u/Bas)\
**Replies:** 6\
**Last updated:** [September 18, 2020, 11:03am UTC](https://meta.discourse.org/t/your-topic-is-similar-to-box-has-class-hidden/97561 "2020-09-18T11:03:00Z")

</div>

The your topic is similar to… banner: Has class="composer-popup hidden similar-topics ember-view" This kind of clashes with an assumption that a dev on our side made, namely that everything with .hidden should be … …

---

## [\`user\_event\` Webhook only sends the first 3 \`user\_fields\`](https://meta.discourse.org/t/user-event-webhook-only-sends-the-first-3-user-fields/164362)

<div class="topic-metadata">

**Author:** [@lunelson](https://meta.discourse.org/u/lunelson)\
**Replies:** 2\
**Last updated:** [September 17, 2020, 5:35pm UTC](https://meta.discourse.org/t/user-event-webhook-only-sends-the-first-3-user-fields/164362 "2020-09-17T17:35:08Z")

</div>

I’ve just created a new “confirmation” type User Field (the fourth user field we have configured), hoping to track changes to this field through webhooks; However I’m finding that our user\_event Webhook payloads are onl…

---

## [2.5.0 -\> 2.5.1 upgrade](https://meta.discourse.org/t/2-5-0-2-5-1-upgrade/164046)

<div class="topic-metadata">

**Author:** [@Phil\_Goodwin](https://meta.discourse.org/u/Phil_Goodwin)\
**Replies:** 6\
**Last updated:** [September 15, 2020, 1:22pm UTC](https://meta.discourse.org/t/2-5-0-2-5-1-upgrade/164046 "2020-09-15T13:22:35Z")

</div>

Hi, I inherited a Discourse install that I am trying to just keep running. I got an email recently saying that I should upgrade to 2.5.1. There was a link advertising an easy one-click upgrade, but when I translate that…

---

## [API can pull only 20 posts](https://meta.discourse.org/t/api-can-pull-only-20-posts/163406)

<div class="topic-metadata">

**Author:** [@sdiscourse](https://meta.discourse.org/u/sdiscourse)\
**Replies:** 7\
**Last updated:** [September 15, 2020, 1:17pm UTC](https://meta.discourse.org/t/api-can-pull-only-20-posts/163406 "2020-09-15T13:17:28Z")

</div>

With Admin privilege’s. When I use /t/{}.json API call I see only 20 posts. is there any setting which can show me all my posts on that particular topic?

---

## [Sending trackbacks](https://meta.discourse.org/t/sending-trackbacks/164080)

<div class="topic-metadata">

**Author:** [@akvadrako](https://meta.discourse.org/u/akvadrako)\
**Replies:** 0\
**Last updated:** [September 15, 2020, 11:19am UTC](https://meta.discourse.org/t/sending-trackbacks/164080 "2020-09-15T11:19:56Z")

</div>

Does anyone know of a plugin or other method of Discourse to send trackbacks? I’m specifically interested in sending trackbacks to arXiv when papers are mentioned: Article Trackbacks.

---

## [How to connect to an external database running on localhost](https://meta.discourse.org/t/how-to-connect-to-an-external-database-running-on-localhost/163683)

<div class="topic-metadata">

**Author:** [@isaac1104](https://meta.discourse.org/u/isaac1104)\
**Replies:** 2\
**Last updated:** [September 14, 2020, 6:18pm UTC](https://meta.discourse.org/t/how-to-connect-to-an-external-database-running-on-localhost/163683 "2020-09-14T18:18:01Z")

</div>

Hello, I have installed discourse on macbook for development using the “beginners-guide-to-install-discourse-for-development-using-docker” instruction. Now, I have a separate postgreSQL database with users table that c…

---

## [Improve BAD CSRF error message when making API calls with content-type application/json](https://meta.discourse.org/t/improve-bad-csrf-error-message-when-making-api-calls-with-content-type-application-json/117136)

<div class="topic-metadata">

**Author:** [@blake](https://meta.discourse.org/u/blake)\
**Replies:** 4\
**Last updated:** [September 14, 2020, 7:13pm UTC](https://meta.discourse.org/t/improve-bad-csrf-error-message-when-making-api-calls-with-content-type-application-json/117136 "2020-09-14T19:13:10Z")

</div>

API requests with the Content-Type as “application/json” often receive an unhelpful message like “BAD CSRF”, so we should improve the error messaging so that it provides more details as to why they are receiving this err…

---

## [Can I expose a route with no authentication?](https://meta.discourse.org/t/can-i-expose-a-route-with-no-authentication/162156)

<div class="topic-metadata">

**Author:** [@Stefan\_Brighiu\_M](https://meta.discourse.org/u/Stefan_Brighiu_M)\
**Replies:** 12\
**Last updated:** [September 14, 2020, 2:38pm UTC](https://meta.discourse.org/t/can-i-expose-a-route-with-no-authentication/162156 "2020-09-14T14:38:20Z")

</div>

Is there any way I can create a route that bypasses authentication. This is used to integrate with 3rd party services. The requirement is providing the service an URL (headers or payloads of any type are not supported)…

---

## [How to track events and send them to GTM, Facebook or others?](https://meta.discourse.org/t/how-to-track-events-and-send-them-to-gtm-facebook-or-others/143227)

<div class="topic-metadata">

**Author:** [@agmontpetit](https://meta.discourse.org/u/agmontpetit)\
**Replies:** 3\
**Last updated:** [September 14, 2020, 11:13am UTC](https://meta.discourse.org/t/how-to-track-events-and-send-them-to-gtm-facebook-or-others/143227 "2020-09-14T11:13:53Z")

</div>

I’m wondering what would be the best way to track events happening on the (front-end) site such as user registration or engagement (for example, post creation or liked post). Tracking such events is fundamental for analy…

---

## [How can I include discourse in my local dev stack?](https://meta.discourse.org/t/how-can-i-include-discourse-in-my-local-dev-stack/163823)

<div class="topic-metadata">

**Author:** [@timwis](https://meta.discourse.org/u/timwis)\
**Replies:** 3\
**Last updated:** [September 13, 2020, 4:10am UTC](https://meta.discourse.org/t/how-can-i-include-discourse-in-my-local-dev-stack/163823 "2020-09-13T04:10:02Z")

</div>

My organisation runs a web application and a forum, as well as a few other applications like bitwarden. I’ve containerised everything to achieve dev/prod parity and a simple development setup using docker compose. We use…

---

## [Has pagination gone away for Groups endpoint?](https://meta.discourse.org/t/has-pagination-gone-away-for-groups-endpoint/160079)

<div class="topic-metadata">

**Author:** [@mpemburn](https://meta.discourse.org/u/mpemburn)\
**Replies:** 6\
**Last updated:** [September 11, 2020, 9:37pm UTC](https://meta.discourse.org/t/has-pagination-gone-away-for-groups-endpoint/160079 "2020-09-11T21:37:51Z")

</div>

Hi, I’m in the middle of revamping our API code and I noticed that the ‘page’ parameter is no longer in the Groups endpoint. Am looking at it wrong? https://docs.discourse.org/#tag/Groups Regards, Mark Pemburn Blue…

---

## [Support for Redis Sentinel](https://meta.discourse.org/t/support-for-redis-sentinel/163608)

<div class="topic-metadata">

**Author:** [@pierreozoux](https://meta.discourse.org/u/pierreozoux)\
**Replies:** 4\
**Last updated:** [September 11, 2020, 10:52am UTC](https://meta.discourse.org/t/support-for-redis-sentinel/163608 "2020-09-11T10:52:04Z")

</div>

Hi, I noticed you removed sentinel options some years ago. Is there a specific reason for it? If I make a PR, will you accept it? If not, then I’ll monkey patch, if you have some recommendations for doing so, it has …

---

## [Travis tests failing due to eslint](https://meta.discourse.org/t/travis-tests-failing-due-to-eslint/163268)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 7\
**Last updated:** [September 10, 2020, 7:11pm UTC](https://meta.discourse.org/t/travis-tests-failing-due-to-eslint/163268 "2020-09-10T19:11:27Z")

</div>

I’ve got two plugins that are failing travis tests. It appears that I don’t have any es6 files in them and eslint feels left out? Running linters/prettyfiers eslint yarn run v1.22.5 $ /var/www/discourse/node\_modules/.bi…

---

## [How do you pass an array to the api](https://meta.discourse.org/t/how-do-you-pass-an-array-to-the-api/121598)

<div class="topic-metadata">

**Author:** [@Nikki\_Locke](https://meta.discourse.org/u/Nikki_Locke)\
**Replies:** 4\
**Last updated:** [September 6, 2020, 12:55pm UTC](https://meta.discourse.org/t/how-do-you-pass-an-array-to-the-api/121598 "2020-09-06T12:55:00Z")

</div>

On some of the api calls, you are expected to pass an array of values in the post data. How do you do this? I have figured out by trial an error how to pass an array with one item in it - e.g. for change-owner, you want…

---

## [Cannot log a string with console.log?](https://meta.discourse.org/t/cannot-log-a-string-with-console-log/162960)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 4\
**Last updated:** [September 6, 2020, 1:41am UTC](https://meta.discourse.org/t/cannot-log-a-string-with-console-log/162960 "2020-09-06T01:41:47Z")

</div>

I don’t see how this code isn’t doing what I expect. It seems to work over at w3schools. head\_tag.html \<script type="text/discourse-plugin" version="0.8"\> const user = api.getCurrentUser(); const { setDefaultHomepa…

---

## [UserField custom\_field reference](https://meta.discourse.org/t/userfield-custom-field-reference/120883)

<div class="topic-metadata">

**Author:** [@csmu](https://meta.discourse.org/u/csmu)\
**Replies:** 1\
**Last updated:** [September 4, 2020, 10:58pm UTC](https://meta.discourse.org/t/userfield-custom-field-reference/120883 "2020-09-04T22:58:57Z")

</div>

I have determined that user\_field\_15 implicitly maps to UserField(id:15) and user\_field\_1 implicitly maps to UserField(id:1) Is there any explicit mapping for UserField or is it explicitly user\_field\_n where n is the i…

---

## [Redirect to external site in a plugin?](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 6\
**Last updated:** [September 4, 2020, 10:14pm UTC](https://meta.discourse.org/t/redirect-to-external-site-in-a-plugin/132932 "2020-09-04T22:14:21Z")

</div>

I’m trying to call an external URL to log in to a remote site after users log in to Discourse. All I need to do is redirect to a URL on the remote site, which does the login there, and then redirects back to Discourse. W…

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

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