I'm using the Forward module in a site I'm building with Domain and the Admin Theme modules. When I submit the admin settings form the custom handler is failing and so the form is not saved.

The $form['forward_options']['forward_display_types'] element could be rewritten such that it doesn't require a handler.

For instance.

  $types = node_get_types();
  foreach ($types as $type => $info) {
    $form['forward_options']['forward_display_types']['forward_display_'. $type] = array(
      '#type' => 'checkbox',
      '#title' => t($info->name),
      '#default_value' => variable_get('forward_display_'. $type, TRUE),
      '#description' => t('Choose which content types to display the Forward link on.'),
    );
  }

Could replace lines 207-222 and lines 396+401-413 would be made completely unnecessary.

Removing the custom handler would be ideal, but if you still feel that there's value in it, you could add it as a custom field validation rather than as a submit handler thereby removing the rest of the forms dependence on it.

I have attached a patch with my suggested changes in case they're of interest to you.

CommentFileSizeAuthor
forward.module.patch1.91 KBrharris

Comments

rharris’s picture

I'd like to apologize for the duplicate issues. It seems my browser+drupal.org == session fail.

noahlively’s picture

rharris,

Thanks, this worked for me. I was having the exact same problem on one of my client's websites.

steveoliver’s picture

This worked great for me. Thanks, @rharris.

john.oltman’s picture

Version: 6.x-1.9 » 7.x-2.x-dev
Issue summary: View changes
john.oltman’s picture

Category: Bug report » Support request
Status: Active » Closed (won't fix)