legacy-knowledge-base
公開されました Sep. 10, 2025

サインアウト時に製品ナビゲーションメニューが閉じない

written-by

Alfonso Crisci

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

問題

  • サインアウトすると、Liferay DXPは左側の製品ナビゲーションメニューの開いた状態を「記憶」し、次回ログイン時に再び開いた状態を表示します:

プロダクト_ナビゲーション_メニュー_トグル.gif

これにより、ユーザーがポータルに初めてログインしたときに、完全なWelcomeページが表示されず、ユーザーの視覚体験に影響を与える可能性があります。

環境

  • Liferay 7.0 DXP
  • Liferay 7.1 DXP

解像度

  • デフォルトの動作は、 postLogoutAction プラグインで変更することができ、ログアウト時に製品ナビゲーションメニューのステータスを「Closed」に設定します:
    public class SidebarModiferPortlet implements LifecycleAction {

    @Override
    public void processLifecycleEvent(LifecycleEvent lifecycleEvent) throws ActionException {
    SessionClicks.put(
    lifecycleEvent.getRequest(),
    "com.liferay.product.navigation.product.menu.web_productMenuState",
    "closed");

    }
    }
  • 上記のスニペットを元に作成したプラグインのソースコードをここに添付します。

追加情報

  • 上記のスニペットは、開始のヒントとして提供されるものであり、副作用なく機能することを保証するものではありません。 Liferay Supportは、それに起因する不測の事態をカバーしたり、支援したりすることはできません。
  • Liferay DXP 7.2では、商品ナビゲーションメニューのUXがリファクタリングされ、この動作は発生しなくなりました。
did-this-article-resolve-your-issue

legacy-knowledge-base