I have problems with components form. I changed button caption from "Add" to "Add component", and now adding components doesn't work.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

taldy’s picture

This patch fix the issue for me

quicksketch’s picture

Status: Active » Needs review

Thanks for opening this report (and the patch!) It looks like there's quite a bit of cruft in these functions that need cleaning up. For example there's still code to "Publish" a node, which hasn't been needed since Webform 2.x. It's possible that this code was left there for code consistency between Webform 2.x and 3.x when the older version was still being maintained. Now however, we need to maintain consistency between 3.x and 4.x, so all this code needs updating.

Your patch makes a good start but needed to also separate out a #validate handler for the "Add" button. This patch adds that in, plus fixes several bugs with the validation, and adds PHPdoc to all the functions. Written against 4.x, it'll need backports to 3.x versions.

quicksketch’s picture

Ah, the patch for 4.x.

quicksketch’s picture

Status: Needs review » Fixed
FileSize
5.34 KB

The above patch seems to apply to 7.x-3.x without any conflicts. Committed that one to 7.x-3.x and 7.x-4.x. Attached patch applied to 6.x-3.x.

Status: Fixed » Closed (fixed)

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