Can not save Default Watched Category/Tags

Opened a seperate topic for this issue. I am on tests-passed - did a rebuild already. Safe mode still has the issue.

Anonymized error log: TypeError: Cannot read property 'categories' of undefined at https://domain -

Reproduce steps? Nothing happens when I select a category as default watch and press the green button. Red cross makes it undo and green checkmark does not do anything (it should ask if I want to apply to old users, it works on another forum I installed).

Edit: Clearer title


This is not the solution nor case.

To update my case: Did a clean install on new server and it works, I can enable the setting with no issue… Restored the backup from my production site and the same issue appears. I am totally clueless, this was a clean install just two days ago and have no idea what I did wrong.

If someone from the team wants to check the issue for himself I can provide admin login to my staging site and u can do whatever you want to check the issue.

Did you do an import on a host with another hostname and restore it to this server?

1 Like

Yes. To be specific I setup the staging server on, ran the initial setup, enabled restores, uploaded this from the web interface and restored.

But let me ask it this way: is the hostname located in /etc/hosts supposed to exactly match my hostname in my Discourse app.yml file?

And how is this related to the hostname I initially setup in DO, and the name the droplet has within DO?

1 Like

No the hostname in /etc/hosts is immaterial. If it mattered you would be asked to confirm it in the installation guide.

The guide Jay linked contains all the necessary steps for domain name changes.


Did you both read this issue? It is unrelated to a domain change and really frustrating to see people just throw some URL at me. I know the guide. Why is everyone keeping referring to this guide? This is not the problem, my site is working fine except for the bug.

I feel like I am just left in the dark now with this crazy issue after two days. Please read the OP again. I CANNOT SAVE DEFAULT WATCHED SETTINGS - the hostname is unrelated and correct so I don’t need that guide, again.

Isn’t there someone from the team here? It’s super nice to install this in under 30 mins but as soon as there are issues I noticed many forum topics are being left open and unsolved. Starting to feel like a mistake selfhosting this.

So, it works.

Until you restore your backup.

This suggests that something is wrong with the data you restored. We suggested a solution,but you didn’t say much about how you created the data, so our suggestion might be wrong.

Yes. This is their job,so they’ll likely not be around until Monday.

To what solution are you referring? At this point I’ve done a lot of installs according to the guides and the hostname is correct. My etc/hosts suggestion was just a possible problem which by now I know has nothing to do with it. So yes, we can state it is in my backup or database.

But I did nothing strange. My forum launched users signing up - I never messed with my DB. That leaves my completely clueless on how to solve this problem.

Can you tell me what you need to help me solve this? I have provided a pastebin in the OP with my error log. Does this help?

How I created the restore data. The data is actually just a 2-days young database from scratch.

  1. backup made on production site
  2. Downloaded tar.gz file through the email URL
  3. Setup staging env on a new DO droplet.
  4. Allowed restores in settings and restored through the admin interface.

This issue should be fixed,


That is what I thought and hoped when seeing this commit. The newly setup staging website actually has this new build and the problem is still there…

Edit: my staging env actually has a upgrade - Installing now and will report back.

Edit2: @Dax I can confirm I’ve updated my stage1 domain to and still have the same issue.

Are you comfortable doing some debugging ? I can’t repro your error, and being in production your logs don’t tell me enough so far.

What you could do:

  • open chrome dev console (doable on something else than chrome but this is what I know better)
  • do the problematic action
  • copy the first line of the stack which in your pastbin would be:
  • press cmd + shift + p (don’t know on windows, but must be close to this)
  • be sure to remove the > and then paste it should find a file, click on it
  • click on the {} at the he bottom left, it should show you some code, copy/paste me this block here please

(possibly the could be clickable in your console, and you can just click on it, and just press {} to see it prettified)


@joffreyjaffeux I managed to take your steps, but unfortunately clicking on that link (or searching it) brings me to a file, but it is empty:


If you want, I can provide the details for my staging env so you can do some testing. (It is online environment)

Sure if you can repro on staging too, send me details by message please.


Ok this is happening in this code block:

define("discourse/routes/about", ["exports", "discourse/lib/ajax", "discourse/routes/discourse"], function(e, t, n) {
    "use strict";
    Object.defineProperty(e, "__esModule", {
        value: !0
    e.default = n.default.extend({
        model: function() {
            var o = this;
            return (0,
            t.ajax)("/about.json").then(function(i) {
                var t = []
                  , n = []
                  , s = moment().locale("en").utc().subtract(1, "year");
                i.about.admins.forEach(function(e) {
                    moment(e.last_seen_at) > s && t.push(e)
                i.about.moderators.forEach(function(e) {
                    moment(e.last_seen_at) > s && n.push(e)
                i.about.admins = t,
                i.about.moderators = n;
                var e = i.about.category_moderators;
                return e && e.length && e.forEach(function(e, t) {
                    var n ="id", e.category_id);
                    i.about.category_moderators[t].category = n
        titleToken: function() {
            return I18n.t("about.simple_title")
        actions: {
            didTransition: function() {
                return this.controllerFor("application").set("showFooter", !0),

Which is here in code source:

Not sure yet how this actions is impacting this… will dig tomorrow.

1 Like

Thanks for looking into this. Please, my forum is working perfectly besides this, there is no hurry. It is sunday evening, enjoy it and thanks for confirming the issue.

1 Like

Issue still happening on 2.4.0beta7.

Edit2: I just found out I am also not able to save the following settings:

After every commit I kept trying.

Just did a rebuild because I wanted to install the fingerprint plugin. I don’t know if you guys fixed this or if magic happened? But… I finally am able to save my default watching settings. Thanks!

1 Like

It’s fixed in the commit