Steps to reproduce:
- Make sure the site-initializer/site-initializer-masterclass is deployed.
- Go to Virtual Instances > Add Virtual Instance
- Fill in all the fields
- Select Masterclass in the drop down to initialize the instance
- Wait until the instance is initialized
- Assert that no errors are shown in the logs
- Now create a new virtual instance with the same initializer, using the portal instances API:
Expected behavior: Logs show no errors
Current behavior: Console show errors
- When the fragments of the master pages are processed by the PortletFragmentEntryProcessor, the HTML of the widgets is obtain with portletFragmentRenderer.renderPortlet. This method obtains the httpServletResponse from the fragmentEntryProcessorContext.
- When creating a virtual instance in the UI, the response exists
- When creating a virtual instance with the headless API, the response is null. As a result, the master page is not processed, and the virtual instance default site (initialized with the site initializer) fails to render correctly.