When a plugin portlet is deployed to a non-standard context (e.g. by setting recommended-deployment-context=) adding the portlet via the add menu (which uses an ajax render portlet request, will fail to properly load js/css resources.
Subsequent rendering of the portlet with a full page refresh does not result in the same issue.
- What you need is a portlet with some resources defined in one or more of these liferay-portlet.xml settings (microblogs-portlet is ideal):
- in that portlet edit the liferay-plugin-package.properties file
- add recommended-deployment-context=<some different context name> property
- deploy the plugin
- then add the portlet to the page via the "Add menu"
- it should result in 404 errors in the browser (you may have to use a network debuging tool to see the network errors)
- the result of the error will be that the dependent js and or css in those resources is not loaded which may cause either js errors or UI to not render how it should