In the function og_preprocess_page() some JavaScript is appended to the $scripts variable that calls jQuery.extend. This is included on pages where jquery.js isn't being included.

On top of that, the way the script is appended to the $scripts variable isn't compatible with the jQuery Update module. The corresponding issue in jQuery Update is #302078: warning message.

I was going to roll a patch but was wondering if there was a reason drupal_add_js as a setting wasn't used to add the setting. Something like

  drupal_add_js($data, 'setting');
  $variables['scripts'] = drupal_get_js();

This would be compatible with the jQuery Update module and make sure jquery.js was included to use jQuery.extend.

Comments

moshe weitzman’s picture

Status: Active » Fixed

Thats much cleaner. It did not occur to me to use drupal_add_js() after $vars['scripts'] had been built. Committed.

mfer’s picture

Thanks for your prompt change. That's fast turn around.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.