Posts

Showing posts from October, 2021

Liferay Theme Migration from 6.2 to 7.x / DXP

Image
   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. Them

Liferay Log Levels Configuration

Image
   Liferay Log Levels Configuration Overview This article explains how to use log4j logger in Liferay and configure the log levels for both Liferay and custom modules. Using Logger Logging in Liferay can be used in the following way: import com.liferay.portal.kernel.log.Log ; import com.liferay.portal.kernel.log.LogFactoryUtil ; public class LoggerConfiguration {     public static void loggerTest () {         _log .info( "LoggerConfiguration => INFO." );    }     private static final Log _log = LogFactoryUtil . getLog ( LoggerConfiguration . class ); } The logger object can be created with the com.liferay.portal.kernel.log.LogFactoryUtil class. Then it can be used to log messages of different levels (TRACE|DEBUG|INFO|WARN|ERROR|FATAL). Default Log Level Default log level is INFO : Log Levels Configuration Log level can be configured in Control Panel -> Server Administration -> Log Levels: For each category (package and class) the appropriate log level can be defined.

Liferay Database Migration from 6.2 to DXP

Image
  Liferay Database Migration: from 6.2 to DXP Overview This article describes the steps required to migrate the database from Liferay 6.2 to Liferay 7.3 / DXP. Migration Steps 1. Create a dump for 6.2 database mysqldump -uroot -p1 liferay_62 > backup.sql 2. Create database for Liferay DXP: create database liferay_dxp character set utf8; 3. Load dump file to DXP database: mysql -uroot -p1 liferay_dxp < backup.sql 4. Specify database connection properties in portal-setup-wizard.properties for Liferay DXP: jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver jdbc.default.url=jdbc:mysql://localhost:3306/liferay_dxp?serverTimezone=Europe/Istanbul&useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false jdbc.default.username=root jdbc.default.password=1 5. Copy the data/document_library folder from Liferay 6.2 to DXP. 6. Disable indexing. Create file osgi/config/com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.config wit