legacy-knowledge-base
公開されました Jun. 30, 2025

テーマのデプロイ後にログインできない

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

learn-legacy-article-disclaimer-text

問題

  • テーマジェネレーターで作成したカスタマイズのないOOTBテーマをデプロイした後にログインしようとすると、白い画面とフリーマーカーの例外エラーが発生します:
    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

解決策

  • この問題を解決するには、以下の手順でテーマを作成してください:
    1. yo liferay-theme" を実行する
    2. 新しいテーマに移動する
    3. package.jsonの以下のdevDependenciesを更新する:
      1. "liferay-frontend-theme-styled":"6.0.63",
      2. "liferay-frontend-theme-unstyled":"6.0.52",
    4. yarn "を実行し、依存関係をインストール/更新する。
    5. yarn build "を実行してテーマを構築する
    6. テーマをデプロイするために "gulp deploy "を実行する。
    7. ビルド・フォルダー内のportal normal.ftlをチェックし、40行目に "<#if !is_signed_in && show_sign_in>" が含まれていることを確認する。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base