Labeltext not visible

Forum to discuss the new web client version of Servoy.

Labeltext not visible

Postby rieder » Fri Dec 23, 2016 5:02 pm

Hi

Now and then it happens, that clients do not see any label text on the pages. i18n and plain texts. They just do not show up when showing the page.
What is the reason? Any idea, please? Quite annoying for the customers.

Regards
Birgit
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Labeltext not visible

Postby paronne » Wed Dec 28, 2016 2:55 pm

Hi, what you describe is not a common issue, hard to say what goes wrong. Which version of Servoy are you using ?

Do you know any further detail on when an how this issue occurs, for example happens only the first time you show a form, or only after the first time or.. ?
Is something you can replicate or happens only on client side ?
Can you exclude that the same form is not shown twice on the same screen ?
If you interact with the "faulty" form ( for example you click on a button that performs an action ) are the interaction executed or nothing happens ?
Also If you inspect the browser console and the servoy.log do you see any error ?
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm

Re: Labeltext not visible

Postby rieder » Wed Dec 28, 2016 3:52 pm

Hi

Thank you for the answer. I guess, it is not easy to debug. So, there is no other person who does notice this behaviour?

We are using Servoy 8.1.1. Java version and the platform are different in development and in customer environment: Two developers (Safari on OS X 10.11.6) did once see the missing labels and one customer (IE on Windows).

We see the this happen only at startup of the NG Client, I guess.
I cannot replicate this.
I cannot exclude that the same form is not shown twice on the same screen. I'll check next time.
The interaction works on that form. Only the labels are missing.
I'll check the servoy.log in production. And browser console, if this happens in development again.
Could you inform me, if you hear about others with this problem? Or if you have an idea, on how to prevent this, please?

Thank you and best regards
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Labeltext not visible

Postby paronne » Wed Dec 28, 2016 4:31 pm

Hi,

indeed is hard to debug. I don't know about someone else seeing this behavior; unless the form on screen was actually 'broken' (for example because shown twice) but in this case i expect that the user won't be able to interact with the form. I hardly believe that is a stylying issue; you can confirm that by inspecting the browser the next time that the issue occurs and check if you can find the missing text in the DOM HTML; if you cannot find the missing text in the HTML then is not a stylying issue.
I'll let you know if i hear something similar happening elsewhere.

Regards,
Paolo
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm

Re: Labeltext not visible

Postby rieder » Thu Dec 29, 2016 10:57 am

Hi Paolo

Thank you ver much for the answer.

If it is not a broken form and not a styling issue, what else could it be? Good to hear that you don't know of anybody else seeing this.

We'll inspect the DOM next time.
- What, if we see the text? A browser/refresh problem?
- What, if not? Servoy problem?

Actually, I now remember when this happened to me: When I upgraded Servoy from version 8.1.0 to 8.1.1. and did deploy the solution. Any bells ringing? ;-)

Best regards
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Labeltext not visible

Postby paronne » Thu Dec 29, 2016 11:27 am

Hi Brigit,

- if you see the text in the DOM it means that the label component is rendered and the text is correctly applied to the element, then for some reason there is a stylying issue (CSS conflicts or CSS missing). You can make use of the browser inspector to see what goes wrong with the style.
- if you don't see the text instead (which i believe is more probable) then something is going wrong; still hard to say what could wrong.

Paolo
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm

Re: Labeltext not visible

Postby rieder » Thu Dec 29, 2016 12:02 pm

Thank you. We'll wait for the next time, though.
Kind regards
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Labeltext not visible

Postby rieder » Fri Dec 30, 2016 10:28 am

Hi Paolo

We did have a look at the catalina log file of that day. We notice a null pointer exception and a cache problem. Does it tell you more (s. attached file)?

Kind regards
You do not have the required permissions to view the files attached to this post.
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Labeltext not visible

Postby paronne » Fri Dec 30, 2016 11:47 am

Hi Brigit,

the catalina log doesn't say much.
Something else i haven't thought before instead is a new APP property introduced in 8.1.1. It can prevent label to show if they contain HTML text.
By default this property is false, you can enabled it with: application.putClientProperty(APP_UI_PROPERTY.TRUST_DATA_AS_HTML,true).

Do you know if the content of the label not showing indeed was HTML content or just plain text ?
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm

Re: Labeltext not visible

Postby rieder » Fri Dec 30, 2016 12:08 pm

Hi Paolo

Thank you. You're pointing at something, I just wanted to ask: Looking at the html for a label (Muttersprache), I see this trustAsHtml attribute:

Code: Select all
<span ng-bind-html="(model.dataProviderID == null || model.dataProviderID.url ? model.text : model.dataProviderID) | formatFilter:model.format.display:model.format.type | mnemonicletterFilter:model.mnemonic | trustAsHtml:servoyApi.trustAsHtml()" class="ng-binding">Muttersprache</span>


Coming back to your question: Some of the labels are html text, most aren't. But none of the labels were displayed, when we noticed the problem.

I might add this application property (to trust in html data). But wouldn't the labels be always visible or never, if this would be the problem? And wasn't this introduced to avoid html injection? I did not expect that it will influence data on client side. But to strip data from a client, when received at server side. I was looking forward to this behavior. Should I turn it off?

Best regards
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Labeltext not visible

Postby paronne » Fri Dec 30, 2016 2:23 pm

Hi Brigit,

the trustAsHtml would affect only the label containing html text; i assume that most of your label contain just plain text, therefore i would expect that most of the labels are not affected by it and few are. Since you say that none of the label was visible, then the cause of the issue is another one.

About the trustAsHtml it will strip non sanitazed data on client side, it prevents non trusted HTMl to be executed on client side.
You would like to have this behavior on the elements that are showing data coming from data provider (user can write evil html into the dataprovider, if not trusted such html won't be executed).
You can enable/disable this property also per element, so you can enable trustAsHtml only on labels you are sure from it's source: element.putClientProperty(APP_UI_PROPERTY.TRUST_AS_HTML, true).
paronne
 
Posts: 202
Joined: Fri Nov 02, 2012 3:21 pm

Re: Labeltext not visible

Postby rieder » Fri Dec 30, 2016 4:24 pm

Hi Paolo

I'll do this for one label. And if the problem occurs again, I'll see, if this label is involved or not.

Please let me know, if'll you get another idea.

Thank you for your support and kind regards
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 9 guests