Foros de discusión

new theme deployment "half-success"

Péter KIRÁLY, modificado hace 8 años.

new theme deployment "half-success"

Junior Member Mensajes: 29 Fecha de incorporación: 11/08/15 Mensajes recientes
Hi everyone,

I hope I'm posting to the right forum.

So I have Liferay Portal 6.2 with Tomcat up and running all right. I created a new theme using Plugins SDK (called tester-theme) and "half-successfully" deployed it with Ant. It always said build successful, however theme was still not showing up on my Portal available themes section. On my marketplace portlet however, it showed up as an "app", but with no configurable extensions (thus no themes as I understand).

So I checked the logs (catalina.out), and found this:

INFO: Deploying web application directory /opt/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/webapps/tester-theme
21:47:33,013 INFO [localhost-startStop-4][HotDeployEvent:145] Plugin tester-theme requires marketplace-portlet
21:47:33,014 INFO [localhost-startStop-4][HotDeployImpl:217] Deploying tester-theme from queue
21:47:33,015 INFO [localhost-startStop-4][PluginPackageUtil:1016] Reading plugin package for tester-theme
aug. 12, 2015 9:47:33 DU org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
21:47:33,271 INFO [localhost-startStop-4][ThemeHotDeployListener:98] Registering themes for tester-theme
21:47:33,280 ERROR [localhost-startStop-4][ThemeLocalServiceImpl:278] com.liferay.portal.kernel.xml.DocumentException: Error on line 8 of document : Element type "theme" must be followed by either attribute specifications, ">" or "/>". Nested exception: Element type "theme" must be followed by either attribute specifications, ">" or "/>".
com.liferay.portal.kernel.xml.DocumentException: Error on line 8 of document : Element type "theme" must be followed by either attribute specifications, ">" or "/>". Nested exception: Element type "theme" must be followed by either attribute specifications, ">" or "/>".
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:429)
........

I believe the problem relates to the sentence in bolded red, which shows up more times. I was looking for answers on google and forums, but haven't found anything meaningful.

Any help is greatly appreciated!
Thanks: Peter
thumbnail
David H Nebinger, modificado hace 8 años.

RE: new theme deployment "half-success"

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
Check your xml files in WEB-INF. Looks like you have some broken XML.
Péter KIRÁLY, modificado hace 8 años.

RE: new theme deployment "half-success"

Junior Member Mensajes: 29 Fecha de incorporación: 11/08/15 Mensajes recientes
I agree, however I cannot find which one could be broken.
Péter KIRÁLY, modificado hace 8 años.

RE: new theme deployment "half-success"

Junior Member Mensajes: 29 Fecha de incorporación: 11/08/15 Mensajes recientes
Do you think the double double quotes could cause the problem?

<look-and-feel>
<compatibility>
<version>6.2.0+</version>
</compatibility>
<theme id="tester" name=""Tester"" />
</look-and-feel>
thumbnail
David H Nebinger, modificado hace 8 años.

RE: new theme deployment "half-success"

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
Absolutely, that is not good XML.
Péter KIRÁLY, modificado hace 8 años.

RE: new theme deployment "half-success"

Junior Member Mensajes: 29 Fecha de incorporación: 11/08/15 Mensajes recientes
I cannot find the cause of the problem. This is the process when I make a new theme:
1. in folder liferay-plugins-sdk-6.2/themes I execute: ./create.sh test Test
2. then in the newly created folder I execute: ant deploy
Build is successful.
However, in webapps/test-theme/WEB-INF/liferay-look-and-feel.xml, the xml is broken: name=""Test""
I don't know where it goes wrong. Fixing the quotes in the above folder xml doesn't solve the problem, because it should be redeployed that way.. How could I solve this problem?

Thanks you in advance!
thumbnail
David H Nebinger, modificado hace 8 años.

RE: new theme deployment "half-success"

Liferay Legend Mensajes: 14915 Fecha de incorporación: 2/09/06 Mensajes recientes
What part of "that is not good XML" didn't you understand?

Double quotes? Seriously? Have you heard about XML encoding?

name="&quot;Test&quot;" would be properly encoded, but honestly it makes no sense to see a list of themes in the UI and see one that reads "Test". Is that supposed to mean it's not really test as the name is in quotes or something?
Péter KIRÁLY, modificado hace 8 años.

RE: new theme deployment "half-success"

Junior Member Mensajes: 29 Fecha de incorporación: 11/08/15 Mensajes recientes
Haha, why are you mad at me? Of course I know how xml is formatted.
I was asking WHY is it deployed that way with double double quotes? You know I give it a normal name like Test, however with ant deploy it gets ""Test"" in xml and "Test" on app manager, no idea why. But never mind.