Hello,
First, love this module!! I recently updated to Webform 7.x-4.0-rc1. After the update, my Webforms that included value sets were broken with an error message: "Missing argument 4 for values_webform_webform_select_options()."

Upon investigating the Webform changelog, it looks like this issue causes the problem: https://drupal.org/node/2064851

It appears that a very small change is needed to values_webform.module

Changing from:

/**
 * Callback for the select options list
 * @param  string $value_set_name
 *         The name of the value set to load
 * @return array
 *         An array of optionn of options
 */
function values_webform_webform_select_options($component, $flat, $filter, $arguments) {
  return values_load_options($arguments['name']);
}

to:

/**
 * Callback for the select options list
 * @param  string $value_set_name
 *         The name of the value set to load
 * @return array
 *         An array of optionn of options
 */
function values_webform_webform_select_options($component, $flat, $arguments) {
  return values_load_options($arguments['name']);
}

seems to resolve the issue (remove $filter). I can submit a patch if that's preferred for testing.

Thanks!
Joy

CommentFileSizeAuthor
#5 webform4-2242571-5.patch1.59 KBevanbarter

Comments

drclaw’s picture

Hi,

I think for now a patch would be best. webform-7.x-4.x isn't the recommended release so I'm inclined to keep Values the way it is. With a patch, people using the 4.x version of webform can patch their file (either in a drush make file, or manually). When 4.x gets a full release, I'll apply the patch.

Thanks!
drclaw

drclaw’s picture

Status: Active » Postponed

Postponed pending a full release of webform-7.x-4.x

ilfelice’s picture

FWIW, I can confirm that the above change allows this module to work with Webform 4.

waluyo.umam’s picture

I am using webform 4.7. This patch works. The values can be loaded into the list.

evanbarter’s picture

StatusFileSize
new1.59 KB

Patch that maintains backwards compatibility.

  • drclaw committed 1f8393e on 7.x-1.x authored by evanbarter
    Issue #2242571 by evanbarter: Breaks with Webform 7.x-4.0-rc1
    
drclaw’s picture

Status: Postponed » Fixed

Fixed! Thanks everyone! I'll roll out a new release after reviewing #2530802: Support i18n_strings

Status: Fixed » Closed (fixed)

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