Skip to content
This repository has been archived by the owner on Aug 1, 2018. It is now read-only.

Uncaught ReferenceError: JST is not defined #73

Open
adiakritos opened this issue Nov 6, 2017 · 0 comments
Open

Uncaught ReferenceError: JST is not defined #73

adiakritos opened this issue Nov 6, 2017 · 0 comments

Comments

@adiakritos
Copy link

Using Rails 3.2.22

Here's the console stack trace:

Uncaught ReferenceError: JST is not defined
at Editor._addToolbar (http://intranet.lvh.me:3000/assets/active_admin/editor/editor.js?body=1:29:20)
at new Editor (http://intranet.lvh.me:3000/assets/active_admin/editor/editor.js?body=1:13:10)
at HTMLLIElement.<anonymous> (http://intranet.lvh.me:3000/assets/jquery-ui.js?body=1:508:30)
at Function.each (http://intranet.lvh.me:3000/assets/jquery.js?body=1:658:23)
at init.each (http://intranet.lvh.me:3000/assets/jquery.js?body=1:267:17)
at init.$.fn.(anonymous function) [as editor] (http://intranet.lvh.me:3000/assets/jquery-ui.js?body=1:503:9)
at HTMLDocument.<anonymous> (http://intranet.lvh.me:3000/assets/active_admin/editor.js?body=1:6:36)
at fire (http://intranet.lvh.me:3000/assets/jquery.js?body=1:3065:30)
at Object.fireWith [as resolveWith] (http://intranet.lvh.me:3000/assets/jquery.js?body=1:3177:7)
at Function.ready (http://intranet.lvh.me:3000/assets/jquery.js?body=1:434:13)

Within editor.js it's referring to this method where JST is being referenced:

/**
  * Adds the wysihtml5 toolbar. If uploads are enabled, also adds the
  * necessary file inputs for uploading.
  */
 Editor.prototype._addToolbar = function() {
   var template = JST['active_admin/editor/templates/toolbar']({
     id: this.$el.attr('id') + '-toolbar'
   })

   this.$toolbar = $(template)

   if (config.uploads_enabled) {
     var _this = this
     this.$toolbar.find('input.uploadable').each(function() {
       _this._addUploader(this)
     })
   }

   this.$el.find('.wrap').prepend(this.$toolbar)
 }

I haven't done anything with the initialization file yet - I don't want to upload images. Do I still need to fill this out?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant