# decorateWidget no longer working

**URL:** https://meta.discourse.org/t/decoratewidget-no-longer-working/100804
**Category:** Support
**Created:** [29 oktober 2018 om 16:28 UTC](https://meta.discourse.org/t/decoratewidget-no-longer-working/100804 "2018-10-29T16:28:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bencf](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bencf](https://meta.discourse.org/u/bencf)
#### Post date: [29 oktober 2018 om 16:28 UTC](https://meta.discourse.org/t/decoratewidget-no-longer-working/100804/1 "2018-10-29T16:28:04Z")

</div>

I was using the following code in the `</head>` area of my customized theme. It was working fine, my custom navbar appeared. I tried to add another element to the custom navbar, and on preview nothing appeared. I tried to change the code back and it still didn’t work. I did some searching and can’t find any information on this, and also can’t find any errors in the console or on the page besides `Failed to load resource: the server responded with a status of 404 ()` for [https://mysite.com/javascripts/3804c7ea6ae9ec374a92e92086024dcdac103c0d.js](https://mysite.com/javascripts/3804c7ea6ae9ec374a92e92086024dcdac103c0d.js).

I have some custom CSS as well to hide other elements I don’t want, but looking at the source, I don’t think that’s what’s going on since the elements don’t even seem to be created.

And when I replace this code with the following, I don’t get any console output besides that 404:

```plaintext
<script>console.log("working");</script>

```

Any ideas on what is wrong or what I could look at to try to fix it?

```plaintext
api.decorateWidget('home-logo:after', helper => {
    return helper.h('div', [
        helper.h('div#banner_container', [
            helper.h('a', {
                href: 'https://mysite.com'
            }, helper.h('img#header_word_logo', {
                    src: 'https://mysite.com/uploads/default/original/1X/imgcode.png'
                })
            )
        ]),
        helper.h('ul#header_menu', [
            helper.h('li', [
                helper.h('a', {
                    href:'https://www.mysite.com/1',
                    title: 'Section1'
                }, 'Section1'),
            ]),
            helper.h('li', [
                helper.h('a', {
                    href:'https://www.mysite.com/2',
                    title: 'Section2'
                }, 'Section2'),
            ]),
            helper.h('li', [
                helper.h('a.current_page_item', {
                    href:'https://www.mysite.com/3',
                    title: 'Section3'
                }, 'Section3'),
            ]),
            helper.h('li', [
                helper.h('a', {
                    href:'https://www.mysite.com/4',
                    title: 'Section4'
                }, 'Section4'),
            ]),
            helper.h('li', [
                helper.h('a', {
                    href:'https://www.mysite.com/5',
                    title: 'Section5'
                }, 'Section5'),
            ]),
        ]),
    ]);
});
</script>

```

Thank you for any and all help in advance!

---

<div class="post-metadata">

### Author: ![xrav3nz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xrav3nz/32/76894_2.png) [@xrav3nz](https://meta.discourse.org/u/xrav3nz)
#### Post date: [29 oktober 2018 om 16:35 UTC](https://meta.discourse.org/t/decoratewidget-no-longer-working/100804/2 "2018-10-29T16:35:40Z")

</div>

> [@bencf](#):
>
> `Failed to load resource: the server responded with a status of 404 ()` for [https://mysite.com/javascripts/3804c7ea6ae9ec374a92e92086024dcdac103c0d.js](https://mysite.com/javascripts/3804c7ea6ae9ec374a92e92086024dcdac103c0d.js)

Hey Ben, this has been fixed with [https://github.com/discourse/discourse/commit/99d1ded3b3a2767617bbee9824e93eb57f135864](https://github.com/discourse/discourse/commit/99d1ded3b3a2767617bbee9824e93eb57f135864). Could you please update your site to latest and try again?

After the update, you may need to edit your custom JavaScript (adding/removing a trailing space will do) to trigger a cache rebuild to see the effects.

---

<div class="post-metadata">

### Author: ![bencf](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bencf](https://meta.discourse.org/u/bencf)
#### Post date: [29 oktober 2018 om 17:08 UTC](https://meta.discourse.org/t/decoratewidget-no-longer-working/100804/3 "2018-10-29T17:08:50Z")

</div>

That was the issue, thank you so much @xrav3nz!

---

<div class="post-metadata">

### Author: ![xrav3nz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xrav3nz/32/76894_2.png) [@xrav3nz](https://meta.discourse.org/u/xrav3nz)
#### Post date: [31 oktober 2018 om 22:00 UTC](https://meta.discourse.org/t/decoratewidget-no-longer-working/100804/4 "2018-10-31T22:00:11Z")

</div>

This topic was automatically closed after 2 days. New replies are no longer allowed.
