Control panel app entries duplication

thumbnail
alex wom, modified 7 Years ago. Regular Member Posts: 218 Join Date: 5/4/09 Recent Posts
I would like to create a new control panel custom entry with two sub-entries, so I created two panel-app modules with panel.category.key equal to "myEntry" in the PanelApp class. But the result is not as I want: I have something like this:


myEntry V
   entry 1
   entry 2
myEntry V


myEntry is duplicated and if I open one, one also opens the other. entry 1 and entry 2 are available only under the first myEntry...
What is the correct configuration?
thumbnail
David H Nebinger, modified 7 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
That is the right way. What version are you using? Are you on one of the later GAs?
thumbnail
alex wom, modified 7 Years ago. Regular Member Posts: 218 Join Date: 5/4/09 Recent Posts
7 CE GA5
thumbnail
Enrique Valdes Lacasa, modified 5 Years ago. Junior Member Posts: 92 Join Date: 7/29/14 Recent Posts
Hello everyone.

It looks like I'm experiencing the same issue. I added two different control panel apps with the same CONTROL_PANEL_CATEGORY  key...but unfortunately both duplicate entries are showing on the left-hand side panel:

When collapsed:

Key name >
Key name >

When expanded:

Key name
-> App 1 name
-> App 2 name
Key name
-> App 1 name
-> App 2 name

They both expand as Alex Wom mentioned.

I'm using Liferay 7.2.1-ga2-CE.

A final note I want to add: my apps are children of different Maven app modules. Should the apps belong to a common parent module to avoid this? I assume it doesn't matter, but maybe that's the reason?

Thanks in advance for any feedback.

Kind regards.
thumbnail
Enrique Valdes Lacasa, modified 5 Years ago. Junior Member Posts: 92 Join Date: 7/29/14 Recent Posts
Hello everyone.


I was able to identify the problem and found a solution:The issue with the replication of left-hand side menu categories in the Control Panel was due to multiple panel categories instances using the same key (in this case: "ABCD").

In Maven (and I assume the same goes for Gradle), Liferay uses an archetype for creating Panel Apps which generates a xxxPanelCategory class which represents the category in the left-hand side Control Panel menu where the panel app will be located.  When generating multiple panel apps, one should make sure that there is only one panel category being used for each desired panel category.

Each xxxPanelCategory class corresponds to a panel category...which they all ended up being the same, since I have given them all the SAME KEY = "ABCD". So for each panel app being deployed, the same control panel category appeared multiple times. To fix it, a unique panel category  is to be used in my case, with a custom label and a key set in the xxxPanelCategory class. After that, each xxxPanelApp class from each control panel app should refer to the key doing: 
"panel.category.key=" + "ABCD"

And that's it. I hope it helps.


Kind regards.