# Development

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

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

**Page:** 80

---

## [How to decorate a post before it's cooked?](https://meta.discourse.org/t/how-to-decorate-a-post-before-its-cooked/182052)

<div class="topic-metadata">

**Author:** [@Heddson](https://meta.discourse.org/u/Heddson)\
**Replies:** 4\
**Last updated:** [March 5, 2021, 10:21am UTC](https://meta.discourse.org/t/how-to-decorate-a-post-before-its-cooked/182052 "2021-03-05T10:21:37Z")

</div>

I’m writing a theme component and would like to decorate/change the posts just before they’re cooked. How can I get ahold of the uncooked post/text (for the post that’s about to be cooked/shown)? I read the “Developer’s…

---

## [Not possible for a plugin to use \`type: group\` and pass specs?](https://meta.discourse.org/t/not-possible-for-a-plugin-to-use-type-group-and-pass-specs/181642)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 0\
**Last updated:** [March 2, 2021, 6:04pm UTC](https://meta.discourse.org/t/not-possible-for-a-plugin-to-use-type-group-and-pass-specs/181642 "2021-03-02T18:04:17Z")

</div>

If a plugin uses a type: group it must have the group created (e.g., when the database is migrated, or perhaps after\_initialize) in order to pass specs (else, the spec fails because settings include a group that does not…

---

## [Discourse Login using external API](https://meta.discourse.org/t/discourse-login-using-external-api/181773)

<div class="topic-metadata">

**Author:** [@yeezy450](https://meta.discourse.org/u/yeezy450)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 2:56pm UTC](https://meta.discourse.org/t/discourse-login-using-external-api/181773 "2021-03-03T14:56:28Z")

</div>

Hi, Can I use an external API in Discourse’s default authentication and registration? I would like to validate our users using the external API in the system and just use the UI from Discourse during login, registration…

---

## [Issues migrating test database](https://meta.discourse.org/t/issues-migrating-test-database/135876)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 8\
**Last updated:** [March 2, 2021, 4:44pm UTC](https://meta.discourse.org/t/issues-migrating-test-database/135876 "2021-03-02T16:44:20Z")

</div>

Thanks, @Mittineague! After a while, that made sense. I even wrote a spec, but even before I added my spec (and when I reverted to before I added any code), specs fail because: An error occurred while loading ./plugins…

---

## [What's the proper way to override new-category.js groupPermissions()?](https://meta.discourse.org/t/whats-the-proper-way-to-override-new-category-js-grouppermissions/181600)

<div class="topic-metadata">

**Author:** [@frank.manuel](https://meta.discourse.org/u/frank.manuel)\
**Replies:** 1\
**Last updated:** [March 2, 2021, 2:31pm UTC](https://meta.discourse.org/t/whats-the-proper-way-to-override-new-category-js-grouppermissions/181600 "2021-03-02T14:31:23Z")

</div>

Where should the file go? Isn’t it under my\_plugin/assets/javascripts/discourse/routes/new-category.js? It doesn’t seem to be changing the default group to admin (instead of everyone) as I want. (I want to disable the p…

---

## [User Profile “Like” button](https://meta.discourse.org/t/user-profile-like-button/181536)

<div class="topic-metadata">

**Author:** [@James\_Lodge](https://meta.discourse.org/u/James_Lodge)\
**Replies:** 3\
**Last updated:** [March 2, 2021, 8:08am UTC](https://meta.discourse.org/t/user-profile-like-button/181536 "2021-03-02T08:08:44Z")

</div>

Hey, Could someone point me in the right direction. We’d like to extend the Like function so that users can like profiles as well as posts. The idea is it starts conversation is a users doesn’t initially engage and part…

---

## [Discourse import IPS4 script](https://meta.discourse.org/t/discourse-import-ips4-script/181441)

<div class="topic-metadata">

**Author:** [@Алексей\_Батурин1](https://meta.discourse.org/u/%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B9_%D0%91%D0%B0%D1%82%D1%83%D1%80%D0%B8%D0%BD1)\
**Replies:** 2\
**Last updated:** [March 1, 2021, 8:39am UTC](https://meta.discourse.org/t/discourse-import-ips4-script/181441 "2021-03-01T08:39:02Z")

</div>

help shape the import of private messages there is code written for the previous version of ipb3 in the new version of ips4, some tables have been renamed ▶ Сводка this is how the table looks now the problem occu…

---

## [Push Notifications without using "allowed user api push urls "](https://meta.discourse.org/t/push-notifications-without-using-allowed-user-api-push-urls/181233)

<div class="topic-metadata">

**Author:** [@a\_developer](https://meta.discourse.org/u/a_developer)\
**Replies:** 4\
**Last updated:** [March 1, 2021, 4:31am UTC](https://meta.discourse.org/t/push-notifications-without-using-allowed-user-api-push-urls/181233 "2021-03-01T04:31:35Z")

</div>

I am currently building a web view client like discourse mobile for android for two of my personal forums. I am using the user-api-key method for authentication. I saw a couple endpoints on the discourse codebase push\_no…

---

## [Minimum Redis Version](https://meta.discourse.org/t/minimum-redis-version/181415)

<div class="topic-metadata">

**Author:** [@andyv1](https://meta.discourse.org/u/andyv1)\
**Replies:** 4\
**Last updated:** [March 1, 2021, 2:26am UTC](https://meta.discourse.org/t/minimum-redis-version/181415 "2021-03-01T02:26:25Z")

</div>

Hi, I note the minimum version of Redis is specified at 6.0, but Sidekq only requires Redis v4.0+. discourse/docs/INSTALL.md at main · discourse/discourse · GitHub I wish to use Google Cloud Redis, but it only support…

---

## [Plugin for ignoring auto-track settings if topic is in muted category](https://meta.discourse.org/t/plugin-for-ignoring-auto-track-settings-if-topic-is-in-muted-category/181326)

<div class="topic-metadata">

**Author:** [@renato](https://meta.discourse.org/u/renato)\
**Replies:** 0\
**Last updated:** [February 27, 2021, 5:20pm UTC](https://meta.discourse.org/t/plugin-for-ignoring-auto-track-settings-if-topic-is-in-muted-category/181326 "2021-02-27T17:20:27Z")

</div>

Continuing the discussion from Ignore auto-track settings if topic is in muted category: I understand this won’t be changed in core, but I’d like to disable auto-tracking when reading or replying to topics in a specific…

---

## [Multiple oneboxes performance problems](https://meta.discourse.org/t/multiple-oneboxes-performance-problems/181295)

<div class="topic-metadata">

**Author:** [@Matias\_Carpintini](https://meta.discourse.org/u/Matias_Carpintini)\
**Replies:** 2\
**Last updated:** [February 27, 2021, 11:35am UTC](https://meta.discourse.org/t/multiple-oneboxes-performance-problems/181295 "2021-02-27T11:35:53Z")

</div>

Hello everyone. I just meet the onebox gem for rails, i’m making a Linktree clone so, i have a lot of links previews but, currently, the page takes 20-30 seconds to load 11 previews (videos, twitter status, etc). Any ide…

---

## [Change unicorn port from 3000 in development](https://meta.discourse.org/t/change-unicorn-port-from-3000-in-development/94737)

<div class="topic-metadata">

**Author:** [@typeoneerror](https://meta.discourse.org/u/typeoneerror)\
**Replies:** 11\
**Last updated:** [February 26, 2021, 8:52am UTC](https://meta.discourse.org/t/change-unicorn-port-from-3000-in-development/94737 "2021-02-26T08:52:08Z")

</div>

A recent commit changed the “unicorn port” from 9292 to 3000. I don’t see any way to change the port now and this is confliciting with another rails site I have running on 3000. Previously, I’ve been running discourse as…

---

## [Distinction between the javascript Session object and the session cookie?](https://meta.discourse.org/t/distinction-between-the-javascript-session-object-and-the-session-cookie/181139)

<div class="topic-metadata">

**Author:** [@mbaker341997](https://meta.discourse.org/u/mbaker341997)\
**Replies:** 0\
**Last updated:** [February 25, 2021, 4:59pm UTC](https://meta.discourse.org/t/distinction-between-the-javascript-session-object-and-the-session-cookie/181139 "2021-02-25T16:59:40Z")

</div>

Per (Deprecated) List of cookies used by Discourse Discourse leverages a Session cookie for storing session data, but I also see this session object on the frontend which says that: It is not stored or serialized anywh…

---

## [Help find the error with import script](https://meta.discourse.org/t/help-find-the-error-with-import-script/181103)

<div class="topic-metadata">

**Author:** [@Алексей\_Батурин1](https://meta.discourse.org/u/%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B5%D0%B9_%D0%91%D0%B0%D1%82%D1%83%D1%80%D0%B8%D0%BD1)\
**Replies:** 1\
**Last updated:** [February 25, 2021, 12:52pm UTC](https://meta.discourse.org/t/help-find-the-error-with-import-script/181103 "2021-02-25T12:52:04Z")

</div>

help find the error def import\_categories puts "", "importing categories..." categories = mysql\_query(" SELECT id, name\_seo name\_seo, parent\_id as parent\_id …

---

## [Adding dropdown to "hamburger-category" widget](https://meta.discourse.org/t/adding-dropdown-to-hamburger-category-widget/180896)

<div class="topic-metadata">

**Author:** [@keegan](https://meta.discourse.org/u/keegan)\
**Replies:** 0\
**Last updated:** [February 23, 2021, 5:44pm UTC](https://meta.discourse.org/t/adding-dropdown-to-hamburger-category-widget/180896 "2021-02-23T17:44:28Z")

</div>

I want to modify the “hamburger-category” widget so that I can display all main categories in the hamburger menu with a toggle to expand and show the subcategories for each main category. For example: ▶ Category 1 ▶ C…

---

## [Event for when a user is added/removed as group owner](https://meta.discourse.org/t/event-for-when-a-user-is-added-removed-as-group-owner/180642)

<div class="topic-metadata">

**Author:** [@frank.manuel](https://meta.discourse.org/u/frank.manuel)\
**Replies:** 1\
**Last updated:** [February 22, 2021, 12:27am UTC](https://meta.discourse.org/t/event-for-when-a-user-is-added-removed-as-group-owner/180642 "2021-02-22T00:27:57Z")

</div>

There’s no DiscourseEvent for the action, and add\_model\_callback isn’t working: add\_model\_callback(GroupUser, :after\_commit, on: :update) do # never called, for some reason end Got the idea that it might work f…

---

## [How to get a previous version/revision of a post through the API](https://meta.discourse.org/t/how-to-get-a-previous-version-revision-of-a-post-through-the-api/58164)

<div class="topic-metadata">

**Author:** [@jack2](https://meta.discourse.org/u/jack2)\
**Replies:** 5\
**Last updated:** [February 21, 2021, 8:44am UTC](https://meta.discourse.org/t/how-to-get-a-previous-version-revision-of-a-post-through-the-api/58164 "2021-02-21T08:44:21Z")

</div>

Looking at the API, I don’t find any way to get a previous version/revision of a post. Am I missing something? Also, I would like to get the diff between 2 versions. Is this computed client-side only or store in the DB? …

---

## [What is the best way to display custom notice to users from plugin](https://meta.discourse.org/t/what-is-the-best-way-to-display-custom-notice-to-users-from-plugin/180562)

<div class="topic-metadata">

**Author:** [@hyd504](https://meta.discourse.org/u/hyd504)\
**Replies:** 1\
**Last updated:** [February 21, 2021, 12:17am UTC](https://meta.discourse.org/t/what-is-the-best-way-to-display-custom-notice-to-users-from-plugin/180562 "2021-02-21T00:17:46Z")

</div>

I am working on a plugin that prevents users from creating a new topic until some time after they just create a new topic. Each user has a different wait time so the notice won’t be generic and will be different for each…

---

## [Saving job precompute JSON data in ar\_internal\_metadata table?](https://meta.discourse.org/t/saving-job-precompute-json-data-in-ar-internal-metadata-table/180474)

<div class="topic-metadata">

**Author:** [@hyd504](https://meta.discourse.org/u/hyd504)\
**Replies:** 0\
**Last updated:** [February 20, 2021, 2:45am UTC](https://meta.discourse.org/t/saving-job-precompute-json-data-in-ar-internal-metadata-table/180474 "2021-02-20T02:45:17Z")

</div>

I have a job that performs an aggregation task that other more frequently running lightweight jobs have to consume. Is it safe to save the precompute data into the ar\_internal\_metadata as a JSON string? The JSON object i…

---

## [What scope is needed for acessing {{localhost}}/posts.json?](https://meta.discourse.org/t/what-scope-is-needed-for-acessing-localhost-posts-json/180358)

<div class="topic-metadata">

**Author:** [@Hugo\_Tadashi](https://meta.discourse.org/u/Hugo_Tadashi)\
**Replies:** 4\
**Last updated:** [February 19, 2021, 10:18pm UTC](https://meta.discourse.org/t/what-scope-is-needed-for-acessing-localhost-posts-json/180358 "2021-02-19T22:18:42Z")

</div>

Hi, I generated an admin-issued API key with write, read and read lists scopes. However, when I try to consume the key (adding the key on the header Api-Key) to access the {{localhost}}/posts.json endpoint, I get the fo…

---

## [How to insert custom html through jquery using plugin-api events](https://meta.discourse.org/t/how-to-insert-custom-html-through-jquery-using-plugin-api-events/180330)

<div class="topic-metadata">

**Author:** [@narayanan](https://meta.discourse.org/u/narayanan)\
**Replies:** 0\
**Last updated:** [February 19, 2021, 11:13am UTC](https://meta.discourse.org/t/how-to-insert-custom-html-through-jquery-using-plugin-api-events/180330 "2021-02-19T11:13:56Z")

</div>

I have tried to add custom html through jquery using plugin api events like api.onAppEvent(), api.decorateWidget(), etc.., in Edit CSS/HTML \>\> /head section. But, the events which i tried is not triggering the jquery on …

---

## [Javascripts targeting the footer doesn't work after page transitions](https://meta.discourse.org/t/javascripts-targeting-the-footer-doesnt-work-after-page-transitions/180012)

<div class="topic-metadata">

**Author:** [@narayanan](https://meta.discourse.org/u/narayanan)\
**Replies:** 4\
**Last updated:** [February 19, 2021, 10:54am UTC](https://meta.discourse.org/t/javascripts-targeting-the-footer-doesnt-work-after-page-transitions/180012 "2021-02-19T10:54:15Z")

</div>

I have written a css to make the footer menu responsively. When we navigate to mobile devices, footer menus are designed as similar to hamburger menu. So I have written a click function on Edit Css/Html \>\> /head section …

---

## [Is there a way to lint handlebars?](https://meta.discourse.org/t/is-there-a-way-to-lint-handlebars/179753)

<div class="topic-metadata">

**Author:** [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Replies:** 14\
**Last updated:** [February 18, 2021, 6:46pm UTC](https://meta.discourse.org/t/is-there-a-way-to-lint-handlebars/179753 "2021-02-18T18:46:58Z")

</div>

I was looking for a way to lint handlebars files in discourse. I did find a command that seems to run but doesn’t make any changes or list issues. yarn ember-template-lint --fix path/to/files I’m not sure if its even s…

---

## [About post\_type in API responses](https://meta.discourse.org/t/about-post-type-in-api-responses/180123)

<div class="topic-metadata">

**Author:** [@Hugo\_Tadashi](https://meta.discourse.org/u/Hugo_Tadashi)\
**Replies:** 2\
**Last updated:** [February 18, 2021, 12:58am UTC](https://meta.discourse.org/t/about-post-type-in-api-responses/180123 "2021-02-18T00:58:51Z")

</div>

What is the meaning of the field post\_type in the response of https://{defaultHost}/posts.json endpoint? Exploring it so far, I got that 1 is a regular post and 3 a post that a moderator made an action (archived, pinned…

---

## [A better way to implement custom jQuery code?](https://meta.discourse.org/t/a-better-way-to-implement-custom-jquery-code/180056)

<div class="topic-metadata">

**Author:** [@cosdesign](https://meta.discourse.org/u/cosdesign)\
**Replies:** 3\
**Last updated:** [February 18, 2021, 12:44am UTC](https://meta.discourse.org/t/a-better-way-to-implement-custom-jquery-code/180056 "2021-02-18T00:44:53Z")

</div>

I’m having an issue with my jquery code, not being always triggered. What I’m trying to do is to toggle a class when the user scrolls more than 70px. It works fine but not always. For example, sometimes after editing a…

---

## [Testing on non-latin languages](https://meta.discourse.org/t/testing-on-non-latin-languages/179662)

<div class="topic-metadata">

**Author:** [@chrispanag](https://meta.discourse.org/u/chrispanag)\
**Replies:** 2\
**Last updated:** [February 17, 2021, 8:17pm UTC](https://meta.discourse.org/t/testing-on-non-latin-languages/179662 "2021-02-17T20:17:37Z")

</div>

Después de 3 años usando Discourse para un foro griego, he identificado varios pequeños errores que pasan desapercibidos entre las actualizaciones y que tienen que ver principalmente con caracteres no latinos. Por ejemplo: Algunas categorías están rotas: "Lo…

---

## [How to render template component variables as html](https://meta.discourse.org/t/how-to-render-template-component-variables-as-html/180068)

<div class="topic-metadata">

**Author:** [@OlivierLambert](https://meta.discourse.org/u/OlivierLambert)\
**Replies:** 2\
**Last updated:** [February 17, 2021, 5:02pm UTC](https://meta.discourse.org/t/how-to-render-template-component-variables-as-html/180068 "2021-02-17T17:02:34Z")

</div>

Hey! A quick one here. I’ve got this code right here: \<script type="text/x-handlebars" data-template-name="/connectors/discovery-below/sidebar" \> {{#if missions}} \<h2\>{{#if userName}}{{i18n (theme-prefix "…

---

## [What is the new best way to tweak distant theme component?](https://meta.discourse.org/t/what-is-the-new-best-way-to-tweak-distant-theme-component/180000)

<div class="topic-metadata">

**Author:** [@oca](https://meta.discourse.org/u/oca)\
**Replies:** 2\
**Last updated:** [February 17, 2021, 2:02pm UTC](https://meta.discourse.org/t/what-is-the-new-best-way-to-tweak-distant-theme-component/180000 "2021-02-17T14:02:39Z")

</div>

Months ago (or maybe more, I’ve never been that up to date), we could modify HTML/CSS of any theme components, not only the local one. There was just an alert saying «be careful, if this component were to be updated, yo…

---

## [Can you override 'any' file in Discourse via a plugin?](https://meta.discourse.org/t/can-you-override-any-file-in-discourse-via-a-plugin/179836)

<div class="topic-metadata">

**Author:** [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Replies:** 1\
**Last updated:** [February 16, 2021, 5:44am UTC](https://meta.discourse.org/t/can-you-override-any-file-in-discourse-via-a-plugin/179836 "2021-02-16T05:44:09Z")

</div>

I thought this was the case but on trying it recently it didn’t work (I also searched for an answer here and Google but didn’t find anything concrete, so hopefully this might help someone in future). It’s been a while s…

---

## [How can I write a plugin to allow TL1 to ignore users?](https://meta.discourse.org/t/how-can-i-write-a-plugin-to-allow-tl1-to-ignore-users/147958)

<div class="topic-metadata">

**Author:** [@pnoeric](https://meta.discourse.org/u/pnoeric)\
**Replies:** 2\
**Last updated:** [February 15, 2021, 10:01pm UTC](https://meta.discourse.org/t/how-can-i-write-a-plugin-to-allow-tl1-to-ignore-users/147958 "2021-02-15T22:01:58Z")

</div>

I found this code, which seems to be exactly the place I want to override: I see where it checks the user’s trust level and only allows them if their level is \>= :member …I think if I change that to :basic it will let…

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

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