redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Border issue - data not saved

Open FrankyG opened this issue 12 years ago • 11 comments

I have several Border options in different sections. The configurations are like this:

    array(
        "title"     => "Title",
        "desc"      => "Descr.",
        "id"            => "opt_border1",
        "default"       => array(
                                    'border-bottom' => '0',
                                    'border-top'        => '0',
                                    'border-left'       => '0',
                                    'border-right'      => '0',
                                    'border-style'      => 'solid',
                                    'border-color'      => '#cccccc'
                                ),
        "type"      => "border",
        "all"           => false,
        ),

When I change the values and save it in one of the sections these values keep stored. But when I go to another section and change the values there, the values of the first border are lost - some of them.

FrankyG avatar Jan 24 '14 11:01 FrankyG

Are you sure that all your ID's are unique?

dovy avatar Jan 24 '14 14:01 dovy

Yes, I checked it twice.

FrankyG avatar Jan 24 '14 14:01 FrankyG

Oh, wait a moment. A few of them just configure Top or Bottom border. Do I have to use

... "border-left" => false, "border-right" => false,

or

"left" => false, "right" => false,

I used the latter. Could this be the problem?

FrankyG avatar Jan 24 '14 14:01 FrankyG

I just found out, that this is a problem with the 0. Only the top or bottom border fields () where I entered a 0 do not keep it. If I enter a 1 or 2 it seems to be okay.

FrankyG avatar Jan 24 '14 15:01 FrankyG

I am confused. Can you send me your config file and tell me exact steps to duplicate? Thanks.

dovy avatar Jan 24 '14 15:01 dovy

Thanks for the code. I've resolved that issue for you. It's been pushed to the repo. Good eye!

dovy avatar Jan 25 '14 00:01 dovy

Thank you very much for the quick fix, @dovy. I just tested it and it works fine.

FrankyG avatar Jan 27 '14 12:01 FrankyG

Awesome.

dovy avatar Jan 27 '14 14:01 dovy

Sorry, but I have a similar issue with border field. Values are not being saved. When I click reset, I get the defaults, but when I fill the fields and save...zero.

I've used the redux builder last month. Should I update the base code?

My code for this:

array( 'id' => 'mab-border', 'type' => 'border', 'title' => __('Border Option', 'redux-framework-demo'), 'subtitle' => __('Define your border style. Default is border-bottom: 3px.', 'redux-framework-demo'), 'output' => array('body .masterbar'), // An array of CSS selectors to apply this font style to // 'desc' => __('Default: border-bottom:3px and the other borders set to 0.', 'redux-framework-demo'), 'validate' => 'color', 'color' => true, 'style' => true, 'all' => false, 'top' => true, 'right' => true, 'bottom' => true, 'left' => true, 'default' => array( 'border-color' => '#1e73be', 'border-style' => 'solid', 'border-top' => '0', 'border-right' => '0', 'border-bottom' => '3px', 'border-left' => '0' ) ),

luisrock avatar Jul 15 '14 19:07 luisrock

Yes, do an update and let's see if the problem persists. Please open a new ticket and don't piggyback. That way you don't get lost.

dovy avatar Jul 15 '14 21:07 dovy

Ok. Thanks for your time.

luisrock avatar Jul 16 '14 00:07 luisrock