Download & Extend

Hiding of description on node form doesn't always work (jQuery compatibility)

Project:Pathauto
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

lie should be line :)

#2

Under what scenarios doesn't it work?

#3

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

#4

And why not in 5?

#5

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

See attached image.

Shouldn't the pathauto text

AttachmentSizeStatusTest resultOperations
Picture 1.png19.34 KBIgnored: Check issue status.NoneNone

#7

See attached image.

AttachmentSizeStatusTest resultOperations
Picture 1.png19.34 KBIgnored: Check issue status.NoneNone

#8

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

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

#10

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

#11

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 :/

AttachmentSizeStatusTest resultOperations
320480_jquery_forward_compatible.patch1.35 KBIgnored: Check issue status.NoneNone

#12

Status:needs review» reviewed & tested by the community

That looks good actually.

#13

Looks good.

#14

Title:Hiding of description on node form doesn't always work» Hiding of description on node form doesn't always work (jQuery compatibility)
Status:reviewed & tested by the community» fixed

Alrighty - fixed http://drupal.org/cvs?commit=326968

Thanks guys!

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here