if i open the URL node/61/edit (this is the edit url for my project - "project/myproject/edit") i get the following JS error. All collapsible form items on this page get "disabled" and are no more collapsible :-(.

Firebug error:

$(this).ancestors is not a function
http://localhost/drupal5/sites/all/modules/project/project.js
Line 25
CommentFileSizeAuthor
#1 project.js_.patch985 byteshass

Comments

hass’s picture

Status: Active » Needs review
StatusFileSize
new985 bytes

Here is a working patch for fixing this parents bug

dww’s picture

Priority: Critical » Normal
Status: Needs review » Postponed (maintainer needs more info)

project.js works just fine on FF 1.5 and Safari 2.0.4 for me. What platform is causing your problem? project.js has been like this for months and months on d.o, and no one has ever complained, so this hardly seems critical.

Without any way to reproduce the bug, I can't verify the patch and commit it.

hass’s picture

Windows XP SP2 with Firefox 2.0.4... !??? If you search for "ancestors" in the jquery api i cannot find anything telling about this... yesterday i learned "parents" is save for jquery 1.2, too. The error prevents the removal of the selectbox right to "modules" and "themes" radio selectbox. I will provide a screenshot later to make sure we are talking about the same, with an repro example.

I wonder why you are not able to repro this...

dww’s picture

Are you using a patched (newer) version of jQuery than the one in D5 core?

hass’s picture

Status: Postponed (maintainer needs more info) » Active

As told in http://www.learningjquery.com/2006/12/how-to-get-anything-you-want-part-2 .ancestors() is no more supported in jquery 1.1 or higher and we need to change to .parents(). Additional .parents() is supported since 1.0 alpha.

I wonder why my box claims about missing function on D5 and i cannot remember that i have touched jquery in any way... need to check my box if i altered jquery :-(.

However the patch is valid and will fix future problems in D6 and for some people who used this jquery update module... as a side note.

hass’s picture

Status: Active » Needs review

Yup, my local jquery has been updated and i forgotten this... sorry for making this critical.

However the above is valid and the patch should be applied.

dww’s picture

Title: $(this).ancestors is not a function » ancestors() is deprecated in jQuery 1.1.*, and parents() works everywhere.
Category: bug » task
Status: Needs review » Fixed

Tested and committed to HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)