Beta 6 - Client Side manipulation stings not working

Wappler Version : Beta 7
Operating System : windows
Server Model: All

When I wanted to manipulate strings from databases, I realized that on the client side, it is totally broken.

Truncate / concatenate and other string manipulation functions do not work.

I tried using the local server directly, NodeJs and a cookie.

Same.

I'm a bit lost... I have the impression that the beta version is totally broken.

As Theodor suggested in my previous post, restarting Wappler is the best thing to do.

Yes, indeed. For some basic operations... But during development, the problem resurfaces and I haven't really analyzed why.

I'm doing simple operations at the moment. And restarting every 10 minutes is out of the question.

Do you see any errors in the browser console?
And are you sure you test this in a browser as well, not only in design view?

1 Like

Everything is ok, Theodor

I restarted the computer. And after the third restart of Wappler, I have a positive result.

Back to my main video management project, it doesn't work.

A rather bizarre error.

Please open the page in your web browser.
Open the dev tools and check the browser console for errors and/or missing files.

So...

I removed the function

All is ok. But I just want to shorten my text. :upside_down_face:

Is the formatter js file included in the head tags of your main page?

Yes, it is

Can you please paste the exact expression where the truncate formatter is used?

I increased the number of characters to display so much.

<p class="card-text small" dmx-text="description.trunc(150, 'true', '...')">

With the experience of other bugs, I just tried something.

I moved the dmx-formatter line as follows:

So is it now working?

It works on this project.

I just tried with another one. It shows me an empty string.

I think my problems come from the automatic insertion order of the Wappler code.

The order of the formatter include shouldn't matter.
I just tested this locally and it works fine without any errors no matter where the formatter js is located. Unfortunately i can't recreate this issue, maybe if you can provide a link to your page it will be easier to debug.

1 Like

So the bug is not in the functions. But the order in which Wappler generates the code. With NodeJS, indeed, the order does not matter. A clean restart is enough.

With my projects in PHP/MySQL + includes + routing it's something else.

I code locally for now on a MAMP server.

I restarted several projects several times and with several methods, the results are the same. The environment is more stable with NodeJS.

Unfortunately, I do not want to expose my projects with Javascript derivatives.

Thank you for your attention.

Well on your screenshots you post nodejs pages, now you mention php.
I tested both - both work no matter the order of the includes.

If you can upload the page with the problem(s) to some publicly accessible server we can check what is wrong.

My main project is in PHP. When it didn't work, I tried with NodeJS. Look at the beginning.

After restarting several times, the NodeJS project worked.
So, I tried the PHP project right away. And it still didn't work. (Sorry for not mentioning)
And what went wrong this time was the order of dmx-formatter.js ... I think it has to be before all the other functions for PHP projects, especially routing.

I remember this for debugging (before posting):

  • restart wappler
  • update the project
  • try to change the order of insertion of dmx classes

I will prepare a public server for you. But I have already identified some publishing problems... I will first compare if I find the same problems by publishing in ftp before submitting them to you.