Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Blade Theme Template useless
Hi,
I am using LR 7.1.0 and blade cli 3.1.1
After creating a theme with
blade create -t theme my-vanilla-theme
and deploying it
blade gw build deploy
I get the error:
So I found this issue ticket:
https://issues.liferay.com/browse/LPS-79353
It is suggested to set the version in liferay-look-and-feel.xml to 7.1.0+
Unfortunately the blade theme template does not create this file at all. So I took the file from the build folder and edited it
<look-and-feel> <compatibility> <version>7.1.0+</version> </compatibility> <theme id="my-vanilla-theme" name="my vanilla theme"> <template-extension>ftl</template-extension> </theme> </look-and-feel>
and put it to
my-vanilla-theme/src/main/webapp/WEB-INF
Now the template deploys without error.
BUT, using the template makes the LR portal completely useless because the whole styling and layout is messed up. There are huge icons. See the attachment...
What do I need to do to get a new, simple, functional template?
I would have hoped, that the theme template is at least as styled as the default theme of the liferay portal.
Thanks
Chris
Attachments:
Note: I think, you need to add a "-v 7.1" parameter to create 7.1 projects:
blade create -v 7.1 -t theme my-vanilla-theme
When I last tried that, it still didn't work. The build.gradle created using the template referenced the 2.0 themes and build tools. IMHO it has to use the 3.0 versions of those modules as a base, e.g:
compile group: 'com.liferay', name: 'com.liferay.frontend.theme.unstyled', version: '3.0.5'
Changing that and adding the xml still didn't work for me. But maybe something has changed, I tried it a couple of weeks ago. I don't remember the problem, but I gave up there, since I was just playing around and actually don't use 7.1 currently.
Thanks Christoph.
Good to know, that I am not the only one facing this Problem.
I will try to play with the versions in the gradle.properties.
Chris
I've being having the same issue - but have been using the Maven archetype and not theme builder - however the issue is the same - the compilation of the theme is not bringing in the latest styles/unstyled theme resources, but the 7.0 version. I've noticed the key difference is that in 7.1 the page will look to load clay.css whereas in 7.0 its getting aui.css as the base css.
So when you build your theme, as its using the old 7.0 theme resources, you end up creating and deploying aui.css, not clay.css, and as a result the styles you need are not present.
I got around this by updating my build project to grab the new 7.1 styled/unstyled resources. Not entirely sure how to do this in theme builder but in Maven I had to force it to get the latest version of the styled/unstyled resources I wanted in the build - i followed the concept here: https://dev.liferay.com/en/develop/reference/-/knowledge_base/7-1/theme-builder-plugin
A word of warning - once I did this (and got it loading the correct styled/unstyled resources) my builds failed as there were SASS errors with the styled files. Not sure whther these are of my own making or the fact I am using Maven or not. In the end I found to move forward I had to apply a number of pacthed versions of the styled scss files to get this working.
Happy to share more information if it'll help.
I'm still waiting for someone to get the right answer to this....
Hi Ben, Chris
I run into the same problem using Gradle but because of your comment telling us to grab the latest version i did the same in my build.gradle. It fixed the theme and the earlier mentioned version problem in the liferay-look-and-feel.xml. Just be sure you have 'The latest the greatest' dependencies in your build.gradle. at the time of this writing it was:
parentThemes group: "com.liferay", name: "com.liferay.frontend.theme.styled", version: "3.0.9" parentThemes group: "com.liferay", name: "com.liferay.frontend.theme.unstyled", version: "3.0.9" portalCommonCSS group: "com.liferay", name: "com.liferay.frontend.css.common", version: "3.0.1" themeBuilder group: "com.liferay", name: "com.liferay.portal.tools.theme.builder", version: "1.1.6"
But always check out the maven repo (also for gradle) for the latest releases.
Regards,
Jan
Hi guys,
What version of blade are you on (blade version)?
Try upgrading to the latest version (blade update) and it should produce a 7.1 compatible theme template.
Thanks,
Dave
Powered by Liferay™