SOLVED: Incorrect attributes rendered on the builder

Browser: Any
OS: Any
Video: Screen record

I found a weird bug that happens on the builder only. I have a control like this:

$this->controls['normalSubAlign_Horizontal'] = [
    'group' => 'content__submenu',
    'label' => esc_html__('Horizontal Align', 'cement-menu'),
    'options' => [
        'a' =>  __('Left', 'elemental-menu'),
        'b' =>  __('Center', 'elemental-menu'),
        'c' =>  __('Right', 'elemental-menu'),
    ],
    'default' => 'b',
    'type' => 'select',
    'inline' => true,
    'small' => true
];

And the control value is rendered like this:

<?php
// Skip some code
$item_classes[] = 'cmm25' . $this->settings['normalSubAlign_Horizontal'];
$this->set_attribute('_root', 'class', $item_classes);
?>
<li <?= $this->render_attributes('_root'); ?>>

Everytime I change the select value, Bricks appends the attribute instead of replacing the attribute. Please see the screen record video to understand that behavior.

Hi Minh,
Thanks so much for your report!

I added the issue to our bug tracker.

Best regards,
timmse

1 Like

Hi guys,

Just to let you know, this issue was already fixed in 1.10.1, but since then we already released a newer version, Bricks 1.10.2, now available as a one-click update in your WordPress Dashboard.

Please let us know if you are still experiencing issues.

You can see the full changelog here: Bricks 1.10.2 Changelog – Bricks

Best regards,
M

1 Like

I forgot.

Yeah, it fixed.

Thanks the team for the hard work!