I seem to be getting the following error
Uncaught ReferenceError: Drupal is not defined
which relates to
if (Drupal.settings && Drupal.media_youtube) {
doesn't seem to stop it working though
I seem to be getting the following error
Uncaught ReferenceError: Drupal is not defined
which relates to
if (Drupal.settings && Drupal.media_youtube) {
doesn't seem to stop it working though
Comments
Comment #1
steinmb commentedHave you tested with the dev. release, and what do you do to trigger this error?
Comment #2
RobW commentedComment #3
RobW commentedAaaaand I can reproduce it now.
You'll find the error in the javascript console, for anyone interested.
Comment #4
RobW commentedOK, the answer:
Drupal.settingsis a javascript object used to pass settings from the backend to the frontend. It usually stores js settings that are specific to a single page or state.I was getting this error because I stripped out
mysite/misc/drupal.js(where I believe the original object is created) with some agressive "eff you I'll write everything on the frontend myself" template functions. WhenjQuery.extendtries to add the page specific properties to the object it throws an error because the object hasn't been defined.I'm guessing you've done something similar, and I'm 100% sure this isn't a M:YT issue, especially because M:YT no longer passes any variables to Drupal.settings. Thanks for opening though: I learned about a piece of Drupal frontend code that I don't want to strip out, which usually only happens with blood sacrifice during a full lunar eclipse.
Comment #5
ColemanTO commentedTry adjusting your performance settings - only Safari could handle the settings I chose.
Comment #6
omar alahmedit's regrading to the order of misc/drupal.js file. it should be included before the place that you use Drupal.settings or Drupal.behavior.
source: http://drupal.stackexchange.com/questions/56940/referenceerror-drupal-is...