Its impossible to save options of argument validations. This is a c&p error.

Comments

dawehner’s picture

StatusFileSize
new859 bytes

here is the patch

dagmar’s picture

Status: Needs review » Reviewed & tested by the community

Yes, make sense. Only for clarify the bug, here is the original code:

    // Let the plugins make submit modifications if necessary.
    $default_id = $form_state['values']['options']['default_argument_type'];
    $plugin = $this->get_plugin('argument default', $default_id);
    if ($plugin) {
      $options = &$form_state['values']['options']['argument_default'][$default_id];
      $plugin->options_submit($form['argument_default'][$default_id], $form_state, $options);
      // Copy the now submitted options to their final resting place so they get saved.
      $form_state['values']['options']['default_argument_options'] = $options;
    }

    $validate_id = $form_state['values']['options']['validate_type'];
    $plugin = $this->get_plugin('argument validator', $validate_id);
    if ($plugin) {
      $options = &$form_state['values']['options']['argument_default'][$validate_id];  /// <<< This line is wrong
      $plugin->options_submit($form['argument_validate'][$default_id], $form_state, $options);
      // Copy the now submitted options to their final resting place so they get saved.
      $form_state['values']['options']['validate_options'] = $options;

merlinofchaos’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 6.x-3.x!

dawehner’s picture

Status: Fixed » Patch (to be ported)

Update status

dawehner’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new859 bytes
dawehner’s picture

Status: Needs review » Fixed

tested without tested with and it worked fine.

Status: Fixed » Closed (fixed)

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