Forums de discussion

Issue with display of porltets in the Control Panel

Seeya S Kudtarker, modifié il y a 10 années.

Issue with display of porltets in the Control Panel

Regular Member Publications: 187 Date d'inscription: 16/01/13 Publications récentes
Sometimes I face this issue and do not understand what to do.
Even though I include the following statements in my xml file (liferay-portlet.xml)
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
the portlet is not shown in my control panel. It has been happening with the new projects that i create and sometimes with few healthy portlets which were getting displayed before.

Is there a solution if this problem persists? And any idea why does this happen?
thumbnail
jaid shaik, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

Regular Member Publications: 171 Date d'inscription: 08/10/10 Publications récentes
HI Seeya S Kudtarker,

can you please try below code:

<portlet>
		<portlet-name>portletname</portlet-name>
		<icon>/icon.png</icon>
		<control-panel-entry-category>content</control-panel-entry-category>
          <control-panel-entry-weight>1.5</control-panel-entry-weight>
		<layout-cacheable>true</layout-cacheable>
		<add-default-resource>true</add-default-resource>
	</portlet>


or

<portlet>
		<portlet-name>portletname</portlet-name>
		<icon>/icon.png</icon>
		<control-panel-entry-category>my</control-panel-entry-category>
		<layout-cacheable>true</layout-cacheable>
		<add-default-resource>true</add-default-resource>
	</portlet>


Both are working for me.....am using liferay 6.1.1 C.E GA2

I think it helps you.
Seeya S Kudtarker, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

Regular Member Publications: 187 Date d'inscription: 16/01/13 Publications récentes
jaid shaikh

When I try the following:

<portlet>
<portlet-name>receiver</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
<layout-cacheable>true</layout-cacheable>
<add-default-resource>true</add-default-resource>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>receiver-portlet</css-class-wrapper>
</portlet>


I get error since the format is not proper.

So i removed <add-default-resource> but still it doesn't get displayed in the control panel
thumbnail
Rahul Pande, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

Expert Publications: 310 Date d'inscription: 07/07/10 Publications récentes
Hi Seeya,

Every tag in liferay-portlet.xml has fixed position, so you must put tags in specific manner.

The problem with your xml is you are not putting <add-default-resource></add-default-resource> at proper location, so you are getting format is not proper error.

Please update your file with following code.

<portlet>
		<portlet-name>receiver</portlet-name>
		<icon>/icon.png</icon>
		<control-panel-entry-category>content</control-panel-entry-category>
		<control-panel-entry-weight>1.5</control-panel-entry-weight>
		<layout-cacheable>true</layout-cacheable>
		<instanceable>false</instanceable>
		<header-portlet-css>/css/main.css</header-portlet-css>
		<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
		<css-class-wrapper>receiver-portlet</css-class-wrapper>
		<add-default-resource>true</add-default-resource>
	</portlet>



HTH
Rahul
Seeya S Kudtarker, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

Regular Member Publications: 187 Date d'inscription: 16/01/13 Publications récentes
Hi Rahul,

No it doesn't work with the order you gave. It doesn't display my portlet at all.

It had happened with my other portlets which were getting displayed but suddenly are not present in the panel

Now I create new projects and try to display in the control panel but they are not shown.
Abhi M, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

Junior Member Publications: 28 Date d'inscription: 29/02/12 Publications récentes
Hi Seeya,

Please use following sample(change as per your need) in liferay-portlet.xml

<portlet>
<portlet-name>myCustomPortlet</portlet-name>
<icon>/icon.png</icon>
<portlet-data-handler-class>

</portlet-data-handler-class>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1</control-panel-entry-weight>
<control-panel-entry-class>
The name of a class that implements the ControlPanelEntry interface.
It’s not necessary to specify the class but depends on our requirement.
</control-panel-entry-class>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>myCustomPortlet-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>


Also, if you don't want your portlet to appear in the Add Menu so that it is not put on other pages, then in your liferay-display.xml you can include:
<display>
<category name="category.hidden">
<!--
Adding your portlet to the hidden category would not display
the portlet in the ADD Menu on the top-left-hand corner
-->
<portlet id="myCustomPortlet"></portlet>
</category>
</display>


Thanks
thumbnail
Rahul Pande, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

Expert Publications: 310 Date d'inscription: 07/07/10 Publications récentes
Hi Seeya,

Please have a look at attached sample portlet.

Thanks
Rahul
Aalap Desai, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

New Member Publications: 14 Date d'inscription: 16/09/11 Publications récentes
Hi Seeya,

If the problem is with the order the best way to check the sequence from liferay-portlet-app_6_1_0.dtd.

In this file getting the detail information of every node we are using in the liferay-portlet.xml
I hope this will help you.

Thanks,
Aalap Desai.
Seeya S Kudtarker, modifié il y a 10 années.

RE: Issue with display of porltets in the Control Panel

Regular Member Publications: 187 Date d'inscription: 16/01/13 Publications récentes
Hi Aaalap,

Thanks for the reply.
No it isn't with the order.
Here is the snippet of the portlet--

<portlet>
<portlet-name>receiver</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
<layout-cacheable>true</layout-cacheable>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>receiver-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>
CHARLES RILEY, modifié il y a 9 années.

RE: Issue with display of porltets in the Control Panel

New Member Envoyer: 1 Date d'inscription: 28/05/12 Publications récentes
I was just reviewing this myself. I noticed that there was previously a bug which hid portlets having the same "control-panel-entry-weight". You might try changing portlets which are currently hidden to new weights - instead of 1.5, change to 1.7 or 7.9. Good luck.