I'm probably missing something obvious, but I've got a plugin/widget that has a back-office parameter that is a checkbox.
Once the plugin is installed, I add the widget to my skin and check the checkbox. Immediately, I go back to edit the widget, and the checkbox is no longer checked!
Code excerpts from the plugin:
var $social_supported = array (
'Stumble Upon',
// 'Digg',
// 'Del.icio.us'
);
.
:
function get_widget_param_definitions( $params )
{
$r = array();
foreach ( $this->social_supported as $social_name )
{
$r[ $social_name ] = array(
'label' => $social_name,
'note' => '',
'type' => 'checkbox',
'defaultvalue' => false,
);
}
return $r;
}
The plugin's only other functions are PluginInit and SkinTag.
I've removed the widget, uninstalled the plugin, cleared my browser's cache, and reinstalled the plugin and widget. While uninstalled, I did check the database and make sure the plugin was gone.
Any ideas?
- Cindy Rae
Thanks for reporting what you found!
Aha!
In the code in the original post, notice the
which resolves to
The problem is the space in the first 'Stumble Upon'. b2e uses that string in the "label for" and "input" tags:
This causes problems when you try to update the widget's parameters.
Hope this helps someone else!
- Cindy Rae