Forums de discussion

Liferay theme context change

Patrik Razem, modifié il y a 8 années.

Liferay theme context change

New Member Publications: 2 Date d'inscription: 05/08/15 Publications récentes
Hello,

I have developed a Liferay Freemarker Theme for Liferay Portal CE 6.2 with the Liferay IDE. The theme worked fine, but then we realized we had to change the Liferay context from ROOT (/) to '/portal'. I have followed the instructions for changing the Liferay Portal context and the Portal itself is working correctly when I do so. The Portal is running bundled with Tomcat 7.0.42

The theme that I developed, however, does not work. After the theme is deployed, I get an error:
"Error reading included file /mycontext_SERVLET_CONTEXT_/html/themes/_unstyled/templates/init.ftl"
, which corresponds with this JIRA ticket: LPS-50259. Has this issue been fixed on 6.2. CE? From the ticket I can see that the fix has been applied for Enterprise. If not, is there any known workaround for this problem?

I have tried adding a virtual-host tag to the liferay-look-and-feel.xml and I have also tried to change the web.xml context-param tag. I cannot find any real solution to this problem on the forum.
thumbnail
Bijan Vakili, modifié il y a 8 années.

RE: Liferay theme context change

Expert Publications: 375 Date d'inscription: 10/03/09 Publications récentes
No, per ticket it affects GA4; you can also manually check that:

On right side of ticket, click commits link; you will something along the lines of:
c308c4d LPS-50259 SF 16/Oct/14 1 file
941e14d LPS-50259 Fix warnings 16/Oct/14 2 files
f121bdb LPS-50259 Source formatting 16/Oct/14 1 file

You can click the hyperlinks for commits; and compare against the GA4 branch:

https://github.com/liferay/liferay-portal/commit/941e14d2fecbb55e9309c70572020f111a2ec070#diff-1179ba5482a536d3623c875407aa665fL20

https://github.com/liferay/liferay-portal/blob/6.2.3-ga4/portal-impl/src/com/liferay/portal/freemarker/LiferayTemplateCache.java#L20

Don't know if you're familiar with 'ext'; but it is a type of Liferay plugin; which allows you to fix this issue; by taking the fix commits Liferay made; and creating a patch for this issue.

If you need help, don't hesitate to ask.
Miha Valencic, modifié il y a 8 années.

RE: Liferay theme context change

New Member Publications: 7 Date d'inscription: 02/09/15 Publications récentes
Bijan Vakili:

Don't know if you're familiar with 'ext'; but it is a type of Liferay plugin; which allows you to fix this issue; by taking the fix commits Liferay made; and creating a patch for this issue.

If you need help, don't hesitate to ask.


Hello Bijan!

I'm not familiar with 'ext'. I see that using ext, it is possible to create plugins for Liferay in order to extend it: https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/creating-an-ext-plugin-liferay-portal-6-2-dev-guide-12-en

Is it also possible to override existing functionality?

How would I go about adding the functionality in LPS-50259 as an ext plugin - if you would be so kind to point me in the right direction.

Kind regards,
Miha.
thumbnail
Bijan Vakili, modifié il y a 8 années.

RE: Liferay theme context change

Expert Publications: 375 Date d'inscription: 10/03/09 Publications récentes
Yes, ext plugin can extend your Liferay; or completely replace anything there; so you don't have to modify the source; which makes upgrades easier to manage.

I won't get int ext dev in this thread; but just point you to some places to look:

Browse to the dev.Liferay resource site:
https://dev.liferay.com

In the search box, enter keywords: ext plugin

https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/ext-plugins

Next you'll want to review issue's commits; and make needed changes in ext plugin. Try it and if you have question, just post.
Miha Valencic, modifié il y a 8 années.

RE: Liferay theme context change

New Member Publications: 7 Date d'inscription: 02/09/15 Publications récentes
Thank you! We'll try.