Liferay Theme Migration from 6.2 to 7.x / DXP

  

Liferay Theme Migration: from 6.2 to 7.x / DXP


Overview


This article describes the steps required to migrate a Liferay theme from 6.2 to 7.x / DXP.


Migration Steps


1. Prepare Theme for Migration


Liferay Theme for 6.2 should be Plugin-SDK-compatible (“docroot” structure).

All custom changes should be inside _diffs folder:



2. Prepare Environment for Migration


Use Node v10 with NVM (or instal appropriate version manually):

nvm use v10.12.0


Install Gulp/Yeoman/Liferay Theme Generator:


npm install -g gulp@3.9.1

npm install -g yo@3.1.0

npm install -g generator-liferay-theme@8.x.x


* install them globally, keep the mentioned version numbers.


Verify the installation:


lunar-resort-dxp-theme$ npm list -g --depth=0

/home/vitaliy/.nvm/versions/node/v10.12.0/lib

├── generator-liferay-theme@8.2.4

├── gulp@3.9.1

├── npm@6.4.1

└── yo@3.1.0


3. Theme Import


Create a folder for DXP theme, and run a command from inside it:


yo liferay-theme:import

, answer the questions and finish theme import:


4. Theme Migration from 6.2 to 7.0


Navigate to the imported theme’s folder. Install liferay-theme-tasks v8 for upgrade to 7.0:


npm install --save-dev liferay-theme-tasks@8.x.x


Run the upgrade command:


gulp upgrade



Check the upgrade logs. 

See the automatically applied changes, and make the manually required ones (according to the instructions in logs).

5. Theme Migration from 7.0 to 7.1


Install liferay-theme-tasks and liferay-theme-deps-7.1 v8.0.9:


npm install --save-dev liferay-theme-tasks@8.0.9

npm install --save-dev liferay-theme-deps-7.1@8.0.9 


Verify the installation:


lunar-resort-ce-theme$ npm list --depth=0

lunar-resort-ce-theme@1.0.0

├── gulp@3.9.1

├── liferay-theme-deps-7.1@8.0.9

└── liferay-theme-tasks@8.0.9


Run the upgrade command again:


gulp upgrade



Check the upgrade logs, implement the required manual fixes according to them.

Update Velocity templates (VM) to FreeMarker (FTL).


See also:

https://help.liferay.com/hc/en-us/articles/360029316691-Upgrading-Your-Theme-from-Liferay-Portal-6-2-to-7-2


Enjoy 😏

Comments

Popular posts from this blog

Liferay Search Container Example

Liferay DXP - max upload file size

Liferay Keycloak integration