Issue
- When creating content, such as a calendar event or filling a form, changing the language during the process can cause the loss of all entered information.
- This can happen if another browser window or tab is open in a different language, or if the language is changed manually using the language selector widget, leading to a redirection to a different language URL.
- The redirection's success message can be misleading, especially when creating events or submitting forms. Users might believe the process has completed successfully, even though no data has been saved.
- The following error might appear in the logs:
Unable to process portlet com_liferay_calendar_web_portlet_CalendarPortlet: com.liferay.calendar.exception.NoSuchCalendarException: No Calendar exists with the primary key 0 javax.portlet.PortletException: com.liferay.calendar.exception.NoSuchCalendarException: No Calendar exists with the primary key 0
Environment
- Liferay DXP 7.4+
Resolution
- This behavior is by design due to the component's implementation.
- To avoid data loss, use a private browsing window when accessing the portal in different languages. This isolates language sessions, preventing unintentional redirections and data loss.