# Broken header buttons API on stable

**URL:** https://meta.discourse.org/t/broken-header-buttons-api-on-stable/384459
**Category:** Bug
**Created:** [October 1, 2025, 11:51am UTC](https://meta.discourse.org/t/broken-header-buttons-api-on-stable/384459 "2025-10-01T11:51:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 1, 2025, 11:51am UTC](https://meta.discourse.org/t/broken-header-buttons-api-on-stable/384459/1 "2025-10-01T11:51:16Z")

</div>

Given this code [GitHub - communiteq/addheaderbutton-quicktest · GitHub](https://github.com/communiteq/addheaderbutton-quicktest)

```plaintext
  api.headerButtons.add("test-header-button", TestComponent, {
    before: "auth",
  });

```

Renders **incorrectly** on 3.5.1 stable `39084ff`

![image](https://global.discourse-cdn.com/meta/original/4X/b/1/f/b1ffbf8dfec36522fb28acf4412c1fccf2a8b8ab.png)

![image](https://global.discourse-cdn.com/meta/original/4X/9/6/c/96c36cfd01246c0afa1ba363ea53050616025d0f.png)

Renders **correctly** on 3.6.0-beta2 as of this morning `10921212`

![image](https://global.discourse-cdn.com/meta/original/4X/5/d/4/5d44e827346ec9c58ab457a7335d971cbfdf3a48.png)

![image](https://global.discourse-cdn.com/meta/original/4X/b/f/2/bf268225cf6294d2596687695b0424ca2b4502b1.png)

I seem to be unable to find the commit that causes this.

EDIT it was broken on 3.5.0 already, it was still working on 3.4.7.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [October 1, 2025, 2:36pm UTC](https://meta.discourse.org/t/broken-header-buttons-api-on-stable/384459/4 "2025-10-01T14:36:05Z")

</div>

Thanks @RGJ. This PR will backport the fix we made on `latest` to `stable`:

[https://github.com/discourse/discourse/pull/35116](https://github.com/discourse/discourse/pull/35116)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [October 2, 2025, 7:00am UTC](https://meta.discourse.org/t/broken-header-buttons-api-on-stable/384459/5 "2025-10-02T07:00:29Z")

</div>

This topic was automatically closed after 15 hours. New replies are no longer allowed.
