Closed hookedonweb closed 11 years ago
It seems that this issue is the same that issue 41 I've opened. In fact, after removing some validated fields, I've no more problems, neither with checkboxes, neither with colors... perhaps some buggy code in a validation function breaks std process, I've not looked at code in fact, too tired and involved in my theme building.
i have tried to remove all validated field but it didn't help. At first sight it seems that there is a problem in defaults.php Function _set_default_options (line:155) checks if redux option array exists in wp DB, but doesn't check if there is option name in redux option array keys.
Does this merge fix this checkbox bug for you? If my checkbox (switch => true or false) has std => '1' (or 1), unchecking the checkbox doesn't get saved, it's always checked...
Sorry, i have hurried. The problem with checkbox is that if it is uncheked its value are not sent. So we need to check it:
if(isset($field['type']) && $field['type']=='checkbox'){
if(!isset($plugin_options[$field['id']]))
$plugin_options[$field['id']] = 0;
}
Add this code to defaults.php at function _validate_values after $field['section_id'] = $k; (line:498)
Awesome, I'll try that soon, thx a lot!
also we should check other checkbox fields type: _checkbox_hideall, _checkbox_hidebelow
I have found another problem with switch style checkbox.
Sometimes after press "Save changes" button, checkbox stop working. Javascript catches change and fire warning "Settings have changed", but checkbox state isn't changed. It's look like switch "label" loose relation checkbox input, either we use <label><input/></label>
or we use <input/><label for="input_id"></label>
it doesn't happen after option page reload, but after 3-5 times pressing "save button" there is this problem.
Solved. The problem with switch style exists only in opera, caused by display:none; for input. So we should hide checkbox not using display:none We could set its position to absolute and set opacity:0 or huge offset for browser with no opacity support (left:-9999px;)
This bug has been resolved.
has the fix been applied to a the existing download build?
How does one know if they are using the right build if the version number is not incremented? Pre-bug report version was 1.0.1 and post bug fix is version 1.0.1. Is there a patch file to download somewhere I am not seeing?
If you're using the development builds, the best practice is probably to use Redux as a submodule. Instructions for doing this are in the readme file. Beyond that, just keep an eye on the commit logs for changes that affect you!
I can not set the switch option to 'on' as a default. Even if you remove the extra white space as in the sample, the switch is always in the off position.