The user amotl reports a blank page issue on https://community.hiveeyes.org/ after upgrading to 2.3.0.beta9, with a JavaScript error indicating I18n.translations[I18n.currentLocale()].js.composer is undefined. The locale is set to en_US, but only en exists in I18n.translations. gerhard suggests switching the default locale to en or ensuring theme components include the required translation keys. amotl identifies DiscoTOC as the culprit, a theme component not deactivated via app.yml. gerhard clarifies that theme components must be updated in safe mode. amotl confirms updating the theme component resolved the issue, and amotl thanks the community for the swift help, noting the site is now operational and ready to install the Knowledge Base plugin.
TypeError: I18n.translations[I18n.currentLocale(...)].js.composer is undefined
After checking things a bit, it turns out that
I18n.currentLocale()
"en_US"
but it looks like en_US is not defined when looking at I18n.translations
I18n.translations
{
en: Object { js: {…} }
}
Bummer!
Everything works fine when switching my personal account to plain “English” after navigating to https://community.hiveeyes.org/?safe_mode=no_custom, but we fear everyone will have “English (United States)” in her interface settings which was also the default setting for me. We also deactivated all plugins to make sure its not one of them who is the culprit.
Does someone have an idea what we have been running into here?
Easiest solution: Switch the default locale to English (en instead of en_US).
Or make sure that your plugins and theme (components) ensure that the js.composer key actually exist. We recently fixed a similar issue in DiscoTOC - automatic table of contents - #82.
That’s it! Of course it wasn’t in the list of plugins and updating the theme component as you suggested worked like a charm. Currently rebuilding with plugins activated.