I have been experiencing a problem with ExtJS:
this.indexOf is not a function
I found out that this is being caused by the below code in the ExtJS library:
remove : function(o){
var index = this.indexOf(o);
if(index != -1){
this.splice(index, 1);
}
return this;
}I read this http://mankzblog.wordpress.com/2009/05/23/trying-to-combine-ext-core-and... blog post and it suggests using using hasOwnProperty.
So i fiddles just a little bit and found this if statement on line 85 of jquery.drilldown.js:
if (breadcrumb[key]) {
and i changed it to this:
if (breadcrumb.hasOwnProperty(key)) {
which appears to have sorted out the issue.
I am not sure if this will help anyone, but it is a useful thing to know as it left me scratching my head for a little while.
I can create a patch for this if anyone else finds this useful.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | jquery.drilldown.js_.patch | 487 bytes | jurgenhaas |
Comments
Comment #1
jurgenhaasThis happened to me as well (see #1277678: JavaScript Error in aloha.js) and attached is a patch (against the D7 version of this module) and it would be great if that could be submitted by the maintainer.
Comment #2
paulgemini commented@Jurgenhaas: Your patch looks a bit off to me. I'm using the latest branch of Admin and here's what the code looks like, starting at line 78:
Comment #3
jurgenhaasMy appologies, I missed the latest changes in the dev release and my patch was indeed based on 7.x-2.0-beta3.
However, I downloaded the latest dev release just now and that looks like this:
So I guess the code in comment #2 is not committed yet, is it?
Comment #4
skwashd commentedComment #5
sickness29 commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
Everyone can apply the patch above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!