Fórum

Words being split in text on built-in themes

wayne badcock, modificado 10 Anos atrás.

Words being split in text on built-in themes

New Member Postagens: 7 Data de Entrada: 17/11/13 Postagens Recentes
Hello

Please do tell me if this is "user error" or a rookie mistake but I seem to have this problem where text I put on a page gets split and truncated so it appears like:

Welcome to this website. Here you will find lots of in
formation about lots of stuff and it is all really excitin
g. Hope you will visit again soon.

I have also attached a screenshot to demonstrate how it is looking.

I am assuming it is something in the CSS? tried googling lots and found stuff about word-wrap CSS tag bu don't know where to start to try ansd stop this. Is there a way to stop this from happening?

Using: Liferay Portal Community Edition 6.2.0 CE GA1

Many thanks

Wayne.
thumbnail
Jithin Krishnan, modificado 10 Anos atrás.

RE: Words being split in text on built-in themes

New Member Postagens: 8 Data de Entrada: 14/11/13 Postagens Recentes
HI,

Have you checked if the word-wrap property is getting overwritten somewhere ?

http://www.w3schools.com/cssref/css3_pr_word-wrap.asp

Thanks,
Jithin Krishnan
wayne badcock, modificado 10 Anos atrás.

RE: Words being split in text on built-in themes

New Member Postagens: 7 Data de Entrada: 17/11/13 Postagens Recentes
Hi

Thanks for the quick reply

Jithin Krishnan:
HI,
Have you checked if the word-wrap property is getting overwritten somewhere ?


The problem is I don't know where to check - this is a pretty clean install I have not customized it myself anywhere.

Any idea where this could be and where to get to the underlying CSS?
wayne badcock, modificado 10 Anos atrás.

RE: Words being split in text on built-in themes (Resposta)

New Member Postagens: 7 Data de Entrada: 17/11/13 Postagens Recentes
Hello

Posting my final solution in case others have a similar issue.

After much searching of code I found in the custom.css the code that was causing the words to split. (both classic and welcome themes).

At line 387:
@include hyphenation;


By removing this line, (or in my case replacing it with:
text-align:justify;
the issue was resolved.

I found more information on the problem at http://clubmate.fi/hyphening-with-pure-css

:-)

Wayne
thumbnail
Jack Bakker, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
wayne badcock:

After much searching of code I found in the custom.css the code that was causing the words to split. (both classic and welcome themes).

At line 387:
@include. hyphenation;


By removing this line, (or in my case replacing it with:
text-align:justify;
the issue was resolved.

I found more information on the problem at http://clubmate.fi/hyphening-with-pure-css

:-)

Wayne


Thanks for this Wayne. It helped me out just now as I play with modifying a v6.2 classic theme.
Robert Koller, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

New Member Postagens: 19 Data de Entrada: 06/11/10 Postagens Recentes
Hello

I have the same problem. With chrome it's OK. With Firefox and Internet Explorer, the words are split at the end of the line.

The changes in line 387 (to text-align:justify;) have brought no solution.

MNy version of Liferay is: Liferay Portal Community Edition 6.2 CE GA2 (Newton / Build 6201 / March 20, 2014

Thank you for your help!

Robert
thumbnail
Jack Bakker, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
In my case, I commented out the following in my themes _diffs/css/custom.css

/*@include hyphenation;*/

then I redeployed, reloaded the page and word wrapping was as one would expect in FF and IE
Robert Koller, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

New Member Postagens: 19 Data de Entrada: 06/11/10 Postagens Recentes
Thank you, Jack.

For me it did not work. I have modified the following files:

tomcat-7.0.42/webapps/ROOT/html/themes/classic/_diffs/css/custom.css
tomcat-7.0.42/webapps/ROOT/html/themes/classic/css/custom.css

/*@include hyphenation;*/

The browser data I deleted, the page reloaded. Even the server is restarted. But I see no change.

Chrome, OK
Firefox 31.0, NOT OK.
Internet Explorer 9.0 NOT OK.

Best regards

Robert
thumbnail
Jack Bakker, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
Hi Robert,

I assumed you had created a new theme using the classic as a template. As such you would modify

*sdk*/themes/my-theme/_diffs/css/custom.css

I would never modify the classic or other themes in tomcat*/ROOT/html/themes ; leave those alone
Robert Koller, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

New Member Postagens: 19 Data de Entrada: 06/11/10 Postagens Recentes
Hi Jack

Thank you for your answer.

Of course you're right!

For a clean solution, I'll make it so. But I would still like to first find a solution to my problem.

You can help me?

Best regards
Robert
thumbnail
Jack Bakker, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
clean your tomcat (or other) 'work' folder out ? I suggest you go the distance to do it right .. seems you want your own theme and not use OTB classic itself but use classic as a template for your own theme

good luck
Robert Koller, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

New Member Postagens: 19 Data de Entrada: 06/11/10 Postagens Recentes
Hi Jack

I have now set up a new test environment:

Portal Tomcat 6.2 GA2
liferay-plugins-sdk-6.2.ce.ga2
Eclipse

Based on Classic I have created a new theme.

The change to custom.css I have done.

The new theme I assigned my site.

The same result:
- Chrome: OK
- Firefox: Not OK

I do not know what I could do.

Regards

Robert
thumbnail
Jack Bakker, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
Based on Wayne's info, I was able to solve issue. So I can only gather we must each be doing/having (and thus experiencing) something different.

I am guessing, that we would need to narrow in what is unique to your enviro and approach to discover more.
thumbnail
Krzysztof Gołębiowski, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

Liferay Master Postagens: 549 Data de Entrada: 25/06/11 Postagens Recentes
Hello,
This bug is still present in 6.2 GA2 but has been solved on Liferay's trunk. It has been described in https://issues.liferay.com/browse/LPS-42804 and solved by this commit: https://github.com/marclundgren/liferay-portal/commit/11173a64046066b6b9ae480fb63fdd0c3572ba6d.

Regards,
KG
thumbnail
Jack Bakker, modificado 9 Anos atrás.

RE: Words being split in text on built-in themes

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
Thx Krysztof wrt fixes for portal-web/docroot/html/themes/classic/_diffs/css/custom.css

Note that if someone created custom theme based on classic or styled, and had copied custom.css into their own custom theme they would need to apply similar changes as we see at https://github.com/marclundgren/liferay-portal/commit/11173a64046066b6b9ae480fb63fdd0c3572ba6d

Best,
Jack