Set Value Removing HTML from Value & Binding Issue [URGENT]

Wappler Version : 3.9.2
Operating System : Windows 10
Server Model: ASP .NET
Database Type: MSSQL

Expected behavior

Setting value in a set value step as below should save this value as is and also the server action should parse all the bindings.

<div style="border:1px solid #dddddd;border-radius: 10px;padding:8px; width:100%; text-align:center;">
        Selected Date Range: {{$_GET.filter_date_start.formatDate('dd-MM-yyyy')}} to {{$_GET.filter_date_end.formatDate('dd-MM-yyyy')}}
        <br>
        Count: {{rpt_tr_sp_class.count()}}
</div>

Actual behavior

Response is 500. Without any error description. Have debug in SA on and also custom errors mode set to off.
If I just disable the step or remove the formatDate formatter, it returns 200 correctly.

Also, as soon as I save and then click edit again, the DIV in HTML is gone and the value is formatter in a different way:

Setting value

On clicking save in picker, HTML gets rendered as usual

image

On clicking edit again, the surrounding DIV is gone and the string is changed to be treated as string concatenated inside binding.

How to reproduce

Just create a set value and set the HTML as shared above.
I was on 3.9.1 when I saw the formatter issue. So I updated to 3.9.2. But now, not only the formatter is not working, the HTML is getting removed from set value.

An update: Setting the same HTML directly in JSON works fine. So I am working in the code view until the issue is resolved.

@George Any update on this? Its becoming a bigger issue while creating HTMLs in SA for emails etc.

I see exactly the same result as you, using the code you gave as an example. I checked an HTML email I had created recently, to see if I would have similar problems if I edit it. A series of variables made up of dynamic data and HTML are included in the email. I edited the variables and made changes to the email code etc. and there were no problems.

I tried with your code again, but putting the dynamic data into variables. This seemed to work:

image

It might be worth trying this approach.

Thanks Tom. That does work.
So, if I just put {{$_GET.filter_date_start}}, in the HTML directly without any formatters, things work fine.

But, this is not workable for me since what I have shared is a very small part of the HTML, and creating numerous variables everywhere I need a formatter is not feasible.
Also, instead of the dynamic picker, I tend to use the edit option since it has a bigger area to work on the text. With the current state, the whole HTML gets converted a single line which is unreadable and uneditable.

It’s certainly a problem which needs fixing. In my case, it seemed more convenient to create variables to include in the email code. They involve quite lengthy expressions - but there are only 6 of them.

There are quite a few cases where the space for editing is very limited, making it difficult to work with. It’s one of the main flaws in the Wappler UI. I often use a separate text editor in these cases.

1 Like

Fixed in Wappler 3.9.3

This topic was automatically closed after 30 hours. New replies are no longer allowed.