# Aanmeldknop wordt niet meer weergegeven met decorateWidget

**URL:** https://meta.discourse.org/t/sign-up-button-doesnt-show-up-anymore-with-decoratewidget/354691
**Category:** Support
**Created:** [26 februari 2025 om 19:45 UTC](https://meta.discourse.org/t/sign-up-button-doesnt-show-up-anymore-with-decoratewidget/354691 "2025-02-26T19:45:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Andreea\_Pomirleanu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreea_pomirleanu/32/485791_2.png) [@Andreea\_Pomirleanu](https://meta.discourse.org/u/Andreea_Pomirleanu)
#### Post date: [26 februari 2025 om 19:45 UTC](https://meta.discourse.org/t/sign-up-button-doesnt-show-up-anymore-with-decoratewidget/354691/1 "2025-02-26T19:45:57Z")

</div>

Hello! It seems that the Sign Up button we had setup next to the Login button is no longer displaying and I see an error in the console saying “[THEME NAME] decorateWidget: Could not find widget ‘header-buttons’ in registry”

The way this button was added until now, as far as I’m aware, was via Customize → Themes with a script like this:

```plaintext

<script type="text/discourse-plugin" version='0.8.12'>
api.decorateWidget('header-buttons:after', function (helper) {
    if (!api.getCurrentUser()) {
        return helper.attach('link', {
            href: 'https://www.bassbuzz.com/account/signup',
            rawLabel: 'Sign Up',
            className: "btn btn-primary btn-small login-button"
        });
    }
});
</script>

```

I’ve read some similar topics like this [Add button in header for logged in users - #3 by Lilly](https://meta.discourse.org/t/add-button-in-header-for-logged-in-users/276704/3), but I always get the error of “header-icons” not found in registry.

I have also tried this and it’s the same result:

```plaintext
<script type="text/discourse-plugin" version='0.8.12'>
  api.decorateWidget('header-buttons:after', helper => {
    if (!api.getCurrentUser()) {
      return helper.h('li', [
        helper.h('a.btn.btn-primary.btn-small.login-button', { 
          href: 'https://www.bassbuzz.com/account/signup' 
        }, 'Sign Up')
      ]);
    }
  });
</script>

```

I also looked at the documentation here: [Developing Discourse Themes & Theme Components](https://meta.discourse.org/t/beginners-guide-to-developing-discourse-themes/93648) , but I can’t seem to figure out what I’m missing.

Is there a setting that might prevent the code above from functioning? It has worked before, not sure when it stopped working. Does anyone have any advice? Thank you in advance!

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [26 februari 2025 om 19:58 UTC](https://meta.discourse.org/t/sign-up-button-doesnt-show-up-anymore-with-decoratewidget/354691/2 "2025-02-26T19:58:42Z")

</div>

Hi @Andreea_Pomirleanu 👋 welcome to meta 🙂

`decorateWidget` has been deprecated for Glimmer components. see here for info:

~~[https://meta.discourse.org/t/upcoming-post-menu-changes-how-to-prepare-themes-and-plugins/341014](https://meta.discourse.org/t/upcoming-post-menu-changes-how-to-prepare-themes-and-plugins/341014)~~

see below for the right link (thanks RGJ)

---

<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: [26 februari 2025 om 20:00 UTC](https://meta.discourse.org/t/sign-up-button-doesnt-show-up-anymore-with-decoratewidget/354691/3 "2025-02-26T20:00:35Z")

</div>

It’s in a different topic, [Upcoming Header Changes - Preparing Themes and Plugins](https://meta.discourse.org/t/upcoming-header-changes-preparing-themes-and-plugins/296544)

---

<div class="post-metadata">

### Author: ![Andreea\_Pomirleanu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andreea_pomirleanu/32/485791_2.png) [@Andreea\_Pomirleanu](https://meta.discourse.org/u/Andreea_Pomirleanu)
#### Post date: [27 februari 2025 om 20:26 UTC](https://meta.discourse.org/t/sign-up-button-doesnt-show-up-anymore-with-decoratewidget/354691/4 "2025-02-27T20:26:06Z")

</div>

Hi @RGJ thank you so much for the quick reply! I’ll get reading and get back to you if I have further questions.
