<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Session errors are not visible inside portal_normal.ftl</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121332643" />
  <subtitle>Session errors are not visible inside portal_normal.ftl</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121332643</id>
  <updated>2026-04-04T22:03:23Z</updated>
  <dc:date>2026-04-04T22:03:23Z</dc:date>
  <entry>
    <title>RE: RE: Session errors are not visible inside portal_normal.ftl</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121340396" />
    <author>
      <name>Nikita Laitinen</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121340396</id>
    <updated>2022-01-24T07:55:23Z</updated>
    <published>2022-01-24T07:55:23Z</published>
    <summary type="html">&lt;p&gt;I'm trying to create 404 page as I did it on 7.0 liferay.&lt;br /&gt;
  &lt;br /&gt; 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.&lt;/p&gt;</summary>
    <dc:creator>Nikita Laitinen</dc:creator>
    <dc:date>2022-01-24T07:55:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Session errors are not visible inside portal_normal.ftl</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338571" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338571</id>
    <updated>2022-01-21T14:41:31Z</updated>
    <published>2022-01-21T14:41:30Z</published>
    <summary type="html">&lt;p&gt;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).&lt;/p&gt;
&lt;p&gt;Please start with stating the problem that you're trying to solve.
  Maybe someone here can suggest a different and better solution for it.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2022-01-21T14:41:30Z</dc:date>
  </entry>
  <entry>
    <title>Session errors are not visible inside portal_normal.ftl</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121332642" />
    <author>
      <name>Nikita Laitinen</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121332642</id>
    <updated>2022-01-18T09:44:37Z</updated>
    <published>2022-01-18T08:40:34Z</published>
    <summary type="html">&lt;p&gt;Hello&lt;br /&gt;
  &lt;br /&gt; I use liferay 7.4 (doing migration from 7.0 to 7.4 right now)&lt;br /&gt;
  &lt;br /&gt; I'm trying to get &lt;strong&gt;no such resource exception&lt;/strong&gt;
  error inside theme (portal normal file)
    using &lt;strong&gt;staticUtil[&amp;quot;com.liferay.portal.kernel.servlet.SessionErrors&amp;quot;]
  &lt;/strong&gt;but i could not. This object is available but i can not print
  any session errors using code below&lt;br /&gt;  &lt;/p&gt;
&lt;p&gt;&amp;lt;#list SessionErrors.keySet(request) as item&amp;gt;&lt;/p&gt;
&lt;p&gt;     &amp;lt;#assign exception = item[item?last_index_of(&amp;quot;.&amp;quot;) +
  1..] &amp;gt;&lt;/p&gt;
&lt;p&gt;     &amp;lt;#if exception?starts_with('NoSuch') &amp;amp;&amp;amp;
  exception?ends_with('Exception') &amp;gt;&lt;/p&gt;
&lt;p&gt;         my logic here&lt;/p&gt;
&lt;p&gt;     &amp;lt;/#if&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/#list&amp;gt;&lt;br /&gt;
  &lt;br /&gt; (The code above works on liferay 7.0)&lt;br /&gt;
  &lt;br /&gt; Could someone help me please??&lt;br /&gt;
  &lt;br /&gt; Update: SessionErrors.size(request) is 0, i dont know why, i'm
  on 404 page seeing liferay notification - not found, it is weird&lt;/p&gt;</summary>
    <dc:creator>Nikita Laitinen</dc:creator>
    <dc:date>2022-01-18T08:40:34Z</dc:date>
  </entry>
</feed>
