0
votes

I am using Liferay 6.1 (bundled with Tomcat 7.0.23) and Portlet with JSR 286.

I am able to add portlet onto the Liferay page, but am unable to remove it.

It is a simple portlet with a single button on it.

The problem is I am able to add multiple instances of the same portlet on a single page. Even after I shutdown and restart the server, the old added portlets are still there on the page.

3
are you able to remove other portlets (liferay portlets) from the page i.e. by clicking on the x icon on right-hand-top corner of every portlet?Prakash K
I have the similar problems with liferay 5.x, we called this portlets the "Ghost-Portlets". And we have extended liferay core to solve it :)Mark
@Mark: thanks for the reply but I am using Liferay 6.1.Sameer

3 Answers

5
votes

I use a bit of hack for such portlets for which I dont see close option. Hover over on any portlet for which you see the close icon on the same page and copy its link

http://localhost:8080/c/portal/update_layout?p_l_id=10141&p_p_id=56_INSTANCE_B9Xt&doAsUserId=&cmd=delete&referer=%2Fc%2Fportal%2Flayout%3Fp_l_id%3D10141%26doAsUserId%3D&refresh=1

Replace the value of p_p_id of the above url with the name of the portlet and then hit this url in the browser.

2
votes

First of all, Let me know what you need, meaning do you need if your portlet has multiple instances on same page or not.

If you want that your portlet should have multiple instances then you have to make that portlet as instanceable portlet by specifying <instanceable>true</instanceable> in your liferay-portlet.xml, by default the value is false.

Also, You need to check following items to remove the portlet:

  • Do you have rights (permissions) to remove the portlet. (like, admin, or similar custom role if created)
  • Please check the checkbox at the top of the page (on the dockbar) named Toggle Edit Control.
  • Portlet should not be included from theme.
0
votes

You have to go to the left side vertical menu and click on "Modify Controls" where you see the covered eye. After this, you can see on all the portlets the settings Icon and you can remove each of them.