The fieldset for selecting input format for the markup component value textarea is collapsed and options within cannot be selected. It appears that the collapsing javascript doesn't work properly, since also the field details fieldset (which however is not collapsed) doesn't collapse on click. Tested on Garland theme, IE 7 and FF 2.x, Drupal 5.6

Comments

pulpzebra’s picture

it looks like there's a js error that doesn't allow clicking on the fielldset label to trigger the collapsed status. It works on drupal 5.2... change of jquery library since then?

quicksketch’s picture

Title: markup component: input format fieldset not visible after 5.6 upgrade » Pathauto breaks javascript in webform
Project: Webform » Pathauto
Version: 5.x-1.7 » 5.x-2.x-dev
Priority: Critical » Normal
Status: Active » Needs review
StatusFileSize
new839 bytes

It's actually a problem caused by Pathauto I believe. pathauto.js assumes that the form elements it affects are always on the node edit form (which is not the case with webform).

To reproduce:
- Install and enable webform 1.x and pathauto 2.x
- Create a new webform
- Add a textarea component

A javascript error will be thrown "elem has no properties".

$("#edit-pathauto-perform-alias").attr("checked") is the culprit. Let's just add a check to keep pathauto from trying to check properties on the non-existent element.

pulpzebra’s picture

ok! this patch do solves the problem. (thanx a lot!)

greggles’s picture

StatusFileSize
new1.86 KB

Here's a slightly different take. I've used Quicksketch's javascript patch (thanks for that!) and then also made sure that there is a path field for us to modify before altering the form and adding the js. Look good?

Thanks!

greggles’s picture

Title: Pathauto breaks javascript in webform » only add javascript and only take actions if there is a path box to modifiy (prevents conflicts with webform)
Status: Needs review » Fixed

Ok, applied to both DRUPAL-5--2 and HEAD (6.x).

Thanks for the notification and javascript fix, quicksketch.

greggles’s picture

Title: only add javascript and only take actions if there is a path box to modifiy (prevents conflicts with webform) » only add javascript and only take actions if there is a path box to modifiy (conflict with webform and better performance)

better performance because Pathauto will no longer try to create an alias if there is no pattern set for this type nor a default. Sweetness.

(see http://drupal.org/node/209165#comment-705629 for more details on that performance bit)

quicksketch’s picture

Thanks greggles!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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