Bug 801824 - Editing of undeployed portlets leads to multiple errors
Editing of undeployed portlets leads to multiple errors
Status: CLOSED WONTFIX
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal (Show other bugs)
5.2.1.ER01
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Default User
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-09 10:22 EST by Miroslav Cupák
Modified: 2015-01-05 06:59 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-06 07:39:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
NPE from the server log which appears after clicking "Edit Portlet" button. (7.25 KB, text/x-log)
2012-03-09 10:26 EST, Miroslav Cupák
no flags Details
NPE from the server log after saving the changes. (7.20 KB, text/x-log)
2012-03-09 10:28 EST, Miroslav Cupák
no flags Details
Error message appearing after finishing page editing. (18.14 KB, image/png)
2012-03-09 10:31 EST, Miroslav Cupák
no flags Details
Edit portlet dialog rendered on a different page. (106.77 KB, image/png)
2012-03-09 10:32 EST, Miroslav Cupák
no flags Details
Error message appearing when trying to save the changes. (114.82 KB, image/png)
2012-03-09 10:33 EST, Miroslav Cupák
no flags Details

  None (edit)
Description Miroslav Cupák 2012-03-09 10:22:32 EST
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.
Comment 1 Miroslav Cupák 2012-03-09 10:26:06 EST
Created attachment 568938 [details]
NPE from the server log which appears after clicking "Edit Portlet" button.
Comment 2 Miroslav Cupák 2012-03-09 10:28:47 EST
Created attachment 568939 [details]
NPE from the server log after saving the changes.
Comment 3 Miroslav Cupák 2012-03-09 10:31:49 EST
Created attachment 568945 [details]
Error message appearing after finishing page editing.
Comment 4 Miroslav Cupák 2012-03-09 10:32:52 EST
Created attachment 568946 [details]
Edit portlet dialog rendered on a different page.
Comment 5 Miroslav Cupák 2012-03-09 10:33:55 EST
Created attachment 568947 [details]
Error message appearing when trying to save the changes.
Comment 6 Miroslav Cupák 2012-03-15 12:54:35 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.