DevelopmentQuestions related to development for Liferay Portal and Liferay Commerce such as new widget creation and theme developmenthttps://liferay.dev/en/c/message_boards/find_category?p_l_id=119785333&mbCategoryId=1201816062024-03-19T06:09:57Z2024-03-19T06:09:57Z"Your request failed to complete", when submitting terms of useFrederick Schuberthttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224671092024-03-18T21:30:38Z2024-03-14T12:39:57Z<p>Hello!</p>
<p>We have an issue when a newly created user accepts the terms of use.
After the redirect to the main page we get alot of error toast
messages "Your request failed to complete". Unfortunately no
error is logged to catalina.out. Even when setting the Log Level of
"com.liferay", nothing unusual appears. After relogging in
the errors do not appear. Can someone point me in the right direction
how I can investigate further? The issue occured after updating from
Liferay 7.3.5 to 7.4.0.106. The database was upgradeded via script. We
mostly use vanilla Liferay except our liferay theme, which was rebuild
for 7.4 with the liferay theme generator.</p>
<p>Kind regards,<br> Frederick</p>Frederick Schubert2024-03-14T12:39:57ZRight way of removing Liferay's default Document Typestxapeldot .https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224669802024-03-14T10:47:48Z2024-03-14T10:47:46Z<p>I'm facing a task consisting of preventing the Liferay's default
Document Types from being creating when starting the Portal. The
situation is well explaind in this <a
href="https://stackoverflow.com/questions/16734571/how-to-create-default-document-types-and-metadata-sets-in-liferay-6/16738726#comment137780665_16738726">post</a>,
as well as the two possible solutions proposed.</p>
<p>Regarding the solutions proposed, I'd like to mention that in recent
versions of Portal CE instances there is no track of the value
'com.liferay.portal.events.AddDefaultDataAction' for the property
'application.startup.events' within the file 'portal.properties'. In
fact, the only properties that can be found within the 'Start Events'
section of the 'portal.properties' are:</p>
<pre>
<code class="language-java">global.startup.events=com.liferay.portal.events.GlobalStartupAction,com.liferay.portal.events.CryptoStartupAction
application.startup.events=com.liferay.portal.events.AppStartupAction,com.liferay.portal.events.ChannelHubAppStartupAction</code></pre>
<p>Therefore, and althouh I suspect the default Document Types are
created within the class
'com.liferay.portal.events.GlobalStartupAction', it's no completely
clear from me. Any clarification to this respect would be appreciated.</p>
<p>Moreover, in this <a
href="https://help.liferay.com/hc/en-us/articles/360020495551-Removing-Sample-Document-Types-in-the-Documents-and-Media-Repository">post</a>
it's stated that there is the option to disable the creation of these
default Document Types by unchecking the option 'Add Default
Structures' through the Liferay's Control Panel. To this respect, the
questions that arise to me are:<br> 1) by unchecking the option ‘Add
Default Structures’, do we prevent only just the default Document
Types from being created, or, on the contrary, do we prevent other
Liferay default “items” from being created?<br> 2) is there is a way
of preventing the default Document Tyes from being created by using a
property to be set in 'portal-ext.properties' file?</p>
<p>If answer to question 2) is that there is no way, then, and since
ext-plugins is something not recommended by Liferay, I wonder what is
the best approach to accomplish the task of deleting the default
Document Types.</p>
<p>Looking forward to reading some clarification.</p>txapeldot .2024-03-14T10:47:46ZWindow.scrollY does not workYash Dhadukhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224668042024-03-18T21:28:34Z2024-03-14T09:08:29Z<p>Window.scrollY does not work in the page fragment. Please tell me how
to solve this problem?</p>
<p>and window.onscroll is also not working</p>
<p>How to add click to top button in Liferay and set if window.scrollY
> 700 then show this button else hide</p>Yash Dhaduk2024-03-14T09:08:29ZHow to customize the search bar?Marco Stimolihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224645622024-03-13T18:11:01Z2024-03-13T13:05:29Z<p>Good morning,<br> I am using Liferay community 7.4 ga103. I created
my pernsonalized search bar in html and css. I want to apply this
style to the Liferay widget "Search bar" and keep all the
search functionality of the widget. How can i do this?<br> (Even
creating a new portlet that does the search would work for me).<br> Thanks</p>Marco Stimoli2024-03-13T13:05:29ZPass aui:form action value form one portlet to another portletSahaya Sofiahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224642722024-03-18T21:25:36Z2024-03-13T08:55:29Z<p>I use <liferay-portlet:actionURL> tag for pass form action
values from x portlet to y portlet but I getting a error on console
403 (Forbidden)</p>
<p>
<br> <liferay-portlet:actionURL var="upload"
name="ShowAdd_Cart" anchor=""
encrypt="false"<br>
portletName="cart_details_Cart_detailsPortlet"
portletMode="view" windowState="normal"><br> </liferay-portlet:actionURL></p>
<p>POST
http://localhost:8080/wishlist?p_p_id=cart_details_Cart_detailsPortlet&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&_cart_details_Cart_detailsPortlet_javax.portlet.action=ShowAdd_Cart&p_auth=iPOUwO6q
403 (Forbidden)</p>Sahaya Sofia2024-03-13T08:55:29Zhow we configure docker Liferay properties file to connect with PostgreSQLUttpal Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224641912024-03-13T18:09:19Z2024-03-13T07:22:09Z<p>i use docker desktop in docker i pull the Liferay server but how we
configure to connect with PostgreSQL. because i try to configure ext.
properties and setup.wizard.properties but it not working. also i
connect docker with liferay devloper studio and try to configure but
same issue faced.</p>
<p>i tried to create manually properties file also i try to configure
default properties file in file i use jdbc connection and also try to
docker jdbc connection but the properties file are not working like i
set true to setup.wizard.properties file then start server but after
start server directly open the Liferay home after that i check the
setup.wizard.properties file it stay true.</p>Uttpal Kumar2024-03-13T07:22:09ZEdit Web Content Screen lacks functionality migrating Liferay 6.2 to 7.2Sumair Ahmedhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224625322024-03-13T18:08:03Z2024-03-12T07:54:05Z<p>Why was the option to change the structure or template removed in
Liferay 7.2, and what alternative steps can be taken to achieve
similar functionality as in Liferay 6.2?<br>
<b>Edit Web Content Screen in Liferay 6.2</b>
</p>
<p> </p>
<p>
<img alt="image.png" src="https://chat.google.com/u/0/api/get_attachment_url?url_type=FIFE_URL&content_type=image%2Fpng&attachment_token=AOo0EEWSRue0uwR2afqTirsUCg%2FjZiDAqlC3pZXr9xnbePb1N5UlawyOPxep7cLaaQ2I4aBcCdaTOpF2twudeWwi2Uw7eM%2BI8yER6XiEOdV3Q4MHaMng1dS6xRc%2BvVJbOyVkRCnXCYDojWb1e5cWnETJJO6Idirh4%2Bb5qD%2FjSETyhL1zJrHmuhZ8%2FZQwaOEHwoS2p7iQTII0TNZMd2prevxcaXGFBwcHe2VMWfZgax%2FM18BfNL6mxvRnJMREFlzolG7kjru7Do8b%2BfNQF2%2FKkHgPy8yuY5bwm4sOTNV8XFu1xkjD6xbPspCEneiLYzyQ08e1vqBaK4qL2FOx0CRGvBwKh7PFuxflmbTffyIZxGeMjXbJVK6GtRyRXuzVubLZcMQmvxj%2FoVILp1Y5Qw%2BYF9CaVwsR2sR6hVRRhVW9m3UCJFIOaHb0nS5IcLKAcTyIwwTMZYo%2BB1ea8y9qmAL%2Bc8ec1y2psGHdQ%2FDKrSjtyOv%2BdDwGsSHO%2BZbNVshFySOPpK8LwE2Ff58wytJ0%2B9Scec%2FT4KGM0FhkqWfo7SqL7KbAC7pJqohBIL8WERXAWEN0bZK0JA%3D%3D&sz=w512">
</p>
<p> </p>
<p><b>Edit Web Content Screen in Liferay 7.2</b>
</p>
<p>
<img alt="image.png" src="https://chat.google.com/u/0/api/get_attachment_url?url_type=FIFE_URL&content_type=image%2Fpng&attachment_token=AOo0EEWbwZcT3XzD8zWLw55PPLXRPxccybulG1wlIIu0AKaeYBNmR2ZkWSe9OjLHyJr2NjCq5yYbv4R24CxwznKXCHxWp6lcr1WP57QYbpd8da4mY7M1hUVn0qnrnec7UgDhLWc5e7m2JUFU%2F75DL9%2F1aUCuKULK810iziwkgoqz%2F4rxnLf5zDyP%2F5EQrygDtyuudh9%2FZkuoWo1mL%2B2rul7y5b2i2CPjPEaXj8yff4Y7CeIMU7uf8wPuji0lWCW3A0czCPScLG3nak%2BCL1TaXJURMszr4938N5PnGaGvqVaOdro07ewMKQTet8DGY8u22lvM8qNXUewUDOHaUwaVPMjda%2BRV%2BuCVIGoZ1bGeJpjN5CItU%2BLHoG4n0ifRAgiZN1m3yDwxnGNVJGUg8oafOZPr1mJR%2Bywzrh9qWzShGHnp%2FD18cJbT7B5ouKPprMhbuu2IAKV%2F30DdH6BYQT1dMj%2BWijJecuCLvpBjcxc3MVE%2BzRtmjATPwb4I4unmg4JxF3BIPnWA1wZDExcl3qk6rgDU4kS5CmPAYoCVmS5CirKixfg5Tv67hzhooKXF0MdFJyG0gQ%3D%3D&sz=w512"></p>Sumair Ahmed2024-03-12T07:54:05ZRE: RE: Adding structured-content through headless API (part2)Jonathan HELLhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224562422024-03-08T15:36:59Z2024-03-08T13:19:13Z<p>Thank you Fernando, you answer helped me a lot.</p>
<p>I came across another issue giving me an error message "Invalid
available locales set for field name". For those wondering what
is going on, the structure you are using MUST be translated in order
for the API call to work. I don't know why but Liferay seems to check
if the structure locales match the contentFieldValue locales. I
doesn't make sense but it works.</p>
<p>So if you get the message "Invalid available locales set for
field name", be sure to:</p>
<ol>
<li>Send the correct Accept-Language header</li>
<li>Have translations available for the structure you are using (contentStructureId)</li>
</ol>
<p>Jonathan.</p>Jonathan HELL2024-03-08T13:19:13ZRE: RE: Arabic text indexingMarco Stimolihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224542662024-03-07T17:23:48Z2024-03-07T13:25:11Z<p>I tried to extract the text from the pdf and it is extracted. Except
that sometimes there are differences between the words in the PDF and
the words extracted, and consequently when searching for the word
extracted from the PDF it is not found (because the extracted word is
"transformed" in another word).</p>Marco Stimoli2024-03-07T13:25:11ZRE: RE: Liferay Tomcat Bundle Remove stdout log file in the Tomcat directoryOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224520932024-03-06T17:28:01Z2024-03-06T17:28:00Z<p>Make sure your own code is not using System.out.println or similar.
Rather use proper logging.</p>Olaf Kock2024-03-06T17:28:00ZRE: How i can publish the site?Olaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224520352024-03-07T17:23:52Z2024-03-06T17:26:44Z<p>Most likely, you're running a Tomcat bundle. Tomcat is an
application- or web-server. You can basically follow any instruction
set that you find for Tomcat, but use the Liferay bundle instead.</p>
<p>Or, if you run a docker container, follow dockerized installation
instructions. Though: Make sure you mount persistent volumes where you
need them.</p>
<p>https://learn.liferay.com/ has all the Liferay-specific information,
but as "how to host a server on the internet" is not
specific, this part isn't covered there.</p>
<p>If the commercial version is a good option, contacting Liferay Sales
for the PaaS offering (ready-to-go cloud hosted) is a good
alternative. Though its price tag is certainly far above a
hobby-hosting situation. If you're hosting this installation for an
enterprise: This gets you up quickly.</p>Olaf Kock2024-03-06T17:26:44ZRE: Arabic text indexingOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224519732024-03-06T17:23:06Z2024-03-06T17:23:05Z<p>For PDFs it's hard to say, as it's internally not necessarily text,
but can be quite graphical (depending on the program that created the
PDF in the first place). PDF, in its core, is Postscript - so there
might be all kinds of escape sequences and positioning information in
between single letters/glyphs.</p>
<p>Try to extract text with some of the available tools or services and
see what it reveals. It might show that your PDF indeed is not text,
but an image.</p>Olaf Kock2024-03-06T17:23:05ZCheck user permission in rest builder servicesAntonino Modicahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224507652024-03-06T17:00:28Z2024-03-06T10:28:11Z<p>Which is the best way to expose a rest service which take the userid
as parameter and return true/false based on if the user has a certain
role? ( i am using portal session token x-csrf as authentication
method). I need it to show/hide some information on a react portlet.</p>Antonino Modica2024-03-06T10:28:11ZAnyway to get Access Token without passwordSrikanth Sanivarapuhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224493032024-03-06T16:56:00Z2024-03-05T18:20:19Z<p>Hi Team,</p>
<p>I am looking for getting an access token (OAuth2.0) on Liferay 7.4
without passing password to access REST APIs. Are there any ways to
get the accessToken without passing password from the Postman. Thanks.</p>
<p>Regards,<br> Srikanth</p>Srikanth Sanivarapu2024-03-05T18:20:19ZOrganization Portlet should not (always) display all organisationsPentti Koskelahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224457882024-03-05T16:42:08Z2024-03-04T08:57:05Z<p>
<strong>Liferay-ticket</strong>: https://help.liferay.com/hc/en-us/requests/102104</p>
<p>The ticket has the attachments and findings. Please read that.</p>
<p> </p>
<p>We have a problem that customer, who has access and rights
to <strong>selected</strong> organizations, can
see <strong>all</strong> organizations when updating user info.</p>
<p>This is troubling because now these users can see other customer
organizations that use the same portal.</p>
<p>We are uncertain is this an error in the portlet or do we have wrong
permissions etc. We suspect some update or hotfix has changed the logic.</p>
<p> </p>
<p>Steps to produce the error:</p>
<ol>
<li>Customer main user opens Users and Organizations Portlet</li>
<li>Selects Organization</li>
<li>Selects user and clicks Edit (step3.png)</li>
<li>Select Organizations from the left-hand side menu (step4.png)</li>
<li>Click Select (step5.png)</li>
</ol>
<p>
<strong>Expected outcome:</strong>
</p>
<p>The organizations list should also have organizations the user is
assigned to</p>
<p>
<strong>Actual outcome:</strong>
</p>
<p>The user can see <strong>all </strong>organizations</p>
<p>
<strong>Current production version:</strong>
</p>
<pre>
Product information:
* build number: 7413
* product version: 7.4 DXP Update 88
* patching-tool version: 3.0.38
* time: 2024-01-17 11:29Z
* host: liferay-6bcbc6947b-ppljk (12 cores)
Currently installed patches: hotfix-3478-7413</pre>Pentti Koskela2024-03-04T08:57:05ZArabic text indexingMarco Stimolihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224338122024-03-05T16:39:11Z2024-02-29T13:34:23Z<p>I have an Arabic text. I have the same text in two formats: pdf and
txt.<br> The content of the txt document is indexed well, so even if I
search for a single word/phrase it is found.<br> While the content of
the pdf document is not indexed well. Some times the word/phrase I am
looking for is found, other times it is not. Can anyone help me?</p>Marco Stimoli2024-02-29T13:34:23ZRE: Doubt with api for creating userMarco Stimolihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224332592024-03-05T16:39:15Z2024-02-29T07:59:05Z<p>Hi Daniel,<br> What format do you want the language id in?<br> If you
want it for example as "en_EN" you can use ThemeDisplay.</p>
<pre>
<code class="language-java">ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
Locale locale = themeDisplay.getLocale();</code></pre>
<p> </p>Marco Stimoli2024-02-29T07:59:05ZHow i can publish the site?Marco Stimolihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224332302024-03-05T16:39:22Z2024-02-29T07:46:42Z<p>I developed a site with Liferay portal 7.4.<br> I want to publish it
online. I purchased a domain. Does anyone know the steps to take?<br>
For example, I write www.example.com on browser and find my site.</p>Marco Stimoli2024-02-29T07:46:42ZRE: Liferay Tomcat Bundle Remove stdout log file in the Tomcat directoryAnish Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224307732024-02-28T07:53:51Z2024-02-28T07:52:18Z<p>I have set swallowOutput to true in the
tomcat/conf/Catalina/localhost/ROOT.xml Context XML and now the
default thread logs are not adding to the stdout file. </p>
<p>Only logs from other threads are getting added to this file</p>
<p> </p>Anish Kumar2024-02-28T07:52:18ZLiferay Tomcat Bundle Remove stdout log file in the Tomcat directoryAnish Kumarhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1224305652024-02-28T06:41:33Z2024-02-28T06:41:32Z<p>Hi All,</p>
<p>I am trying to remove the stdout log file created in the folder
<strong>LiferayHome/tomcat-9.0.75/logs/lifer