Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: idflood commentedComment #2
fangel CreditAttribution: fangel commentedI can confirm that this is an issue with 1.7, and that the attached patch appears to solve it.
Comment #3
mrsinguyen CreditAttribution: mrsinguyen commentedTested, it's work well for me.
Comment #4
profelm CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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