Legacy Knowledge Base
Published Jun. 30, 2025

Cannot login after deploying a theme

Written By

Debora Vita

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • We get a white screen and a freemarker exception error when trying to login after deploying an OOTB theme with no customizations created via the theme generator:
    2023-05-26 13:32:51.826 ERROR [http-nio-8080-exec-5][runtime:59] Error executing FreeMarker template
    freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
    ==> sign_in_url  [in template "my-liferay-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl" at line 40, column 89]
    ----
    Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
    ----
    ----
    FTL stack trace ("~" means nesting-related):
    	- Failed at: ${sign_in_url}  [in template "my-liferay-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl" at line 40, column 87]
    ----
    	at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134) ~[bundleFile:?]
    	at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:479) ~[bundleFile:?]
    	at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:401) ~[bundleFile:?]
    	at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:370) ~[bundleFile:?]
    	at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100) ~[bundleFile:?]
    	at freemarker.core.DollarVariable.accept(DollarVariable.java:63) ~[bundleFile:?]
    	at freemarker.core.Environment.visit(Environment.java:331) ~[bundleFile:?]
    	at freemarker.core.Environment.visit(Environment.java:337) ~[bundleFile:?]
    	at freemarker.core.Environment.visit(Environment.java:337) ~[bundleFile:?]
    	at freemarker.core.Environment.process(Environment.java:310) ~[bundleFile:?]
    	at freemarker.template.Template.process(Template.java:383) ~[bundleFile:?]

Environment

  • DXP 7.4

Resolution

  • To resolve the issue follow these steps to create the theme:
    1. Run "yo liferay-theme"
    2. Navigate to the new theme
    3. Update the following devDependencies in package.json:
      1. "liferay-frontend-theme-styled": "6.0.63",
      2. "liferay-frontend-theme-unstyled": "6.0.52",
    4. Run "yarn" to install/update dependencies
    5. Run "yarn build" to build the theme
    6. Run "gulp deploy" to deploy the theme
    7.  Check portal normal.ftl in the build folder to confirm that line 40 includes "<#if !is_signed_in && show_sign_in>"

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base