LPS-51108 Javascript is not working when importing site pages

https://issues.liferay.com/browse/LPS-51108