Closed john-co closed 3 years ago
Errors thrown on liferay portal console when deployed: https://gist.github.com/john-co/5eff609fc295098141d92c38156d6e94
Same error also occurs when run 'gulp build'.
Unfortunately this looks very specific to the theme so I can't repro this with the 6.2 theme that I've been testing with (manzanita-theme). Can you give me a pointer on where to get a hold of the zoe-health theme?
FWIW, I also run into errors with manzanita-theme, but they are different (for example, it is trying to locate mixins like "aui/alloy-font-awesome/scss/mixins-alloy" that it doesn't have). I think this whole thing is going to be very sensitive when dealing with very old themes. I am suspicious of one bit of the code that is supposedly doing these renames (ie. the ones that the "Do you want to rename custom.css to _custom.scs" prompt — and similar — are asking about), so I'll look into that, which may help, but I don't know if it will fix the issue.
@wincent Thanks for looking into it! For some additional info: I don't remember that question (rename custom.css to _custom.scs) ever being asked during gulp deploy
until the recent update in v8.0.2. It didn't show up in gulp deploy
when I went through the test plan last summer. So my hunch is also leaning towards that as a good trail to find a fix.
@wincent scratch my last comment, it did ask for that prompt last summer when I tested it. (rename custom.css to _custom.scs).
Ok, I believe that #268 which I just pushed fixes this. I used the "zoe-healthcare-theme" from https://github.com/liferay/liferay-plugins/tree/6.2.x/themes/zoe-healthcare-theme and I answered "yes" at the prompt to rename "custom.css" to "_custom.scss". After that, gulp build
works fine. I don't know if gulp deploy
works as I don't have a 7.0 instance handy (need to figure out how to install and run older versions), but I believe it is very likely to work.
FWIW, I downloaded the latest 7.0 CE and gulp deploy
works, sort of. That is, no error messages on the gulp
side, no error messages in the tomcat server log (apart from these which indicate success).
You can't see the theme in the instance though, and if you connect with the gogo shell (telnet localhost 11311
) you will see it as installed
but you can't start
it:
! lb zoe
START LEVEL 20
ID|State |Level|Name
555|Installed | 10|zoe-healthcare-theme (1.0.0)
osgi> start 555
org.osgi.framework.BundleException: Could not resolve module: zoe-healthcare-theme [555]
Unresolved requirement: Import-Package: com.swabunga.spell.engine; resolution:="optional"
Unresolved requirement: Import-Package: com.swabunga.spell.event; resolution:="optional"
Unresolved requirement: Import-Package: net.fortuna.ical4j.model; resolution:="optional"
Unresolved requirement: Import-Package: net.fortuna.ical4j.model.property; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.axis.tools.ant.wsdl; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.bsf; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.poi.hssf.usermodel; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.poi.ss.usermodel; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.portals.bridges.common; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.portals.bridges.struts; resolution:="optional"
Unresolved requirement: Require-Bundle: resources-importer-web; bundle-version="1.0.0"
@jbalsas thinks that is caused by this commit in the portal that bumped the resources importer to 2.0.0. The commit dates back to November 2017, but it's possible that it still hadn't made it into the community edition at the time you last went through the test plan.
Updating the theme's "package.json" to identify itself as "2.0.3" (to match the version claimed by the resources importer) sadly doesn't work:
g! start 555
org.osgi.framework.BundleException: Could not resolve module: zoe-healthcare-theme [555]
Unresolved requirement: Import-Package: com.swabunga.spell.engine; resolution:="optional"
Unresolved requirement: Import-Package: com.swabunga.spell.event; resolution:="optional"
Unresolved requirement: Import-Package: net.fortuna.ical4j.model; resolution:="optional"
Unresolved requirement: Import-Package: net.fortuna.ical4j.model.property; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.axis.tools.ant.wsdl; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.bsf; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.poi.hssf.usermodel; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.poi.ss.usermodel; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.portals.bridges.common; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.portals.bridges.struts; resolution:="optional"
Unresolved requirement: Require-Bundle: resources-importer-web; bundle-version="2.0.3"
g! lb importer
START LEVEL 20
ID|State |Level|Name
164|Active | 10|Liferay Export Import Resources Importer (2.0.3)
I was able to get the theme to show up in the portal by hacking out all traces of the resources importer. That is:
diff --git a/src/WEB-INF/liferay-plugin-package.properties b/src/WEB-INF/liferay-plugin-package.properties
index 16b4fac..e204173 100644
--- a/src/WEB-INF/liferay-plugin-package.properties
+++ b/src/WEB-INF/liferay-plugin-package.properties
@@ -9,9 +9,3 @@ page-url=http://www.liferay.com
author=Liferay, Inc.
licenses=LGPL
liferay-versions=7.0.0+
-
-required-deployment-contexts=\
- resources-importer-web,\
- web-form-portlet
-
-resources-importer-developer-mode-enabled=false
and then deleting references to "wap-template-path" that were also causing trouble:
diff --git a/src/WEB-INF/liferay-look-and-feel.xml b/src/WEB-INF/liferay-look-and-feel.xml
index e71ba9c..a79867b 100644
--- a/src/WEB-INF/liferay-look-and-feel.xml
+++ b/src/WEB-INF/liferay-look-and-feel.xml
@@ -20,12 +20,10 @@
<custom>
<layout-template id="1-2-3-columns" name="1-2-3 Columns Layout">
<template-path>/layouttpl/custom/1-2-3-columns-layouttpl/1_2_3_columns.tpl</template-path>
- <wap-template-path>/layouttpl/custom/1-2-3-columns-layouttpl/1_2_3_columns.tpl</wap-template-path>
<thumbnail-path>/layouttpl/custom/1-2-3-columns-layouttpl/1_2_3_columns.png</thumbnail-path>
</layout-template>
<layout-template id="2-1-2-4-columns" name="2-1-2-4 Columns Layout">
<template-path>/layouttpl/custom/2-1-2-4-columns-layouttpl/2_1_2_4_columns.tpl</template-path>
- <wap-template-path>/layouttpl/custom/2-1-2-4-columns-layouttpl/2_1_2_4_columns.tpl</wap-template-p>
<thumbnail-path>/layouttpl/custom/2-1-2-4-columns-layouttpl/2_1_2_4_columns.png</thumbnail-path>
</layout-template>
</custom>
I think, however, that in many cases these upgrades from very old 6.2 themes are going to require manual patching.
CC'ing @mtambara who made the referenced update to the resources importer as he might have some context on whether the above analysis is correct.
@wincent The commit you're referring to was part of a ticket to restructure the exports from export-import. It shouldn't have made any changes to functionality
@wincent I get the same issue of zoe-healthcare-theme installed but not started verified through telnet 11311
.
We've just migrated this project to the liferay-frontend-projects
monorepo in the name of consolidation. As this issue is quite old now, I'm not going to transfer it automatically. If you consider it to be still relevant, please create a fresh issue over in the new repo.
Steps to reproduce:
npm install -g generator-liferay-themes@v8.0.3
yo liferay-theme:import
on 6.2 theme (zoe-health)gulp upgrade
? Do you want to rename custom.css to _custom.scss?
gulp deploy
Assert error thrown: