# TypeError: Discourse.\_registerPluginCode ist keine Funktion

**URL:** <https://meta.discourse.org/t/typeerror-discourse-registerplugincode-is-not-a-function/88572>\
**Category:** Product Support\
**Created:** [28. Mai 2018 um 08:06 UTC](https://meta.discourse.org/t/typeerror-discourse-registerplugincode-is-not-a-function/88572 "2018-05-28T08:06:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)\
**Post date:** [28. Mai 2018 um 08:06 UTC](https://meta.discourse.org/t/typeerror-discourse-registerplugincode-is-not-a-function/88572/1 "2018-05-28T08:06:21Z")

</div>

I was Just casually checking the /logs of my forum and found a weird warning multiple times!

The /u/activate-account/{activation token}  
Gives this error: TypeError: Discourse.\_registerPluginCode is not a function

Console points to this code:

```js
<script>Discourse._registerPluginCode('0.8', function (api) {
    var settings = { "show_description": true, "show_mobile": true, "show_subcategory": true, "hide_if_no_description": false, "exceptions": "" };

    var container = Discourse. __container__ ;

    var _require = require('virtual-dom'),
        h = _require.h;

    api.createWidget('category-header-widget', {
        tagName: 'span',
        html: function html(attrs, state) {

            var path = window.location.pathname;
            var category = void 0;

            var controller = container.lookup('controller:navigation/category');
            category = controller.get("category");

            var isException = category && settings.exceptions.split("|").includes(category.name);

            if (/^\/c\//.test(path)) {
                var hideMobile = !settings.show_mobile && this.site.mobileView ? "true" : hideMobile;
                var subCat = !settings.show_subcategory && category.parentCategory ? "true" : subCat;
                var noDesc = settings.hide_if_no_description && !category.description_text ? "true" : noDesc;

                if (!isException && !noDesc && !subCat && !hideMobile) {
                    var catDesc = function catDesc() {
                        if (settings.show_description) {
                            return h('p', category.description_text);
                        }
                    };

                    $("body").addClass("category-header");

                    return h('div.category-title-header', {
                        "attributes": {
                            "style": "background-color: #" + category.color + "; color: #" + category.text_color + ";"
                        }
                    }, h('div.category-title-contents', [h('h1', category.name), catDesc()]));
                }
            } else {
                $("body").removeClass("category-header");
            }
        }
    }), api.decorateWidget('category-header-widget:after', function (helper) {
        helper.widget.appEvents.on('page:changed', function () {
            helper.widget.scheduleRerender();
        });
    });
});</script>

```

Is there anything to worry about or is it the expected behaviour?  
All stock plugins, Repro possible in [safe mode](https://meta.discourse.org/t/53504?silent=true) as well.

---

_[View the full topic](https://meta.discourse.org/t/typeerror-discourse-registerplugincode-is-not-a-function/88572)._
