Session errors are not visible inside portal_normal.ftlSession errors are not visible inside portal_normal.ftlhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1213326432024-03-29T09:13:26Z2024-03-29T09:13:26ZRE: RE: Session errors are not visible inside portal_normal.ftlNikita Laitinenhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213403962022-01-24T07:55:23Z2022-01-24T07:55:23Z<p>I'm trying to create 404 page as I did it on 7.0 liferay.<br />
<br /> Inside portal_normal I check session errors and in the case
there is 404 i show user custom 404 web content (load web content
instead of liferay content) + i hide footer that is defined inside
portal_normal + i hide some other params that are defined inside head section.</p>Nikita Laitinen2022-01-24T07:55:23ZRE: Session errors are not visible inside portal_normal.ftlOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213385712022-01-21T14:41:31Z2022-01-21T14:41:30Z<p>The natural place for application (widget-) specific error messages
to live is within that widget. Evaluation order for template vs widget
is not defined, and can even happen in different HTTP Requests - so
while you might have been lucky that it happened to work in a previous
versions, I'd say that the approach is rather wrong and relies on
random implementation details (that have obviously changed).</p>
<p>Please start with stating the problem that you're trying to solve.
Maybe someone here can suggest a different and better solution for it.</p>
<p>In fact, I can't rule out a full redirect (e.g. a new request) for
404 or other error pages, that don't have any more connection to the
past request.</p>Olaf Kock2022-01-21T14:41:30ZSession errors are not visible inside portal_normal.ftlNikita Laitinenhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213326422022-01-18T09:44:37Z2022-01-18T08:40:34Z<p>Hello<br />
<br /> I use liferay 7.4 (doing migration from 7.0 to 7.4 right now)<br />
<br /> I'm trying to get <strong>no such resource exception</strong>
error inside theme (portal normal file)
using <strong>staticUtil["com.liferay.portal.kernel.servlet.SessionErrors"]
</strong>but i could not. This object is available but i can not print
any session errors using code below<br /> </p>
<p><#list SessionErrors.keySet(request) as item></p>
<p> <#assign exception = item[item?last_index_of(".") +
1..] ></p>
<p> <#if exception?starts_with('NoSuch') &&
exception?ends_with('Exception') ></p>
<p> my logic here</p>
<p> </#if></p>
<p></#list><br />
<br /> (The code above works on liferay 7.0)<br />
<br /> Could someone help me please??<br />
<br />