Function capitalize on Server Side binding parsing bugged?

Wappler Version : 3.7.2
Server Model: Nodejs

<%=_('resource.capitalize()',locals)%>

Returns:

image

And just because I’m a psycho and I wanted to test the rest of string formatters…

<%=_('resource.lowercase().uppercase().camelize().dasherize().humanize().slugify().underscore().titlecase().camelcase().replace(0, 1).trim().split(0).pad(4, 0, \'left\').repeat(4.substr(0, 3.substr(0, 2.stripTags()))).urlencode().wordCount().length()',locals)%>

Returns:

image

As expected :joy:

So only capitalize() is bugged when using it against a server-side binding.

I am experiencing a similar issue with Titlecase formatters on SC and AC.
Using this in SC db insert and db update actions and also on AC data bindings and doesn’t work in all cases.

Sorry @JonL, but your test seems not to be completely waterproof:

This is exclusively for Server Side binding on nodejs.

<%=_('$_ENV.BASE_URL.titlecase()',locals)%>

image

I believe your issue is not related with this one. Better to open a separate topic with your findings.

Okay, thought it was a similar issue, because I am on NodeJS also, trying to use server side binding titlecase formatter to convert a string in a server action within my database insert/update action step.
Will open a separate bug report then :+1:

But are you getting a parsing error like mine? Or unexpected output from the formatter?

I am getting unexpected output, as if the formatter didn’t convert the string at all.

Seems different then :v: Mine is just related to the formatter not being parsed correctly.

Okay, I’ll create a new bug report :+1:

1 Like

Update for the capitalize, unzip in lib/formatters. This update will not be included in todays Wappler update since we want to verify first if it is working and will then be included in next weeks update.

string.zip (1.1 KB)

1 Like

Confirmed. It works.

Fixed in Wappler 3.7.8

This topic was automatically closed after 2 days. New replies are no longer allowed.