master-qa-8270

https://issues.liferay.com/browse/LIFERAYQA-8270
https://issues.liferay.com/browse/LIFERAYQA-8178

The LPS-45380 commit needs to be in 6.2 and 6.1, so I submitted pull requests for those.