When working on Liferay DXP a few years back, our team was stuck with an issue where a portlet that got deployed, could not be deleted from the UI, because of unavailability of “Remove”.
If you have been stuck with something similar in past, there is a quick workaround I found, that served the purpose. Though, I believe, there could be a better way to handle this, but with limited knowledge of the platform, I came up with the solution as below. I understand that the same method can also be implemented in Liferay 7, which is the free community version.
1. Select some other Portlet’s Option menu
Go to some other portlet’s options and hover your mouse on the remove Option of that portlet. Right Click on the Remove option here and copy the URL from here.
2. Analyze the URL and find Locate Portlet ID
From the captured URL, find the portlet ID in the URL. This is the unique ID of the portlet that you want to delete. It would look something as below:
3. Replace your Portlet’s ID and Open the URL
As you now have a URL to remove a portlet, you just need to replace the p_p_id parameter of the URL with the one for the portlet instance that you are trying to remove but cannot.
Once you open this new URL in browser, your bad portlet will be deleted and no more visible in the UI.
I hope this small tip proves to be useful for people out there who face similar issue with their Liferay DXP development.