Issue
- When custom content in "Terms of Use" is set via Instance Configuration in Control Panel, and logging in as a new user for the first time, a NullPointerException is seen.
Environment
- DXP 7.4
Resolution
- The Terms of Use code expects and requires a
<section />
tag withcontent
id to exist, and when this id is not found, it will trigger a NullPointerException error. - Verify that the theme has a
<section />
tag withcontent
id, such as seen in Liferay's unstyled theme:
Liferay's classic theme has a slightly different tag declaration (but otherwise the same content):<section id="content">
<h2 class="hide-accessible sr-only" role="heading" aria-level="1">${htmlUtil.escape(the_title)}</h2>
<#if selectable>
<@liferay_util["include"] page=content_include />
<#else>
${portletDisplay.recycle()}
${portletDisplay.setTitle(the_title)}
<@liferay_theme["wrap-portlet"] page="portlet.ftl">
<@liferay_util["include"] page=content_include />
</@>
</#if>
</section>
<section class="${portal_content_css_class} flex-fill" id="content">
Additional Information
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In