With jquery_update-7.x-2.x and admin-2.x-dev I have the following error on every pages:
in chrome:
Uncaught TypeError: Cannot call method 'html' of undefined
in firefox:
$("").attr("href", $(breadcrumb[key]).attr("href")).attr("class", $(breadcrumb[key]).attr("class")) is undefined
I think the issue comes from the jquery 1.6 change as described in the documentation (http://api.jquery.com/attr/)
As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set...
patch following
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | jquery17_undefined-1475074-7.patch | 1.01 KB | hswong3i |
| #1 | jquery17_undefined-1475074-1.patch | 934 bytes | idflood |
Comments
Comment #1
idflood commentedComment #2
fangel commentedI can confirm that this is an issue with 1.7, and that the attached patch appears to solve it.
Comment #3
mrsinguyen commentedTested, it's work well for me.
Comment #4
profelm commentedDoes this patch work for v 7.x-2.0-beta3? I found that this is also happening with that version of Admin.
Comment #5
mrsinguyen commentedThis broblem just work well in 7.x-2.x-dev version, it doesn't resolve in 7.x-2.0-beta3, error in line 125 at jquery.drilldown.js file.
Comment #6
idflood commentedThe patch is against the dev version, I don't see the point of making a patch against the 2.0-beta3 version since it's simply a snapshot of the dev version at a specific point in time. I think it should be possible to manually backport this:
http://drupalcode.org/project/admin.git/blob/f200c1413384570de8d015b0b21...
@mrsinguyen: The error at line 125 seems unrelated to what the patch in #1 fixes. If the error still appear with the 7.x-2.x-dev version can you create a new issue for this?
Comment #7
hswong3i commentedPatch via 7.x-2.x-dev; also refine comments.
Tested with drupal-7.14 + jquery_update-7.x-2.x-dev + jQuery 1.7 + admin-7.x-2.x-dev. Works fine without error message ;-)
Comment #8
fietserwinClosed #1579982: Can't edit availability and viewport not working as a duplicate of this one. So error still appears in the dev version and the patch does solve it.
Comment #9
franzConfirm that patch fixed and now it's working under jQuery 1.7
Comment #10
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!