Hide Forgot
Description of problem: Attempt to edit a portlet on a page is not properly handled if the portlet is not deployed. Such an action leads to several exceptions and error messages. Steps to Reproduce: 1. Deploy a portlet of your choice on your EPP instance (I used JSF RI portlet from the portletbridge directory). 2. Go to Group > Administration > Application Registry and import the portlet. 3. Add the portlet on a page. 4. Undeploy the portlet. 5. Go to that page again. You should see org.gatein.pc.api.NoSuchPortletException since the portlet is no longer available. 6. Go to Site Editor > Edit Page. You will see several "Could not find portlet" messages in the server log. 7. Click the pencil icon to edit your undeployed portlet. You will see the "Loading" dialog and NPE in the server log. 8. The dialog will be there for a while so just click "Abort". 9. Click the "Finish" button in the page editor to go back to your page. You will see an error dialog saying "Action process encountered an error". 10. Click "Ok". 11. If the "Edit portlet" dialog wasn't shown until now (i.e. you performed the steps quickly enough), it's still waiting to be rendered. Navigate to a page of your choice, e.g. Application Registry (or simply refresh the page you're on). You can see that the "Edit Portlet" dialog appears at this point. 12. The portlet can be edited now. Attempt to save the changes leads to another NPE and an error dialog with the "Unknown error" message.
Created attachment 568938 [details] NPE from the server log which appears after clicking "Edit Portlet" button.
Created attachment 568939 [details] NPE from the server log after saving the changes.
Created attachment 568945 [details] Error message appearing after finishing page editing.
Created attachment 568946 [details] Edit portlet dialog rendered on a different page.
Created attachment 568947 [details] Error message appearing when trying to save the changes.
Compared with EPP 5.2.0.GA to determine if it's a regression and 5.2.0 responds to the error in a slightly different way: Ad steps to reproduce: 1-6: The same result. 7: No dialog is shown, but you hit the NPE. 8+: Attempt at closing the page editor results in the following error: ERROR [portal:PortalRequestHandler] Error while handling request org.exoplatform.groovyscript.TemplateRuntimeException: Groovy template exception at DataText[pos=Position[col=1,line=58],data= String msgValue = mess.getMessage();] for template system:/groovy/webui/core/UIPopupMessages.gtmpl ...and no action in the UI happens, the only way to exit the editor is to save the changes. Having done that, you are back at the page with your portlet, but the portal is broken. Wherever you navigate, you get the following error: ERROR [portal:PortalRequestHandler] Error while handling request org.exoplatform.groovyscript.TemplateRuntimeException: Groovy template exception at DataText[pos=Position[col=14,line=25],data=uicomponent.renderChildren();] for template system:/groovy/portal/webui/workspace/UIPortalApplicationChildren.gtmpl ...and the portal styles and scripts are not loaded properly.