Discourse.Dialect is undefined error

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

Discourse.Dialect is undefined

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

3 Likes

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?

2 Likes

Yes absolutely will mark it now

Plugin needs to be removed and app rebuilt

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

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:

3 Likes

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.)

1 Like

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.

3 Likes

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

2 Likes

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.

5 Likes

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.

1 Like

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.

1 Like

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:

2 Likes

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