# Trying to access /tags gives an error due to keyword conflict

**URL:** <https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953>\
**Category:** Bug\
**Created:** [August 15, 2020, 4:33am UTC](https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953 "2020-08-15T04:33:36Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

Users reported an error when accessing `/tags` on the Discourse site, despite individual tag pages working fine. Initial troubleshooting by [Stranik](/t/-/160953/2) and [neounix](/t/-/160953/4) suggested possible plugin or JS conflicts, but [looeee](/t/-/160953/1) confirmed minimal plugins and themes were in use. The root cause was identified by [j.jaffeux](/t/-/160953/5) as a JavaScript keyword conflict: the tag named `constructor` triggered unexpected behavior because `obj['constructor']` returns the object’s constructor method instead of `undefined`. Renaming or deleting the `constructor` tag resolved the issue. [looeee](/t/-/160953/6) confirmed the fix and noted a related usability concern: editing tags on old posts bumps them to the top of the feed, disrupting active discussions. They asked if admins can edit tags without affecting post visibility or sorting — a feature request implied but not addressed in the thread.

<div class="post-metadata">

**Author:** ![looeee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/looeee/32/85362_2.png) [@looeee](https://meta.discourse.org/u/looeee)\
**Post date:** [August 15, 2020, 4:33am UTC](https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953/1 "2020-08-15T04:33:36Z")

</div>

When I try to access `https://discourse.threejs.org/tags` I get an error:

 ![err](https://global.discourse-cdn.com/meta/original/3X/f/e/feb975717aeaee9777cdd660c69bc58c8b6d43e3.png)

However, tags are enabled and working, and I can access individual tags like `https://discourse.threejs.org/tag/geometry` without problems.

Does anyone know what’s going on here? Have I disabled the tags page by mistake somehow?

---

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [August 15, 2020, 4:53am UTC](https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953/2 "2020-08-15T04:53:48Z")

</div>

Are there any addons or plugins worth you?

On the tags page (in the browser) you have a lot of errors.

`TypeError: o.setProperties is not a function...`

`Error while processing route: tags.index o.setProperties is not a function TypeError: o.setProperties is not a function`

The situation persists with `safe-mode`.

I updated my instance a minute ago and there are no errors. Perhaps some extensions (plugins) are interfering?

---

<div class="post-metadata">

**Author:** ![looeee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/looeee/32/85362_2.png) [@looeee](https://meta.discourse.org/u/looeee)\
**Post date:** [August 15, 2020, 7:32am UTC](https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953/3 "2020-08-15T07:32:25Z")

</div>

We’re using the open source community version, so we’re pretty limited in terms of plugins.  
Here’s what the plugins page looks like:

 ![err2](https://global.discourse-cdn.com/meta/original/3X/5/7/57bfbeff28c6522462f19eeeeae8566a6e031536.png)

I’ve installed some themes and a couple of components too:

 ![themes](https://global.discourse-cdn.com/meta/original/3X/b/0/b01fb24f861d07104973f859870e504348f0fb6d.png)

 ![comp](https://global.discourse-cdn.com/meta/original/3X/6/c/6c122ab05866ce0607741902bcd1da0e2b74c448.png)

However, I tried disabling the components and updating the themes but it doesn’t change anything.

---

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [August 15, 2020, 10:36am UTC](https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953/4 "2020-08-15T10:36:32Z")

</div>

Hey @looeee

Sorry to read you are having this issue.

I visited your site and took a quick look for you and found a lot of javascript errors in the console; but I could not trace the console error to a specific main line in the Ember / JS code.

To confirm it was related to javascript, which is easy enough to do, I looked at your site (the tags page) with the user agent set to GoogleBot, and could access the page:

 ![Screen Shot 2020-08-15 at 5.15.49 PM](https://global.discourse-cdn.com/meta/original/3X/a/3/a3191244bbe89b8b05ea2397945f8f7e66c655d2.jpeg)

Here is a “long shot”, “just to see” kinda thing, but it might lead you to some clues.

Consider temporarily “disabling tags” in your admin panel settings:

![Screen Shot 2020-08-15 at 5.28.30 PM](https://global.discourse-cdn.com/meta/original/3X/8/2/82919db580d108e555807ccc8f9283158331a4d9.jpeg)

Then navigate to your tags page like before and refresh. You should get the standard Discourse 404 error:

- Oops! That page doesn’t exist or is private.

If you do not see the ’ Oops! That page doesn’t exist or is private’ message after you disable thread tags, that will be an interesting surprise; but I guess you will.

Then, go back into your admin settings and re-enable your thread tags, and refresh the tags page again.

I am guessing you will still see the “Something went wrong” message, but it is easy enough to disable and re-enable, and see if anything new or interesting appears which might be a clue.

HTH.

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [August 15, 2020, 7:20pm UTC](https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953/5 "2020-08-15T19:20:34Z")

</div>

Hello @looeee,

You are running into a rare issue due to one of your tags `constructor` and some JS code.

I will get a fix Monday, in the mean time if it’s urgent to you, you can rename the constructor tag to something else, or delete it. /tags/constructor should be accessible.

* * *

For a longer and more nerdy story, at some place in code we do something like:

```plaintext
const obj = {};
obj['constructor']

```

And instead of returning undefined, it actually returns the constructor method of the object [Object.prototype.constructor - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) which is obviously something our code wasn’t expecting 😅

---

<div class="post-metadata">

**Author:** ![looeee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/looeee/32/85362_2.png) [@looeee](https://meta.discourse.org/u/looeee)\
**Post date:** [August 16, 2020, 6:38am UTC](https://meta.discourse.org/t/trying-to-access-tags-gives-an-error-due-to-keyword-conflict/160953/6 "2020-08-16T06:38:51Z")

</div>

> [@j.jaffeux](#):
>
> And instead of returning undefined, it actually returns the constructor method of the object

Doh! Haha, can’t say I haven’t done similar things before. Thanks for digging into this for me.

It looks like “constructor” was a mispelling in any case - it was supposed to be “construction”. It was only on one post so I have removed it and sure enough the /tags page is working again.

Thanks for the speedy help, much appreciated 🙂

EDIT: now that I can access the tags again, I want to tidy them up and consolidate them. However, I’m reminded why I never do this. As soon as I edit the tags on a post, even one that’s several years old, it gets bumped back to the top of the list. If I batch edit lots of tags at once, which I want to do every few months, this completely disrupts all active discussions as they get buried under the re-tagged posts.

Is there any way that I, as site admin, can edit tags or otherwise edit a post affecting it’s place in the list?
