I have a Drupal 7.0 installation where I'm trying to get wysiwyg + TinyMCE to work, and it just won't happen. "Inspect element" in Chrome reveals a javascript error in line 48 Uncaught TypeError: Object [object Object] has no method 'once'
Line 48 reads: $('.wysiwyg', context).once('wysiwyg', function() {

Note that this is happening in the default admin theme, Seven.

What's making me scratch my head on this is that the exact same setup works just fine on another site of mine. I've been disabling and re-enabling modules, and trying to figure out what's different between the two sites and anything else I can think of, but nothing helps.

I'm hoping someone can give me some insight into what is wrong, whether it's a bug or on my side (most likely), and some advice on how to proceed?


olrandir’s picture

Status: Active » Closed (works as designed)

Hah, just found out what it was (it's true what they say about describing the problem to others, how it helps you clear it up and solve it). Turns out one of my collaborators had added some scripts to the Seven theme, that's what was causing the mess.

pomgod’s picture

Care to elaborate a bit more on that? I got the same problem but not sure what is causing it...

arpeggio’s picture

Status: Closed (works as designed) » Active

Yes, can we ask what is this "some scripts" added to the Seven theme? Thanks.

TwoD’s picture

I think maybe @olrandir meant their own custom scripts (or another library) were added to the theme and they had some errors in them. Either syntax errors which stopped the browser from parsing other scripts, or perhaps they accidentally removed the calls to include the scripts normally added by Drupal. I've also heard of similar things happening when including jQuery twice, because the once-plugin registers itself with the wrong version of the main jQuery library, or something like that.

Anyway, first make sure jquery.once.js from the drupal/misc folder gets included at all.

TwoD’s picture

Status: Active » Closed (works as designed)

I'm closing this again since the original post was closed a long time ago, there's been no additional info for weeks since it was reopened and @olrandir hasn't been posting in any issues for over a year.