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

davyvdb’s picture

lie should be line :)

greggles’s picture

Under what scenarios doesn't it work?

greggles’s picture

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

davyvdb’s picture

And why not in 5?

greggles’s picture

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?

davyvdb’s picture

StatusFileSize
new19.34 KB

See attached image.

Shouldn't the pathauto text

davyvdb’s picture

StatusFileSize
new19.34 KB

See attached image.

greggles’s picture

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.

davyvdb’s picture

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

davyvdb’s picture

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

greggles’s picture

StatusFileSize
new1.35 KB

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

dave reid’s picture

Status: Needs review » Reviewed & tested by the community

That looks good actually.

davyvdb’s picture

Looks good.

greggles’s picture

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!

Status: Fixed » Closed (fixed)

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