Page 1 of 1

Stockholm to classic dark themes error

Posted: Thu Mar 23, 2023 2:28 pm
by miro

The default theme is Stockholm. When I change from Stockholm to classic dark, the bryntum theme is changed, but I got the attached error.


Re: Stockholm to classic dark themes error

Posted: Thu Mar 23, 2023 2:57 pm
by mats

Can you reproduce this in our online samples? What version are you using?


Re: Stockholm to classic dark themes error

Posted: Thu Mar 23, 2023 4:29 pm
by Animal

Your app is using the theme property of the theme change event as an id to look up a widget in your app. Check that.


Re: Stockholm to classic dark themes error

Posted: Thu Mar 23, 2023 4:35 pm
by Animal

Something like this:

Screenshot 2023-03-23 at 15.33.56.png
Screenshot 2023-03-23 at 15.33.56.png (484.51 KiB) Viewed 517 times

Re: Stockholm to classic dark themes error

Posted: Fri Mar 24, 2023 6:29 am
by miro

We did the proposed solution and we are getting the attached error above.


Re: Stockholm to classic dark themes error

Posted: Fri Mar 24, 2023 6:32 am
by tasnim

Can you please upload a test case here so we can reproduce and debug the issue?


Re: Stockholm to classic dark themes error

Posted: Mon Mar 27, 2023 6:56 am
by miro

Hi,

I just made small demo to reproduce the issue. please check attachment file.

Steps: Change theme from stockholm to any other theme will get the issue like picture error.png

error.PNG
error.PNG (81.03 KiB) Viewed 472 times

Note: Because our script not put in head tag. To make set theme work I had a bit change on setTheme method of DomHelper.js as picture DomHelper.png

DomHelper.PNG
DomHelper.PNG (62.24 KiB) Viewed 472 times

Example:

DemoBryntum.zip
(22.69 MiB) Downloaded 19 times

Please help me how to fix this bug and clear some warning '$name static property or getter required for class Task to provide class name for minified sources.'


Re: Stockholm to classic dark themes error

Posted: Mon Mar 27, 2023 8:27 pm
by mats

Try to set a breakpoint and see what the error is, it looks like an issue in your code. You can ignore the warning, we will mute it in a future release.


Re: Stockholm to classic dark themes error

Posted: Wed Mar 29, 2023 7:14 am
by miro

Hi Mats,

I already sent an example code. in the first post, I also attach image for error.

Error because

WidgetHelper.getById(themeChangeEvent.theme) =  undefined
error_theme2.PNG
error_theme2.PNG (29.08 KiB) Viewed 443 times

Re: Stockholm to classic dark themes error

Posted: Thu Mar 30, 2023 8:54 am
by Animal

Check what is in your tbar at that point. There should be a button group with the theme buttons, and they should have the ids you assigned.

Screenshot 2023-03-30 at 08.52.08.png
Screenshot 2023-03-30 at 08.52.08.png (59.09 KiB) Viewed 429 times
Screenshot 2023-03-30 at 08.54.17.png
Screenshot 2023-03-30 at 08.54.17.png (251.64 KiB) Viewed 429 times