# Development

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

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

**Page:** 79

---

## [Edits not being stored in user\_actions table](https://meta.discourse.org/t/edits-not-being-stored-in-user-actions-table/145025)

<div class="topic-metadata">

**Author:** [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Replies:** 18\
**Last updated:** [May 4, 2020, 8:18am UTC](https://meta.discourse.org/t/edits-not-being-stored-in-user-actions-table/145025 "2020-05-04T08:18:51Z")

</div>

I thought that every time a user edits someone else’s post, this action would be recorded in the user\_actions table, but I’ve just realized this only happens sporadically (only for some users some of the time). Is this …

---

## [What is the best way to add a link to the button?](https://meta.discourse.org/t/what-is-the-best-way-to-add-a-link-to-the-button/184465)

<div class="topic-metadata">

**Author:** [@4ong](https://meta.discourse.org/u/4ong)\
**Replies:** 0\
**Last updated:** [March 25, 2021, 11:02pm UTC](https://meta.discourse.org/t/what-is-the-best-way-to-add-a-link-to-the-button/184465 "2021-03-25T23:02:22Z")

</div>

I’m trying to replace the New Topic button in a particular category to lead to the Wizard questionnaire (that will create the topic automatically). Current code to rename the button: \<script type="text/discourse-plugin…

---

## [VS Code Extensions recommendations?](https://meta.discourse.org/t/vs-code-extensions-recommendations/184456)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Replies:** 3\
**Last updated:** [March 25, 2021, 10:07pm UTC](https://meta.discourse.org/t/vs-code-extensions-recommendations/184456 "2021-03-25T22:07:23Z")

</div>

I’m an aged use of Emacs. I’ve been trying VS Code for a while. (Surprise–it’s no easier to configure this infinitely extensible editor than it was emacs. I’ve not given up, and it’s really good for a few things, but I’m…

---

## [How to replace an existing SVG icon with a custom one?](https://meta.discourse.org/t/how-to-replace-an-existing-svg-icon-with-a-custom-one/277743)

<div class="topic-metadata">

**Author:** [@Phlipups](https://meta.discourse.org/u/Phlipups)\
**Replies:** 10\
**Last updated:** [March 25, 2021, 6:20pm UTC](https://meta.discourse.org/t/how-to-replace-an-existing-svg-icon-with-a-custom-one/277743 "2021-03-25T18:20:31Z")

</div>

So I posted this question in a thread about the component that changes the Like Icon to a thumbs up. Sorry to dredge up this topic again but I am totally confused. What I’d like to do is use a custom Like icon from her…

---

## [Latest Topics API pagination](https://meta.discourse.org/t/latest-topics-api-pagination/127034)

<div class="topic-metadata">

**Author:** [@fixr](https://meta.discourse.org/u/fixr)\
**Replies:** 4\
**Last updated:** [March 25, 2021, 12:03am UTC](https://meta.discourse.org/t/latest-topics-api-pagination/127034 "2021-03-25T00:03:44Z")

</div>

Hello everyone! Similar to this topic, I’m looking for the proper way to do pagination on the /latest.json (Topics) endpoint, specifically knowing what’s the last page. I’ve figured out that, when there are more result…

---

## [Please help, how do I install Discourse on macOS?](https://meta.discourse.org/t/please-help-how-do-i-install-discourse-on-macos/181247)

<div class="topic-metadata">

**Author:** [@Replicationz](https://meta.discourse.org/u/Replicationz)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 12:30pm UTC](https://meta.discourse.org/t/please-help-how-do-i-install-discourse-on-macos/181247 "2021-03-24T12:30:05Z")

</div>

So basically I have this StackOverflow post talking about this: https://stackoverflow.com/questions/66376203/i-am-trying-to-setup-discourse-for-macos-but-i-get-an-error But I get a bundler error that says: An error occ…

---

## [How can I add this style of background to the Search Banner?](https://meta.discourse.org/t/how-can-i-add-this-style-of-background-to-the-search-banner/273641)

<div class="topic-metadata">

**Author:** [@thaidb](https://meta.discourse.org/u/thaidb)\
**Replies:** 1\
**Last updated:** [March 23, 2021, 10:15pm UTC](https://meta.discourse.org/t/how-can-i-add-this-style-of-background-to-the-search-banner/273641 "2021-03-23T22:15:31Z")

</div>

Hello, How can i add this background search same page Whois Domain Tool: Maybe change to other style in code pen: example:

---

## [(Ab)using bumped\_at to achieve Reddit like sorting](https://meta.discourse.org/t/ab-using-bumped-at-to-achieve-reddit-like-sorting/184003)

<div class="topic-metadata">

**Author:** [@hyd504](https://meta.discourse.org/u/hyd504)\
**Replies:** 6\
**Last updated:** [March 23, 2021, 9:16pm UTC](https://meta.discourse.org/t/ab-using-bumped-at-to-achieve-reddit-like-sorting/184003 "2021-03-23T21:16:15Z")

</div>

I am running a news/political discussion forum on discourse. The issue I am seeing is that the default sorting that discourse comes with results in complete chaos for my use case since the age of topic matters a lot. For…

---

## [How to Add Meta tags into discourse](https://meta.discourse.org/t/how-to-add-meta-tags-into-discourse/183796)

<div class="topic-metadata">

**Author:** [@Nareshh\_Raja](https://meta.discourse.org/u/Nareshh_Raja)\
**Replies:** 6\
**Last updated:** [March 23, 2021, 8:40pm UTC](https://meta.discourse.org/t/how-to-add-meta-tags-into-discourse/183796 "2021-03-23T20:40:36Z")

</div>

We are having multiple meta tags needs to be added into our discourse forum site. But we haven’t found any solution related to that in the forums. Any help would be appreciated. Some examples are: \<meta name="twitter:l…

---

## [Adding CSP header](https://meta.discourse.org/t/adding-csp-header/78920)

<div class="topic-metadata">

**Author:** [@Michael\_Katrantzis1](https://meta.discourse.org/u/Michael_Katrantzis1)\
**Replies:** 2\
**Last updated:** [March 23, 2021, 12:17am UTC](https://meta.discourse.org/t/adding-csp-header/78920 "2021-03-23T00:17:46Z")

</div>

I am trying to create a vary basic .rb plugin (based on the now obsolete in chrome) discourse-allowallwhich will merge the CSP header to the default ones but cant get it to work. The below does not seem to do it. Rails…

---

## [ERR\_CONTENT\_LENGTH\_MISMATCH on mobile](https://meta.discourse.org/t/err-content-length-mismatch-on-mobile/184024)

<div class="topic-metadata">

**Author:** [@Jaroslaw](https://meta.discourse.org/u/Jaroslaw)\
**Replies:** 0\
**Last updated:** [March 22, 2021, 12:11pm UTC](https://meta.discourse.org/t/err-content-length-mismatch-on-mobile/184024 "2021-03-22T12:11:39Z")

</div>

Did anyone have ERR\_CONTENT\_LENGTH\_MISMATCH when trying to connect to discourse from mobile (emulator)? I installed WSL2 with Ubuntu and discourse forum on my windows 10 machine. Everything works fine when I try to acce…

---

## [Bundle exec rails server --binding=0.0.0.0](https://meta.discourse.org/t/bundle-exec-rails-server-binding-0-0-0-0/115353)

<div class="topic-metadata">

**Author:** [@Kids\_Unleashed](https://meta.discourse.org/u/Kids_Unleashed)\
**Replies:** 3\
**Last updated:** [March 22, 2021, 8:20am UTC](https://meta.discourse.org/t/bundle-exec-rails-server-binding-0-0-0-0/115353 "2021-03-22T08:20:41Z")

</div>

After running this, nothing loads.

---

## [Manage Users Programmatically](https://meta.discourse.org/t/manage-users-programmatically/183958)

<div class="topic-metadata">

**Author:** [@Samir\_Faci](https://meta.discourse.org/u/Samir_Faci)\
**Replies:** 1\
**Last updated:** [March 22, 2021, 1:00am UTC](https://meta.discourse.org/t/manage-users-programmatically/183958 "2021-03-22T01:00:47Z")

</div>

I’m looking for a way to programmatically create/delete and especially revoke admin permissions to particular users. I’d love an ansible module but even lacking that is there a way to use the discourse API to say given …

---

## [Backup not working on development environment](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849)

<div class="topic-metadata">

**Author:** [@jakelunniss](https://meta.discourse.org/u/jakelunniss)\
**Replies:** 5\
**Last updated:** [March 21, 2021, 9:28pm UTC](https://meta.discourse.org/t/backup-not-working-on-development-environment/183849 "2021-03-21T21:28:57Z")

</div>

Hi there, I finally managed to import posts from bbpress! Hooray! Unfortunately now I can’t create a backup file of the development instance to import into the production. Prior to the import, I created a backup and t…

---

## [Native browser virtual scroller](https://meta.discourse.org/t/native-browser-virtual-scroller/116143)

<div class="topic-metadata">

**Author:** [@dfabulich](https://meta.discourse.org/u/dfabulich)\
**Replies:** 4\
**Last updated:** [March 20, 2021, 12:37am UTC](https://meta.discourse.org/t/native-browser-virtual-scroller/116143 "2021-03-20T00:37:37Z")

</div>

Browsers are beginning to form a standard around browser-native virtual scrolling. \[GitHub - WICG/virtual-scroller · GitHub\] A built-in virtual scroller for the web platform They’re also exploring some…

---

## [Best convention for custom plugin DB data for 2021?](https://meta.discourse.org/t/best-convention-for-custom-plugin-db-data-for-2021/183521)

<div class="topic-metadata">

**Author:** [@Zach\_Swinehart](https://meta.discourse.org/u/Zach_Swinehart)\
**Replies:** 4\
**Last updated:** [March 17, 2021, 1:26pm UTC](https://meta.discourse.org/t/best-convention-for-custom-plugin-db-data-for-2021/183521 "2021-03-17T13:26:08Z")

</div>

I’m building a site that is a rental real estate community, with the core functionality orienting around city-specific discussion. There will be user data that specifies cities they’re knowledgeable about and what their …

---

## [Howto show the topic id in Metadata of initial Post](https://meta.discourse.org/t/howto-show-the-topic-id-in-metadata-of-initial-post/65567)

<div class="topic-metadata">

**Author:** [@nstoecki42](https://meta.discourse.org/u/nstoecki42)\
**Replies:** 13\
**Last updated:** [March 17, 2021, 8:48am UTC](https://meta.discourse.org/t/howto-show-the-topic-id-in-metadata-of-initial-post/65567 "2021-03-17T08:48:22Z")

</div>

I tried to display the Topic ID in the initial Post of all topics of a specific category but failed. I could not find a way by configuring Discourse and also a plugin - similar to Discourse BBCODE - failed to work. Coul…

---

## [Is it possible to add extra API call on registration?](https://meta.discourse.org/t/is-it-possible-to-add-extra-api-call-on-registration/182183)

<div class="topic-metadata">

**Author:** [@Cyan\_Suntay](https://meta.discourse.org/u/Cyan_Suntay)\
**Replies:** 4\
**Last updated:** [March 17, 2021, 6:29am UTC](https://meta.discourse.org/t/is-it-possible-to-add-extra-api-call-on-registration/182183 "2021-03-17T06:29:18Z")

</div>

how to add an extra call to our API upon registration,login,logout,forgot password without using SSO example: for registration upon saving in registration in Discourse it will trigger a post request to our API and save …

---

## [Custom plugin: cannot add to serializer](https://meta.discourse.org/t/custom-plugin-cannot-add-to-serializer/150607)

<div class="topic-metadata">

**Author:** [@marek](https://meta.discourse.org/u/marek)\
**Replies:** 1\
**Last updated:** [March 17, 2021, 1:50am UTC](https://meta.discourse.org/t/custom-plugin-cannot-add-to-serializer/150607 "2021-03-17T01:50:21Z")

</div>

Hi. I’m trying to include User admin (true/false) field to BasicUserSerializer, so I could use it, i.e., on About page. #customization:plugin.rb after\_initialize do add\_to\_serializer(:basic\_user, :admin) do objec…

---

## [Ordering categories using SQL](https://meta.discourse.org/t/ordering-categories-using-sql/111960)

<div class="topic-metadata">

**Author:** [@csmu](https://meta.discourse.org/u/csmu)\
**Replies:** 8\
**Last updated:** [March 13, 2021, 3:24pm UTC](https://meta.discourse.org/t/ordering-categories-using-sql/111960 "2021-03-13T15:24:02Z")

</div>

The following code changes the order of categories to be alphanumeric using SQL. Preconditions. Postgres backend UPDATE categories SET POSITION = subquery.position FROM ( SELECT POSITION , CASE WHEN category\_id = 0 …

---

## [Where does the common folder (for html) go in a plugin?](https://meta.discourse.org/t/where-does-the-common-folder-for-html-go-in-a-plugin/183062)

<div class="topic-metadata">

**Author:** [@JQ331](https://meta.discourse.org/u/JQ331)\
**Replies:** 7\
**Last updated:** [March 13, 2021, 1:32pm UTC](https://meta.discourse.org/t/where-does-the-common-folder-for-html-go-in-a-plugin/183062 "2021-03-13T13:32:25Z")

</div>

I want to change some basic html in a plugin I am experimenting with (would be convenient to have all changes in a single plugin). This would be html that I would put in the header section of the theme customizer on the …

---

## [Topic List Item footer buttons - timeline content](https://meta.discourse.org/t/topic-list-item-footer-buttons-timeline-content/164751)

<div class="topic-metadata">

**Author:** [@feabila](https://meta.discourse.org/u/feabila)\
**Replies:** 3\
**Last updated:** [March 3, 2021, 2:45pm UTC](https://meta.discourse.org/t/topic-list-item-footer-buttons-timeline-content/164751 "2021-03-03T14:45:18Z")

</div>

Hi! I’m working on “timeline” content concept community with discourse. Both buttons “Reply to” and “Share” are for test. I have created a component like topic-footer-buttons.hbs (#ember) with some changes \<div clas…

---

## [How to modify the preview with javascript?](https://meta.discourse.org/t/how-to-modify-the-preview-with-javascript/182563)

<div class="topic-metadata">

**Author:** [@Heddson](https://meta.discourse.org/u/Heddson)\
**Replies:** 4\
**Last updated:** [March 9, 2021, 2:04pm UTC](https://meta.discourse.org/t/how-to-modify-the-preview-with-javascript/182563 "2021-03-09T14:04:59Z")

</div>

This is kind of related to my last question. But made a new topic since it’s a new question. What is the best way to modify the preview (that you see when composing a post) with javascript in a theme component? I know …

---

## [Best element to use for pulling featured posts](https://meta.discourse.org/t/best-element-to-use-for-pulling-featured-posts/181303)

<div class="topic-metadata">

**Author:** [@MorganCarey](https://meta.discourse.org/u/MorganCarey)\
**Replies:** 10\
**Last updated:** [March 9, 2021, 7:26am UTC](https://meta.discourse.org/t/best-element-to-use-for-pulling-featured-posts/181303 "2021-03-09T07:26:54Z")

</div>

I am just launching my new site design, and what I want to do is pull specific posts (not by main category etc, but let’s say “highlighted” posts that I want to embed into main pages (for SEO, but also just to make sure …

---

## [Show a button only for certain trust levels](https://meta.discourse.org/t/show-a-button-only-for-certain-trust-levels/182581)

<div class="topic-metadata">

**Author:** [@MrDavis97](https://meta.discourse.org/u/MrDavis97)\
**Replies:** 0\
**Last updated:** [March 9, 2021, 1:50am UTC](https://meta.discourse.org/t/show-a-button-only-for-certain-trust-levels/182581 "2021-03-09T01:50:52Z")

</div>

So I have used a plug-in outlet and injected some custom HTML into the extra-nav-item outlet: \<script type="text/x-handlebars" data-template-name="/connectors/extra-nav-item/free-user-button"\> \<a id="free-user-butto…

---

## [Call function on page change](https://meta.discourse.org/t/call-function-on-page-change/148219)

<div class="topic-metadata">

**Author:** [@Chmarus](https://meta.discourse.org/u/Chmarus)\
**Replies:** 3\
**Last updated:** [April 16, 2020, 3:08pm UTC](https://meta.discourse.org/t/call-function-on-page-change/148219 "2020-04-16T15:08:55Z")

</div>

I would like to call a JavaScript function on every page change by the user. I understand JS and Ruby on Rails code, but I’m not sure what is the best practice in Discourse to achieve that. I’d be grateful for any tips. …

---

## [Generic URL to user billing page in Javascript not working](https://meta.discourse.org/t/generic-url-to-user-billing-page-in-javascript-not-working/182375)

<div class="topic-metadata">

**Author:** [@MrDavis97](https://meta.discourse.org/u/MrDavis97)\
**Replies:** 4\
**Last updated:** [March 7, 2021, 7:54pm UTC](https://meta.discourse.org/t/generic-url-to-user-billing-page-in-javascript-not-working/182375 "2021-03-07T19:54:18Z")

</div>

So I know already that /my/billing/subscriptions is a way to link the current user to his or her own user profile, in particular, the billing section that comes with Discourse Subscriptions. However, this doesn’t seem to…

---

## [How to change the link associated with a button in the user menu panel](https://meta.discourse.org/t/how-to-change-the-link-associated-with-a-button-in-the-user-menu-panel/181911)

<div class="topic-metadata">

**Author:** [@MrDavis97](https://meta.discourse.org/u/MrDavis97)\
**Replies:** 9\
**Last updated:** [March 4, 2021, 10:50pm UTC](https://meta.discourse.org/t/how-to-change-the-link-associated-with-a-button-in-the-user-menu-panel/181911 "2021-03-04T22:50:15Z")

</div>

Instead of the highlighted button pointing to u/miles/summary, I’d rather have it point to u/miles/activity. How can I do this? I tried to look it up online (it seems that you have to change the dara-url attribute with J…

---

## [CSS to hide the Posted and Seen columns in the group member page](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page/182206)

<div class="topic-metadata">

**Author:** [@JoelZaslofsky](https://meta.discourse.org/u/JoelZaslofsky)\
**Replies:** 2\
**Last updated:** [March 5, 2021, 7:42pm UTC](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page/182206 "2021-03-05T19:42:24Z")

</div>

As of Discourse 2.7.0.beta4, some custom CSS we previously used to hide the Posted and Seen columns on the group detail page no longer works. Instead, we just have the “Seen” column. I want the only column between Po…

---

## [Existence check on findAncestorModel](https://meta.discourse.org/t/existence-check-on-findancestormodel/182234)

<div class="topic-metadata">

**Author:** [@mbaker341997](https://meta.discourse.org/u/mbaker341997)\
**Replies:** 0\
**Last updated:** [March 5, 2021, 7:35pm UTC](https://meta.discourse.org/t/existence-check-on-findancestormodel/182234 "2021-03-05T19:35:00Z")

</div>

I’ve been looking around at plugin development noticed that in cases such as the discourse translator after retrieving a widget model via findAncestorModel() there’s a check on whether the result exists before proceeding…

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

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