Discourse.Dialect is undefined error


(Christoph) #1

Could someone help me make sense of this error that I’m seeing in my logs?

Discourse.Dialect is undefined

(Sam Saffron) #2

Yeah it is ancient code we removed, upgrade all plugins, if it persists, remove one by one till it’s gone and report back with the culprit


(Christoph) #3

Is it possible that a plugin is causing this error even when it is disabled (i.e. it’s still in the app. yml but not activated in site settings)? If so, everything seems to point to the abbreviations and acronyms plugin:

The author has not been seen since months and is not responding to various bug reports. Maybe the plugin should be tagged as broken?


(Sam Saffron) #4

Yes absolutely will mark it now

Plugin needs to be removed and app rebuilt


(Christoph) #5

So is this true for plugins in general: they can cause errors even when deactivated?


(David Taylor) #6

Yes, it is up to plugins to respect the “disabled” setting in their own programming - their javascript and ruby code is still loaded regardless. Some somewhat relavent discussion:


(Christoph) #7

Okay, I read that as: it depends how the plugin is programmed, so that it is possible to program it so that it has no effect whatsoever when it is disabled. I think that is a valuable design specification for anyone sponsoring or buying a plugin: make it so that it can be fully disabled. (Can spare some headaches for many people.)


(cpradio) #8

I’m not 100% sure that is true. Because some items get loaded automagically and just referencing a library that no longer exists will cause it to break, and that is before your setting check can even be invoked.

There are “ways” around that though, but to say it can be 100% disabled and not cause an issue, I think is bordering on impracticality.


(David Taylor) #9

Yeah, ideally that would be the case. Sadly it’s not entirely realistic, especially for things like broken imports.

(e.g. when discourse/lib/ajax was moved last year)

Edit: @cpradio beat me to it


(Sam Saffron) #10

Yeah if we wanted easy peasy 100% robust disable

  1. Core would have to be able to issue a “restart” to all the services it is running
  2. Core would have to split up every plugin to have its own js file and have one js include per plugin (which may be desirable anyway cause it helps debugging a lot)

(1) is surprisingly difficult.


(Christoph) #11

To be fair, removing the acronyms and abbreviation did not stop those errors from occurring. So this plugin was either not causing any of them or it was not the only one doing so. Next try will be the affiliate plugin.


(Joe Buhlig) #12

I can confirm that the affiliate plugin causes this error when core is upgraded but not the plugin. I dealt with this exact error earlier today. Updating the affiliate plugin solved it.


(Christoph) #13

Hm, I did a complete rebuild so everything is up to date, but I’m still seeing this error

TypeError: Cannot read property 'addPreProcessor' of undefined

So if you’re saying that you are errorless with the plugin, I guess I’ll have to look elsewhere.

Edit: I just realized that this is a different error than the one I originally posted :roll_eyes: