Legacy Knowledge Base
Published Jun. 30, 2025

'getRealUserId is not a function' when upgrading to 7.3 u6+

Written By

Jose L. Bango

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

  • When upgrading to 7.3 update 6+, some undesired behaviors occur and the console log shows the following error: 
    Uncaught TypeError: themeDisplay.getRealUserId is not a function

Environment

  • Liferay DXP 7.3 Update 6+

Resolution

  • LPS-153271 was introduced in 7.3 u6. It adds the method getRealUserId() in top_js.jspf, which is used by sessions.js.
  • Therefore, the error might be caused by a cache/temp issue or by a custom development that needs to be updated.
    • Try to clean temp directories such as [LIFERAY_HOME]/work, [TOMCAT_HOME]/temp and [TOMCAT_HOME]/work (or the equivalent ones according to your application server).
    • Double check your custom developments.
Did this article resolve your issue ?

Legacy Knowledge Base