[BUG] Custom sidebar elements > Edit element

**CMK version: ** 2.3.0p6
OS version: Ubuntu 20.04 LTS

Error message: No Message but odd behaviour of UI

I recently stumbled upon a bug in the editor for cutstom sidebar elements. The selection boxes for e.g. host name (regex) or service (regex) are not acting as expected.

Reproduction:

Goto Customize > Custom sidebar elements
Click on “Add element”
Add a new row
Select filter “Host name (regex)” and click “Add filter”
Enter expression “abc” into the filter and commit via enter

Click “Add new row” to add a second row
Select filter “Host name (regex)” and click “Add filter”

The select box of the first row changes and is now uneditable. It just opens, showing the previously selected regex “abc”

But that’s not all:

Enter a regex “def” for the filter of the second row and commit using enter
Fill in the required fields for allow saving (Titles for snapin and both rows)
Hit “Save & view list”
Now click on the pencil next to the new snapin to edit it

Look at the content of the two regex-fields.
Both now show “def”

I hope you can reproduce this behaviour and fix that bug so snapins for the sidebar will be editable again.

Thanks in advance


I have now edited my sidebar elements using my favorite cli editor on the checkmk-server to edit ~/var/check_mk/web/<user>/user_custom_snapins.mk

1 Like

This bug exists since the sidebar elements can be created :wink:
In the editor every filter can only exists a single time over the whole sidebar element.
It is very annoying.

1 Like

So this might be something for @thohenstatt to finally fix. :kissing_heart:

If i had to guess i would say that all the HTML-Elements get the same ID and are therefore treated as one or the last one wins.

1 Like

Thanks for tagging me @klaus.scholl :slight_smile: That is indeed something in dire need of improvement! Can’t make any promises right now (knee-deep in notifications), but I will try my best and will update this post when I know more!

2 Likes