Liferay 7.3 - Portlet preferences not available and Publish button resets iLiferay 7.3 - Portlet preferences not available and Publish button resets ihttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1205961182024-03-28T19:18:28Z2024-03-28T19:18:28ZLiferay 7.3 - Portlet preferences not available and Publish button resets iMichal Kormoshttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205961172021-02-16T16:01:08Z2021-02-08T19:19:07Z<p>Hello</p>
<p>I'm trying to migrate a JSF portlet from Liferay 6.2 to Liferay CE
7.3 (I need to reuse existing legacy JSF code). I tried to deploy the
portlet on the latest Liferay CE 7.3 and found out that the portlet
<strong>Preferences</strong> are not available.</p>
<p>I checked the older versions of Liferay and it seems that something
has changed between <strong>Liferay CE 7.3.1-ga2 </strong>and
<strong>7.3.2-ga3</strong> versions</p>
<ul>
<li>In<strong> 7.3.1-ga2</strong> the portlet works correctly</li>
<li>In <strong>7.3.2-ga3</strong> the portlet
<strong>Preferences</strong> are missing and are not saved correctly
(they get reset each time a page is edited and published)</li></ul>
<p>
<strong>Portlet Preferences are accessible in 7.3.1</strong></p>
<p>In 7.3.1, there is the <strong>Plus</strong> button in the top right corner.</p>
<p>
<img alt="" border="1"
src="/documents/14/0/liferay-7.3.1-add-button+%281%29.png/81c3667b-1d27-741d-fc13-8913de780bc3?t=1612949084698&imagePreview=1" width="600" /></p>
<p>When I add the portlet on the page, I can access the portlet
<strong>Preferences</strong> from the portlet menu.</p>
<p>
<img alt="" border="1"
src="/documents/14/0/liferay-7.3.1-preferences+%281%29.png/08b13795-6049-dfc7-c9c2-0fc2f8601e4a?t=1612949131878&imagePreview=1" width="600" /></p>
<p> </p>
<p>
<strong>Portlet Preferences are not available in 7.3.2</strong></p>
<p>In 7.3.2 adding of widgets slightly changed. The
<strong>Plus</strong> button was replaced with
<strong>Edit</strong> and <strong>Publish</strong> buttons.</p>
<p>
<img alt="" border="1"
src="/documents/14/0/liferay-7.3.2-edit-button+%281%29.png/18b24e34-6fea-ed84-401c-2f9684415e9f?t=1612949200599&imagePreview=1" width="600" /></p>
<p>
<img alt="" border="1"
src="/documents/14/0/liferay-7.3.2-publish-button+%281%29.png/9d981bcc-ca59-d29e-1fd4-44825c210b60?t=1612949210585&imagePreview=1" width="600" /></p>
<p>When I add the portlet on the page, I cannot access the portlet
<strong>Preferences</strong> anymore in the menu.</p>
<p>
<img alt="" border="1"
src="/documents/14/0/liferay-7.3.2-missing-preferences+%281%29.png/60beaa98-8905-5616-82f0-044f39f59e1e?t=1612949273526&imagePreview=1" width="600" /></p>
<p> </p>
<p>
<strong>Preferences in PrimeFaces Demo portlet are not saved correctly</strong></p>
<p>Then, I downloaded and deployed an official demo portlet
<strong>"PrimeFaces Applicant Portlet" </strong>from <a
href="https://mvnrepository.com/artifact/com.liferay.faces.demo/com.liferay.faces.demo.primefaces.applicant.portlet/4.2.0">https://mvnrepository.com/artifact/com.liferay.faces.demo/com.liferay.faces.demo.primefaces.applicant.portlet/4.2.0</a>
and deployed WAR on Liferay.</p>
<p>There is <strong>Edit</strong> button in the top right corner of the
Portlet which seems to replace the missing <strong>Preferences</strong> menu.</p>
<p>
<img alt="" border="1"
src="/documents/14/0/liferay-7.3.2-demo-edit-button+%281%29.png/acc989b0-0f85-b939-f64d-ceffab4fed8e?t=1612949311591&imagePreview=1" width="600" /></p>
<p> </p>
<p>The problem is that it does not work with the new
<strong>Edit</strong>/<strong>Publish</strong> concept introduced in
7.3.2 (although it worked in 7.3.1).</p>
<p>I performed the following steps (I've recorded a video and uploaded
it <a
href="https://drive.google.com/file/d/1-I22l9mNu1GvAmo1rK0o924YjPBkNojW/view?usp=sharing">here</a>
for you to have a better picture)</p>
<ul>
<li>
<p>Navigate to the portlet preferences screen</p></li>
<li>
<p>Edit and save the preferences</p></li>
<li>
<p>I can see that the preferences are saved</p></li>
<li>
<p>Click Edit button</p></li>
<li>
<p>Click Publish button</p></li>
<li>
<p>The portlet preferences are reset to default values (However, I
did not do anything special in <strong>"Edit"</strong>
mode, just clicked <strong>"Publish"</strong> immediately.</p></li></ul>
<p>Is it a bug or am I missing something?