[FORWARD PORT] LPS-50840 SF

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