17 mins
Jun 25, 2024
Liferay- a free and open source enterprise portal software product has one of the most flexible Web Content Management System (WCM). The WCM in Liferay offers a number of features to the users to build websites and portals. It includes assembly of themes, portlets, pages, common navigation and many more. One such important feature is Staging feature of Liferay WCM that we are going to discuss here.
The concept of Staging is quite simple- you can modify the site behind the scenes and publish all the updates in just one shot. The Liferay staging environment provides you an interface to make changes on a specialized staging area. Once you are done with the changes, you can publish all the changes at once on your site. Liferay provides the site administrators with two different ways for setting up staging- Local Live and Remote Live.
In the Local Live Staging, both the staging environment and the live environment are being hosted on the same server. The site administrators can enable Staging for a site via the Site Settings UI. Navigate to the Site Administration → Configuration page of your site, make sure Site Settings is highlighted in the left menu, and click on Staging listed under the Advanced tab. Under Staging Type, select either Local Live or Remote Live and additional options appear. Staging allows changes to be made in a staging environment so that work can be reviewed, possibly using a workflow, before it’s published to a live site.
In this, the remote (live) Liferay server and the local (staging) Liferay server should be completely separate systems. When Remote Live staging is enabled, all the necessary information is transferred over the network connecting the two servers.
You need to specify an authentication key to be shared by your current and your remote server and enable each Liferay server’s tunneling servlet authentication verifier. You can make all of these configurations in your Liferay servers’ portal-ext.properties files.
tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP,[Remote server IP address] axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP,192.168.0.16,[Remote server IP address] tunneling.servlet.shared.secret=[secret] auth.verifier.TunnelingServletAuthVerifier.hosts.allowed=
tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP,[Local server IP address] axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP,192.168.0.16,[Local server IP address] tunneling.servlet.shared.secret=[secret] auth.verifier.TunnelingServletAuthVerifier.hosts.allowed=
When you add custom field with the Remote Live Staging, an error is being generated. It has been explained below in detail.
com.liferay.portal.lar to ALL com.thoughtworks.xstream.XStream to ALL
[PortletDataContextImpl:2291][/api/liferay/do] com.thoughtworks.xstream.converters.ConversionException: [Ljava.lang.String; : [Ljava.lang.String;
--- Debugging information ---- _message : [Ljava.lang.String; _cause-exception : com.thoughtworks.xstream.security.ForbiddenClassException _cause-message : [Ljava.lang.String; _class : java.util.HashMap _required-type : java.util.HashMap _converter-type : com.thoughtworks.xstream.converters.collections.MapConverter _path : /map/entry/string-array _line number : 4 _version : 1.4.7 ------------------------------- [Sanitized]
As in Liferay 6.2 they added some permission like “PrimitiveTypePermission”,” AnyTypePermission” etc…