Data bindings make the text not visible

Wappler Version : 6.8.0
Operating System : Windows 11
Server Model: Node JS
Database Type: SQLite
Hosting Type: localhost

Expected behavior

I should be able to use the data binding to apply functions onto the inner text of a dynamic attribute.

Actual behavior

Whenever I try to apply functions onto data from the server connect in the dynamic attributes of a table, the text disappears in the browser

How to reproduce

  1. Create a page in the cwadmin folder
  2. Add a server connect
  3. Connect an API action that searches users / gets a list of users
  4. Add a paragraph to the page
  5. Add inner text to the paragraph
  6. Get the first name from the query from the server connect
  7. Apply a capitalize function or any other function to that inner text / name

Here's an example - the validated date has the applied function, but the rest of the data does not. Only the data with applied functions do not show. The validated date shows again when I remove the data binding

Check your browser console for errors. Also post the generated expression here.

I got this error in the console:

Method "capitalize" not found in expression: serverconnect1.data.query[0].first_name.capitalize()

Here's what the code looks like:

<!-- Wappler include head-page="layouts/admin" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="bug_report" appConnect="local" components="{dmxFormatter:{}}" -->
<meta name="ac:route" content="/cwadmin/bug_report">
<dmx-serverconnect id="serverconnect1" url="/api/admin/user/search"></dmx-serverconnect>
<p dmx-text="serverconnect1.data.query[0].first_name.capitalize()">Enter your content here</p>

Please check your main page, maybe the formatter js file is missing.

This means that the formatter js file is on my main page, right?

Thats correct, is the file uploaded to your server?

Does this mean the file is uploaded to my server?

I don’t know, if you’re working in that target and no 404 errors in the console, then yes.
What is the data type that you’re trying to format? Is it a string?

I tried formatting a string, but also a datetime, and neither work, with any functions at all

I'm not receiving any 404 errors in the console, and not sure what target I'm using

Please share a link to your page where i can check this.

Ok, I will let you know once I figure out how to host the site

What is your target, what server model is used, how do you preview your site? Are you using your own server or docker or a remote host?

the error can be triggered by two things:

  • the formatter js is missing from your server
  • the format you're applying is not available for the data type you're applying it on

Sever model I think is mentioned at the top of the post Node JS.
I'm using the Wappler local server, and for the target, here is my target page:

Still working on hosting my site :sweat_smile:

Interestingly, I got a popup before opening Wappler saying that Windows firewall was asking for to give Node JS permission. Maybe it has something to do with that

It's defintely not a problem with the data type, so I guess it would have to be that formatter js is missing from my server. How would I add it back in?

Not sure if this has to do with it either but I also noticed that this page and the pages in the same folder as this page are all receiving the "There are changes in the used components assets. Do you want to apply them?" popup

Also, strangely it says "DMXzone Server Connect" returns "DMXzone server connect"

Btw I figured out how to host on a remote server, I just need to figure out how to copy the database from the local to remote first before having something to show

If you're working locally you don't have a "server" but your server is the local site folder.

1 Like

You can share your local server with me using ngrok:

So i can take a look at the page with the issue.

1 Like