Foren

Remove entries from the usermenu(Product Menu) Liferay 7

thumbnail
Marco Endres, geändert vor 7 Jahren.

Remove entries from the usermenu(Product Menu) Liferay 7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
Hello Guys

I would like to remove the workflow and the submission entry from the sidebarmenu. I read this article:
https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/providing-the-user-personal-bar

But what do i have to do when i only want to remove these entries and not add one?

Thank you

Marco Endres
thumbnail
Armaz Mellati, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Junior Member Beiträge: 96 Beitrittsdatum: 30.10.09 Neueste Beiträge
Hi

That is a good question and something I think is useful for many portal implementations.
As far as I can see, it seems each of those "applications" gets there in the product-menu dynamically when you deploy an OSGI module with a specific class.

In this case it is a module with the Bundle-SymbolicName : com.liferay.portal.workflow.instance.web

Knowing that you can stop that module using the Gogo shell

All you need to do is :

telnet localhost 11311
stop com.liferay.portal.workflow.instance.web

I have not tried that myself but it seems to be worth a shot.

I hope some Liferay Staff can verify this or come up with a better way of doing it.
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
Removing that module will basically break any usage of workflow for any purpose, not just removing those menu options.






Come meet me at the LSNA!
thumbnail
Armaz Mellati, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Junior Member Beiträge: 96 Beitrittsdatum: 30.10.09 Neueste Beiträge
David H Nebinger:
Removing that module will basically break any usage of workflow for any purpose, not just removing those menu options.

Yes, I suspected that might be. In that case Liferay has done a poor job of mixing functionality/concerns. The product-menu app should definitely have its own module.

If this is not acceptable (the workflow functionality is required, but you still want to remove the apps from the menu), the simplest option I can think of is using Javascript to hide them.
thumbnail
Marco Endres, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
Thank you for your answers.

Is there no better option than remove it via Javascript?
thumbnail
Cristina Gonzalez, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

New Member Beitrag: 1 Beitrittsdatum: 09.01.14 Neueste Beiträge
Hello,
You can deactivate just the component that adds the entry to the menu in the gogo shell.

To do that follow these steps:

1. Find the Bundle "Workflow Task" in the gogo shell:

   lb | grep "Workflow Task" 


   80|Active     |   10|Liferay Portal Workflow Task Web (1.0.8) 


2. List the services of the "Workflow Task" bundle:

 scr:list 80


 
BundleId Component Name Default State Component Id State      PIDs (Factory PID)
 [  80]   com.liferay.portal.workflow.task.web.internal.application.list.MyWorkflowTaskPanelApp  enabled [ 215] [active      ] com.liferay.portal.workflow.task.web.internal.application.list.MyWorkflowTaskPanelApp.11084236-91b7-4dd5-a9d3-fa71187a7836 (com.liferay.portal.workflow.task.web.internal.application.list.MyWorkflowTaskPanelApp )
 [  80]   com.liferay.portal.workflow.task.web.internal.notifications.WorkflowTaskUserNotificationHandler  enabled [ 216] [active      ] 
 [  80]   com.liferay.portal.workflow.task.web.internal.portlet.MyWorkflowTaskControlPanelEntry  enabled [ 217] [active      ] 
 [  80]   com.liferay.portal.workflow.task.web.internal.portlet.MyWorkflowTaskPortlet  enabled [ 218] [active      ] 
 [  80]   com.liferay.portal.workflow.task.web.internal.portlet.action.AssignTaskMVCActionCommand  enabled [ 219] [active      ] 
 [  80]   com.liferay.portal.workflow.task.web.internal.portlet.action.CompleteTaskMVCActionCommand  enabled [ 220] [active      ] 
 [  80]   com.liferay.portal.workflow.task.web.internal.portlet.action.UpdateTaskMVCActionCommand  enabled [ 221] [active      ] 
 [  80]   com.liferay.portal.workflow.task.web.internal.portlet.routes.MyWorkflowTaskFriendlyURLMapper  enabled [ 222] [active      ] 


3. Deactivate the PanelApp service

  scr:disable com.liferay.portal.workflow.task.web.internal.application.list.MyWorkflowTaskPanelApp
thumbnail
Marco Endres, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
Hello Cristina

Thank you for your answer. It works fine, but when i restart the server it is enabled again. Do you have a way to keep it disabled?

thank you
thumbnail
Jamie Sammons, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Expert Beiträge: 297 Beitrittsdatum: 05.09.14 Neueste Beiträge
Hi Marco,
I think this might be due to https://issues.liferay.com/browse/LPS-66692 which was fixed in Liferay 7 CE GA3.

-Jamie
thumbnail
Marco Endres, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Regular Member Beiträge: 112 Beitrittsdatum: 22.08.12 Neueste Beiträge
Hello Jamie

I tried it with the newest version, but it didn't work :-/
Is there a way to call a gogo shell command at the startup?

thank you
thumbnail
Jamie Sammons, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Expert Beiträge: 297 Beitrittsdatum: 05.09.14 Neueste Beiträge
Hello Marco,
The only way I have been able to get it to persist has been to customize the com.liferay.portal.workflow.task.web.jar module and completely remove com.liferay.portal.workflow.task.web.internal.application.list.MyWorkflowTaskPanelApp. I deployed the custom module into the new osgi/marketplace/override directory and deleted osgi/state which allowed for the menu to stay gone for good.

Hope that helps,
Jamie
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Remove entries from the usermenu(Product Menu) Liferay 7

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
Jamie Sammons:
I deployed the custom module into the new osgi/marketplace/override directory


Note that the marketplace/override support is only available in 7.0 CE GA3 on and Liferay DXP FixPack1 on.