7.0.X, 7.1.X, 7.2.X, Master
It's possible to cause a race condition when starting a bundle while attempting to view the portlet at the same time.
This issue can be easily reproduced following the steps on LPP-35599 (I will not link any portlets used as they are client-specific).
The problem stems from the PortletConfigFactoryImpl and PortletContextFactoryImpl classes, specifically in the create methods. When starting a bundle, we add an entry to each factory for the root portlet. This entry is valid.
However, when we render the portlet, we add in a scoped entry as well. This entry is fine if we've allowed the portlet to complete it's deployment. However, if we attempt to render the portlet between the time the root portlet is added to the factories and when the portlet has completed it's deployment, we use the undeployed versions of the context/config, which is missing much information. The solution is to check the portlet we are attempting to create context/configs for with the existing context/config and remove the old entry should it be stale.
Steps to reproduce:
- Deploy a very large custom portlet (can be found on LPP-35599)
- Once the portlet has completed deployment, add it to a page
- Verify the portlet loads correctly
- Using gogo shell, stop the bundle of the portlet and start is back up
- Immediately after the bundle begins starting back up, refresh the page with the portlet on it.
- Continue to do so until the portlet is finished deploying
Expected Results: Portlet is loaded correctly
Actual Results: Portlet is using an incorrect title and another contextual information
Master: No, however the this is because I do not have a sample portlet to test with. The code to be changed is the same between master and 71x, so I assume this issue is reproducible.
72x: No, see above
71x: Yes 2c49a080a6437cf6670e07b25e0ad115d12d9351