[TECH SUPPORT] LPS-42820 Asset publisher error when changing language after displaying content in another page using virtualhost

Hi Julio,

I have created LPS-42822 as a subtask for refactoring a logic from a couple of places because I wanted to use the same logic in LPS-42820.

Technically I handle the use case when the layoutURL will be empty because the page is accessed via a virtual host.

Please review my changes.

Thanks,
Ákos