Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
启用Firebug时出现jQuery错误_Jquery_Drupal_Firebug - Fatal编程技术网

启用Firebug时出现jQuery错误

启用Firebug时出现jQuery错误,jquery,drupal,firebug,Jquery,Drupal,Firebug,当我在没有运行Firebug的情况下加载页面时,我的所有JavaScript都会加载并执行良好。但是,如果启用Firebug 2.0.7,则所需的行为将失败,控制台中将显示以下内容: TypeError: jQuery.browser is undefined if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7) { 更新jQuery和/或Drupal是不可能的。当启用Firebu

当我在没有运行Firebug的情况下加载页面时,我的所有JavaScript都会加载并执行良好。但是,如果启用Firebug 2.0.7,则所需的行为将失败,控制台中将显示以下内容:

TypeError: jQuery.browser is undefined
    if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7) {

更新jQuery和/或Drupal是不可能的。当启用Firebug时,我能做些什么来防止此错误?

浮动块模块似乎有问题。我记得当从jquery中删除jquery.browser时,使用1.9以上的jquery时,管理菜单模块出现了这个错误。但看起来您使用的jQuery版本应该仍然支持它。您确定只加载了一个版本的jquery吗?谢谢!原来版本1.11.1也在运行。那么,2pha的评论解决了你的问题吗?如果是这样,2pha或者你应该把它作为答案发布并接受它。
/**
 * Attaches the floating_block behavior.
 */
Drupal.behaviors.blockFloat = function (context) {

  var settings = Drupal.settings.floating_block;

  // This breaks in anything less than IE 7. Prevent it from running.
  if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7) {
    return;
  }

  // If this behaviour is being called as part of processing an ajax callback.
  if (jQuery.isFunction(context.parent)) {
    context = context.parent();
  }
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */