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.
| Comment | File | Size | Author |
|---|---|---|---|
| forward.module.patch | 1.91 KB | rharris |
Comments
Comment #1
rharris commentedI'd like to apologize for the duplicate issues. It seems my browser+drupal.org == session fail.
Comment #2
noahlively commentedrharris,
Thanks, this worked for me. I was having the exact same problem on one of my client's websites.
Comment #3
steveoliver commentedThis worked great for me. Thanks, @rharris.
Comment #4
john.oltman commentedComment #5
john.oltman commented