Plugin development: missing settings in app.SiteSettings

I found two settings which, although available in the Settings admin panel and in site_settings.yml, seem to be missing in app.SiteSettings:

export default {
  name: 'my-plugin',
  initialize(container, app) {
    console.log(app.SiteSettings.tagging_enabled) // => true
    console.log(app.SiteSettings.max_tag_length) // => 20
    console.log(app.SiteSettings.allow_duplicate_topic_titles) // => undefined
    console.log(app.SiteSettings.min_trust_to_create_tag) // => undefined
  }
}

Only site settings with client:true are available in the JavaScript application, so that’s why the two settings are missing in your example.

8 Likes