arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.7k stars 4.72k forks source link

14.1.0 scripting: buttons bu(...) defined in >W appears corrupted on the web-page #21562

Closed nikvostro closed 4 weeks ago

nikvostro commented 4 weeks ago

PROBLEM DESCRIPTION

Buttons defined in the >W section for script now appears in corrupted way.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

TO REPRODUCE

Define button bu(....) in >W section

My >W section for ESP32-S2 device:

>W
srecLast=%srecLast%
rcgNoLast=%0rcgNoLast%
Response=%verbResp%
nm(0 79 1 inpRcgNo "Record # (0-79)" 200 0)
bu(btnRecord "Train record")
bu(btnInitVR "Init VR")
bu(btnClrRcg "Clear VR")
<a href="http://192.168.xx.zzz/ufse?file=/autoexec.be" target="_blank">autoexec.be</a>
<a href="http://192.168.xx.zzz/s10?" target="_blank">Script</a>

<button onclick="document.location='http://192.168.xx.yyy/cm?cmnd=brrestart'" formtarget="_blank">Restart Berry VM</button>

and for ESP32-C3 device:

>W
@<font size="5">Temp. set: %0tempinp%</font> (temp=%temp%, 0-off)
@sl(18 30 tempinp "18" "24" "30")
@<font size="5">Fan speed: %0faninp%</font>
@sl(0 4 faninp "0-Auto" "2-Mid" "4-Max")
;nm(18 30 1 tempinp "Temperature (18..30)")
;nm(0 4 1 faninp "Fan (0-auto, 4-max)")
bu(acsetcoolbtn "AC cool")bu(acsetheatbtn "AC heat")bu(acsetfanbtn "AC fan")
bu(acoffbtn "AC off")
Uptime: %0uptimeD%d %2.0uptimeH%:%2.0uptimeM%

EXPECTED BEHAVIOUR

Buttons to appear normally

SCREENSHOTS

Bad appearance: 2024-06-04 12_08_10-Window 2024-06-04 12_08_54-Window 2024-06-04 12_08_26-Window

The buttons view that was on 13.4.0 and all lower versions: 2024-06-04 12_08_03-Window

ADDITIONAL CONTEXT

I've did upgrade from v13 to 14 on my 2 devices S2 and C3 and faced with the sinilar bugs on both.

gemu2015 commented 4 weeks ago

very strange that that ever has worked with that syntax. you must provide 2 string arguments with button elements. (on state text, off state text, see docs).

nikvostro commented 4 weeks ago

Hmmmm... you're definetely right! and now it works... Thank you!