2012-01-09 93 views
0

当加载this page,出现在Firebug的404错误神秘的404错误

NetworkError: 404 Not Found - http://summer-festivals.cloudfoundry.com/undefined 

我最好的猜测是,一些JavaScript VAR应该可以解决到的图像,.js或.css文件是不确定的,但我不知道如何去追踪负责的代码。

+0

'接受\t图片/ png,图片/ *; q = 0.8,*/*; q = 0.5' 是未成功加载的图片。 – 2012-01-09 22:25:48

+0

我无法看到网站上的任何图像丢失,有没有办法获得未能加载图像的名称? – 2012-01-09 22:27:33

+1

是的,但现在,我找不到解决方案。调查。 – 2012-01-09 22:28:58

回答

1

如果你有控制台打开,而你看到一个堆栈上的错误页面加载:

GET http://summer-festivals.cloudfoundry.com/undefined 404 (Not Found) 
    f.extend.cleanjquery-1.7.1.min.js:4 
    f.buildFragmentjquery-1.7.1.min.js:4 
    f.fn.extend.domManipjquery-1.7.1.min.js:4 
    f.fn.extend.appendjquery-1.7.1.min.js:3 
    $.fn.extend.infiniteCarouselbundle-true_defer.js:562 
    e.extend.eachjquery-1.7.1.min.js:2 
    e.fn.e.eachjquery-1.7.1.min.js:2 
    $.fn.extend.infiniteCarouselbundle-true_defer.js:428 
    _optionshttp://summer-festivals.cloudfoundry.com/:452 
    f.Callbacks.njquery-1.7.1.min.js:2 
    f.Callbacks.o.fireWithjquery-1.7.1.min.js:2 
    e.extend.readyjquery-1.7.1.min.js:2 
    c.addEventListener.Bjquery-1.7.1.min.js:2 
+0

所以这是导致问题的无限轮转? – 2012-01-09 22:38:12

1

我会先使用jQuery的非缩小版本。如果你在Chrome中加载页面并打开Developer Tools,你可以看到/ undefined资源是由jQuery加载的。如果使用非缩小版本,应该很容易在加载资源的jQuery文件中设置一个断点来查找错误。

0

我认为这个问题是这段代码bundle-trued_defer.js

// No tabs left to sho 
this.activeTab_ = undefined; 

当所有的图像加载,最后加载将是一个未定义的页面。

更改此

if (tab.tab == this.activeTab_) { 
    // Removing the current active tab 
    if (this.tabs_[index]) { 
     // Show the tab to the right 
     this.activeTab_ = this.tabs_[index].tab; 
    } else if (this.tabs_[index - 1]) { 
     // Show a tab to the left 
     this.activeTab_ = this.tabs_[index - 1].tab; 
    } else { 
     // No tabs left to sho 
     this.activeTab_ = undefined; 
    } 

    this.setTabActive_(this.activeTab_); 
    } 

if (tab.tab == this.activeTab_) { 
    // Removing the current active tab 
    if (this.tabs_[index]) { 
     // Show the tab to the right 
     this.activeTab_ = this.tabs_[index].tab; 
    } else if (this.tabs_[index - 1]) { 
     // Show a tab to the left 
     this.activeTab_ = this.tabs_[index - 1].tab; 
    } else { 
     // No tabs left to sho 
     this.activeTab_ = undefined; 
    } 

    if(this.activeTab_ !== undefined) { 
     this.setTabActive_(this.activeTab_); 
    } 
    } 

有了这个,如果工作验证。

+0

我测试了您的更改,但没有解决问题。您上面发布的代码是Google地图的一部分。当我在本地运行应用程序时,这个代码甚至没有被主页加载,但我仍然看到错误 – 2012-01-09 22:59:53