Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/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
意外的ExtJS错误消息:Ext.ComponentManager.register():注册重复的组件id;火花线工具提示“;_Extjs - Fatal编程技术网

意外的ExtJS错误消息:Ext.ComponentManager.register():注册重复的组件id;火花线工具提示“;

意外的ExtJS错误消息:Ext.ComponentManager.register():注册重复的组件id;火花线工具提示“;,extjs,Extjs,在加载应用程序期间,有时会发生以下错误。当我重新打开浏览器或更改应用程序中的某些内容时,它往往会消失 错误: [E] Ext.ComponentManager.register(): Registering duplicate component id "sparklines-tooltip" [...] Error.js?_dc=1421687747906:103 Uncaught Error: Registering duplicate component id "sparklines-to

在加载应用程序期间,有时会发生以下错误。当我重新打开浏览器或更改应用程序中的某些内容时,它往往会消失

错误:

[E] Ext.ComponentManager.register(): Registering duplicate component id "sparklines-tooltip"
[...]
Error.js?_dc=1421687747906:103 Uncaught Error: Registering duplicate component id "sparklines-tooltip"
Chrome控制台屏幕截图:

我没有更改ExtJS源代码。我正在与Sencha ExtJS 5、Sencha Cmd和Visual Studio 2013合作

当我搜索整个解决方案时,它会发现:

ext\src\sparkline\Base.js(500):            id: 'sparklines-tooltip',
这是我的Application.js

Application.js

/**
 * The main application class. An instance of this class is created by app.js when it calls
 * Ext.application(). This is the ideal place to handle application launch and initialization
 * details.
 */
Ext.define('ExtTest.Application', {
    extend: 'Ext.app.Application',
    requires: ['*'],
    name: 'ExtTest',

    models: [
        'vPrd'
    ],

    stores: [
    ],

    launch: function () {
        Ext.create('Ext.container.Viewport', {
            layout: 'border',
            autoShow: 'true',
            items: [{
                region: 'center',
                xtype: 'app-main'
            }]
        });
    }
});
导致错误的文件名为Api.js,它定义了“Ext.ux.google.Api”

更新: 根据这里发布的答案,我正在检查我的组件的重复ID。没有

找到解决方法: 在Application.js中,我有一行:

requires: ['*']
它使Sencha Cmd包含ExtJS的所有包(也是我没有使用的“Ext.ux.google.Api”)。当我删除它时,它会工作,app.js也会变小。
无论如何,这不是一个真正的解决办法。应该可以无错误地包含所有内容。

组件管理器不允许重复ID,如错误读取。在某些事件下,可能会动态生成id为“sparklines tooltip”的组件,这就是问题只是偶尔出现的原因。我建议您仔细查看代码并找到该id,然后在动态创建时添加一些内容,如变量计数器或其他内容。

我收到了类似的错误消息。我正在为一些面板定义id。我正在动态创建一个视口,同时,autoCreateViewport被设置为true。这导致了上述错误。通过将autoCreateViewport更改为false,错误消失了


解决方案是,首先对重复的id执行文本搜索。如果没有,则检查动态创建的面板id。

它实际上位于ExtJS的源代码中。我想知道google.load.Ext.appyIf.callback在控制台中是什么意思(在第二个错误之前),当它的核心看到两个ID时,它会在ExtJS核心中得到通知,而不会显示出现问题的实际文件位置。这里有一个例子:google.load我不确定你的Api.js是你创建的文件还是extjs默认文件,因为没有给出更多的代码。看起来你已经使用了Ext.define并在配置中提供了一个id,然后在不覆盖id的情况下重新使用了组件。检查你的define是否有特定的id。正如@Geohut所说的。这是一个重复的id导致您的问题。我没有找到任何重复的id。还有其他建议吗?我对你的答案投了赞成票,因为它很有帮助(但没有提供解决方案)。这个问题还没有答案。