Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha Premium User
Ext 6.5.0 Uncaught Error: Duplicate name
Found bug in Ext.mixin.Container.attachNameRef
Here is such code:
Code:
if (!entry) { entry = component.shareableName ? [component] : component;
}
else if (!entry.isInstance) {
// Else an existing entry is either a component (which will have false
// for shareableName) or an array (all elements of which have true
// for their shareableName).
entry.push(component);
}
//<debug>
else {
Ext.raise('Duplicate name: "' + key + '" on ' +
me.id + ' between ' + entry.id + ' and ' + component.id);
}
//</debug>
And for me in several applications it Raises exception about Duplicate name, but entry and component is the same, so obviously it shouldn't cry.
To hide this exception for me worked to add:
Code:
if(entry !== component) {
Ext.raise('Duplicate name: "' + key + '" on ' +
me.id + ' between ' + entry.id + ' and ' + component.id);
}
-
Sencha - Sustaining Engineer
Can you provide a test case on how this is reproduced?
Tristan Lee
Sencha Inc - Sustaining Engineer
Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (
fiddle.sencha.com)
Embed your fiddle in your post:
[FIDDLE]id
[/FIDDLE]
-
Sencha Premium User
Unfortunately so far I can't reproduce it in fiddle, but maybe this will hint what can be wrong. I've reduced real code but tryed to keep everything that can cause the error. Stack trace is such:
log @ ext-modern-all-debug…=1514060762893:6367
raise @ ext-modern-all-debug…=1514060762893:2099
Ext.raise @ ext-modern-all-debug…=1514060762893:2130
attachNameRef @ ext-modern-all-debug…1514060762893:56609
_fixName @ ext-modern-all-debug…1514060762893:29526
fixReferences @ ext-modern-all-debug…1514060762893:18121
getReferences @ ext-modern-all-debug…1514060762893:56568
lookup @ ext-modern-all-debug…1514060762893:56574
lookup @ ext-modern-all-debug…1514060762893:62299
onChange @ TaskDialogController…dc=1514060762893:18
constructor @ TaskDialog.js?_dc=1514060762893:135
TaskDialog @ ext-modern-all-debug…=1514060762893:8888
widget
-
Sencha - Sustaining Engineer
Is it reproducible every time in your app, just not fiddle? If you could show the actual error message you are receiving it probably leads to the cause.
Tristan Lee
Sencha Inc - Sustaining Engineer
Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (
fiddle.sencha.com)
Embed your fiddle in your post:
[FIDDLE]id
[/FIDDLE]
-
Sencha Premium User
It's reproducible every time in real app (if remove my fix), stack trace is from real app, error is genereted by
Ext.raise('Duplicate name: "' + key + '" on ' +
me.id + ' between ' + entry.id + ' and ' + component.id);
component names doesn't matter, it's always first field in the fieldpanel. I've encountered this error already in the second different application, checked, it's reproducible in both desktop and mobile modes.
-
Sencha - Sustaining Engineer
I would continue to try to find a way to reproduce it in fiddle as the source code is there to raise the error if it occurs. Without a way to reproduce, it's hard to say if it's an app or framework issue.
Tristan Lee
Sencha Inc - Sustaining Engineer
Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (
fiddle.sencha.com)
Embed your fiddle in your post:
[FIDDLE]id
[/FIDDLE]
-
Sencha Premium User
-
Sencha Premium User
I am facing similar issue with ExtJs 6.7.0. The following is the closest I could get, but still not able to reproduce in Fiddle:
https://fiddle.sencha.com/#view/editor&fiddle/2rmh
Locally in my app, clicking the button 3rd time reproduces the error on every subsequent click of the button (and yes, its on the first field in the form panel as observed above). In my case, I was using the grid editing plugin that slides in the form from the right. I noticed in the cleanup method, the form fields are removed as:
form.removeAll(false);
Which means the fields are not destroyed themselves. Switching it to true made the error go away for me. However the Fiddle still works with removeAll(false).