Posts

Showing posts from 2021

Liferay Elasticsearch Integration

Image
  Liferay Elasticsearch Integration How to Configure Remote Elasticsearch for Liferay DXP Overview Liferay DXP 7.4 comes with embedded (sidecar) Elasticsearch 7 out-of-the-box. Using sidecar implementation is not recommended for production servers due to performance and security issues. This article explains how to install and configure a remote Elasticsearch server, and connect it with Liferay 7.4. Also, you’ll find how to visualize your Elasticsearch data using the Kibana tool. Remote Elasticsearch Configuration 1. Find the required Elasticsearch version When you start Liferay - you can see two interesting things about Elasticsearch  in logs: 1) A warning, indicating that sidecar Elasticsearch is not recommended to use; 2) An URL where sidecar Elasticsearch is running Once you hit that URL - you can see the Elasticsearch version you need:  2. Download Elasticsearch Download Elasticsearch of the same version as running in Liferay from the official site: Sample link for version 7.10.2:

Liferay DXP Struts Action Override

Image
  Liferay DXP Struts Action Override Overview Struts Actions were used in Liferay 6.x as backend controllers for processing the client requests. They are deprecated already, and being replaced with MVC Commands. But there are still some struts actions inside Liferay. This article will explain how to identify and customize them.  Identify Struts Action Struts Actions are defined in ROOT/WEB-INF/struts-config.xml file, sample: < action path ="/portal/sitemap" type ="com.liferay.portal.action.SitemapAction" /> This action is responsible for sitemap creation. Sitemap can be accessed using the /sitemap.xml URL, sample: Now let’s override this struts action. Override Struts Action Create a Liferay module for struts action override: build.gradle: dependencies {    compileOnly group : "com.liferay.portal" , name : "release.portal.api"    cssBuilder group : "com.liferay" , name : "com.liferay.css.builder" , version : "3.0.

Liferay Gogo Shell Commands

  Liferay Gogo Shell Commands Overview Gogo Shell is a command-line tool for executing Felix Gogo Shell commands and Liferay commands. This article describes the main Gogo Shell commands. List Bundles Command : lb <filter> Description: list installed bundles matching a substring Sample: g! lb apps START LEVEL 20    ID|State      |Level|Name  1427|Active     |   10|Liferay Apps Manager API (1.0.0)|1.0.0  1428|Active     |   10|Liferay Apps Manager Service (1.0.0)|1.0.0  1429|Active     |   10|Liferay Apps Web (1.0.0)|1.0.0 Bundle Diagnostics Command : diag <bundle-id> Description: Displays unsatisfied constraints for the specified bundle Sample: g! diag com.liferay.apps.web com.liferay.apps.web [1429]   No resolution report for the bundle. Bundle Details Command : b <bundle-id> Description: Displays bundle details Sample: g! b com.liferay.apps.web com.liferay.apps.web_1.0.0 [1429]   Id=1429, Status=ACTIVE      Data Root=/home/vitaliy/Work/Projects/liferay/liferay-demo/