Hiding of description on node form doesn't always work

Davy Van Den Bremt - October 13, 2008 - 06:17
Project:Pathauto
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Description

Hi, I've found the hiding of the description on the node form via jquery not always working.

I found this lie of code in pathauto.js

$("//#edit-path ~ div[@class=description]").hide(0);

Changing it to

$("#edit-path ~ div[@class=description]").hide(0);

gives more consistent results.

#1

Davy Van Den Bremt - October 13, 2008 - 06:18

lie should be line :)

#2

greggles - December 14, 2008 - 01:18

Under what scenarios doesn't it work?

#3

greggles - December 14, 2008 - 01:35

Also, this is fixed in 6.x, fwiw.

#4

Davy Van Den Bremt - December 14, 2008 - 08:42

And why not in 5?

#5

greggles - December 14, 2008 - 15:47

I believe it was because it didn't work at all in 6.x where it works most of the time in 5.x.

Can you give an example where it won't work for 5.x?

#6

Davy Van Den Bremt - December 15, 2008 - 07:48

See attached image.

Shouldn't the pathauto text

AttachmentSize
Picture 1.png 19.34 KB

#7

Davy Van Den Bremt - December 15, 2008 - 07:48

See attached image.

AttachmentSize
Picture 1.png 19.34 KB

#8

greggles - December 15, 2008 - 16:25

I believe you that it's not happening. But I'd like to understand why before we change this. Nobody has reported this problem aside from you so I'm hesitant to change it (and perhaps break it). Is it because of a custom theme? A custom theme function that acts on the node form? Something else specific to your site? Or just a less common configuration like having several cck fields of a certain type.

#9

Davy Van Den Bremt - December 15, 2008 - 16:35

I'm using jquery update module. Maybe that's the culprit?

#10

Davy Van Den Bremt - December 15, 2008 - 16:37

I just checked on a few of my websites. And indeed jquery update seems to be causing this behavior.

#11

greggles - December 15, 2008 - 17:22

Great - good to know the real cause of this.

Here's a real patch. It seems to work fine on a stock version of jquery for 5.x so I feel like we should probably include this. I'd like to get another review but imagine that we won't :/

AttachmentSize
320480_jquery_forward_compatible.patch 1.35 KB

#12

Dave Reid - July 3, 2009 - 23:36
Status:needs review» reviewed & tested by the community

That looks good actually.

#13

Davy Van Den Bremt - August 24, 2009 - 05:59

Looks good.

 
 

Drupal is a registered trademark of Dries Buytaert.