Forums de discussion

Custom theme 6.2 not loading css properly

Rui Duarte, modifié il y a 10 années.

Custom theme 6.2 not loading css properly

New Member Publications: 22 Date d'inscription: 26/11/13 Publications récentes
Hi everyone,
I've posted a topic before regarding Liferay 6.1 CE theme development, and having problems with css.

Right now i installed Liferay 6.2 CE, installed Liferay IDE with eclipse and SDK aswell for theme development.

I created my Liferay project (theme)
- Created css folder inside _diffs
- Created images folder inside _diffs
- Created templates folder inside _diffs


P.S: just to create a simple theme

After all this i redeployed the theme to my Liferay 6.2 CE Tomcat 7 server, and for some reason, when the deployed finished, i lost Liferay 6.2 dock bar, and side bar along with some css.

For some reason the first refresh i do after deploying the theme, it loads the dockbar and all of that correctly, the second refresh i do to the page, i lose the dockbar along with sidebar and additional css.

Any hits that may be causing this ?

I've attached some images too see if it helps.
thumbnail
M J, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
My advice is to delete this custom theme and create a custom theme based on "Classic Theme". Then you can modify the custom.css file in _diff folder to whatever you like. To inherit from classic theme, do the following changes in the build.xml in the custom theme project:

<!--?xml version="1.0"?-->

<project name="yourcustom-theme" basedir="." default="deploy">
  <import file="../build-common-theme.xml" />
  <property name="theme.type" value="ftl"></property>
  <property name="theme.parent" value="classic" />
</project>

Then copy all the files from tomcat-7.0.42\webapps\ROOT\html\themes\classic\_diffs to your custom them _dffs folder.
Rui Duarte, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

New Member Publications: 22 Date d'inscription: 26/11/13 Publications récentes
Hi im having one other problem ( one i had already on 6.1 ).

And im sorry for keeping asking for help, but tbh i'm already feeling frustrated with this situation emoticon.

My web designer developed a theme using foundation css Framework, but the thing is, the theme wasnt developed to be compatible with Liferay or other cms's.

Basicly the theme was only developed using Foundation Css Framework.

Is there any way for me to apply my css to my custom theme and layout, without breaking the css ?

For example i've modified navigation.vm to my theme.
After the deploy this happens to the tooltip function ( dont know what else is broken, havent tried yet ) .
Ant the same happens to the dockbar for example, it was blue, and now its black, only due to my theme css's emoticon.

2nd Problem :
Everytime i deploy my theme to tomcat, i get this two Warnings:
- Warning: [SetContextPropertiesRule]{Context} Setting properly "source" to "org.eclipse.jst.jee.server:classic_custom_theme" did not find a matching property.
- Warning: a docBase c:\users\rmd\desktop\liferay-portal-6.2.0-ce-ga1\tomcat-7.0.4.2\webapps\classic_custom_theme inside the host appBase has been specified, and will be ignored.

See attachments please.

Pièces jointes:

thumbnail
M J, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
Did you try this tool to upgrade the theme?
Rui Duarte, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

New Member Publications: 22 Date d'inscription: 26/11/13 Publications récentes
No i have not,
Since im a begginer in Liferay can you explain me how can it help me with the problems i've described ?

Best regards,
And thank you so much for you patience it means alot.
Rui Duarte, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

New Member Publications: 22 Date d'inscription: 26/11/13 Publications récentes
Please bump, really need help in this subject
Rui Duarte, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

New Member Publications: 22 Date d'inscription: 26/11/13 Publications récentes
Hello again,
I'd appreciate if you could help me i really need help.
thumbnail
Yatin Patel, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

New Member Publications: 24 Date d'inscription: 12/10/11 Publications récentes
Hi Rui ,

Check console while you build theme. 6.2 use SAAS. As i know it might be failed to convert due to wrong css markup.

Or

You can check "liferay-plugins-sdk-6.2.0\themes\YOUR-THEME\docroot\css\.sass-cache" all css fine in css validater.
Rui Duarte, modifié il y a 10 années.

RE: Custom theme 6.2 not loading css properly

New Member Publications: 22 Date d'inscription: 26/11/13 Publications récentes
Yatin Patel:
Hi Rui ,

Check console while you build theme. 6.2 use SAAS. As i know it might be failed to convert due to wrong css markup.

Or

You can check "liferay-plugins-sdk-6.2.0\themes\YOUR-THEME\docroot\css\.sass-cache" all css fine in css validater.


I've checked and there isnt a file called .sass-cache in the path u specified.

Basicly all errors i'm getting i've described and took pictures so you guys can help.

btw that aui tool that was described a few posts back what is that for ? i cant seem to find the folder to apply the .bat file and execute the plugin.
thumbnail
Nick Burton, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Junior Member Publications: 51 Date d'inscription: 13/07/14 Publications récentes
I have the same problem and the information supplied above has not fixed it.
I have lost the formatting for the login button (top Right) and also the formatting to the Navigation.

I have simply created a custom theme with the base theme being CLASSIC.
I have not touched the theme other than that.

Help!
thumbnail
M J, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
"Sign In" comes from the dockbar portlet. Take a look at the following jsp file:

tomcat-7.0.42\webapps\ROOT\html\portlet\dockbar\view_user_account.jspf
thumbnail
Nick Burton, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Junior Member Publications: 51 Date d'inscription: 13/07/14 Publications récentes
Thanks, will do.
Does that control the Navigation?
thumbnail
M J, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
Navigation is coming from you custom theme: your-theme\docroot\templates\navigation.vm or navigation.ftl
thumbnail
Nick Burton, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Junior Member Publications: 51 Date d'inscription: 13/07/14 Publications récentes
Eclipse didn't copy the .vm files only the .ftl files.
Should I copy the .vm files manually?
thumbnail
M J, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
No. Your theme uses Freemarker (Liferay 6.2 leaning towards Fremarker(ftl), they are moving away from Velocity(vm)). Check the navigation.ftl file.
thumbnail
Nick Burton, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Junior Member Publications: 51 Date d'inscription: 13/07/14 Publications récentes
Strange!
I copied the original from the Classic theme, which works fine and still no change.

Every time I create a them from scratch with the classic as the base it is the same.

Could it be a compile issue or a set-up problem with Eclipse?
thumbnail
M J, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
I believe Liferay Freemarker doesn't copy everything from classic. So, delete the theme file you have, create a new one. When it asks for the template, select Velocity (not the default Freemarker). I think that will solve the problem.
thumbnail
Nick Burton, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Junior Member Publications: 51 Date d'inscription: 13/07/14 Publications récentes
Brilliant.
As simple as that.

Thank you for all of your help. That now works as expected.
thumbnail
Achmed Tyrannus Albab, modifié il y a 9 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 158 Date d'inscription: 05/03/10 Publications récentes
I almost died.

I tried clearing all my browsers cache almost few hundred times.
Redeployed almost thousand times, and deleted the .sass-cache folder don't know how many times.
But it didn't work.

But the copy the main.css to the diff folder and re war and re deploy along with deleting the .sass-cache folder did the trick.

Thanks guys.
juan meza, modifié il y a 8 années.

RE: Custom theme 6.2 not loading css properly

Regular Member Publications: 228 Date d'inscription: 06/01/14 Publications récentes
if you make changes, and they are not reflected in the theme... deleting the contents of work and temp in the tomcat folder should do the trick!

hope it helps some one