[FORWARD PORT] LPS-47816 SF

This is a forward port of https://github.com/brianchandotcom/liferay-plugins-ee/pull/9515