Foren

Custom Field Error in Control Panel

thumbnail
Rochad Tlusty, geändert vor 11 Jahren.

Custom Field Error in Control Panel

Junior Member Beiträge: 42 Beitrittsdatum: 18.01.12 Neueste Beiträge
So we have modified our liferay-portlet.xml to remove some of the default portlets. The problem now is that when I go to Control Panel > Portal > Custom fields, it has an uncaught exception, and returns the following in the stack trace

15:24:47,038 ERROR [IncludeTag:426] Current URL /community/group/control_panel/manage?p_p_id=139&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10452&refererPlid=10456 generates exception: java.lang.NullPointerException
15:24:47,040 ERROR [IncludeTag:154] java.lang.NullPointerException
	at com.liferay.portal.model.impl.PortletImpl.getCustomAttributesDisplayInstances(PortletImpl.java:1265)
	at com.liferay.portal.service.impl.PortletLocalServiceImpl.getCustomAttributesDisplays(PortletLocalServiceImpl.java:323)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
	at com.liferay.portal.service.PortletLocalServiceUtil.getCustomAttributesDisplays(PortletLocalServiceUtil.java:322)
	at org.apache.jsp.html.portlet.expando.view_jsp._jspService(view_jsp.java:521)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)


What in the liferay-portlet.xml file could have caused this behaviour?
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: Custom Field Error in Control Panel

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Nothing that's left in it, you probably removed something that you shouldn't have.

Removing the canned portlets is typically unnecessary. Users cannot add them to the pages you administer, and they typically don't hurt anything if they drop them on their own private/public pages.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Custom Field Error in Control Panel

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Exactly which portlets did you try to delete. If possible, attach your liferay-portlet.xml here.
Deleting user adminstration portlet will cause errors.
thumbnail
Rochad Tlusty, geändert vor 11 Jahren.

RE: Custom Field Error in Control Panel

Junior Member Beiträge: 42 Beitrittsdatum: 18.01.12 Neueste Beiträge
I tried my best not to remove any portlets that would cause unwanted behaviour, but I guess I wasn't careful enough emoticon. I've attached our liferay-portlet.xml, again thanks for the help.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Custom Field Error in Control Panel

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Seems you've just disable some. Just have to go back and delete the tags to find out which one is causing the problem.
thumbnail
Rochad Tlusty, geändert vor 11 Jahren.

RE: Custom Field Error in Control Panel

Junior Member Beiträge: 42 Beitrittsdatum: 18.01.12 Neueste Beiträge
Yup that's what I'm doing now, I will post back when I figure it out in case anyone else has similar problems.
thumbnail
Rochad Tlusty, geändert vor 11 Jahren.

RE: Custom Field Error in Control Panel

Junior Member Beiträge: 42 Beitrittsdatum: 18.01.12 Neueste Beiträge
The problem was cause because several portlets in the liferay-portlet.xml file have <custom-attributes-display> tags. Even if the portlet is not loaded, it appears that these attributes are somehow registered, then the custom field UI in the control panel is rendered unusable. Can anyone confirm if this is actually a bug?
Madasamy P, geändert vor 7 Jahren.

RE: Custom Field Error in Control Panel

Junior Member Beiträge: 90 Beitrittsdatum: 27.07.16 Neueste Beiträge
Hi

I have the same problem when adding <custom-attributes-display> in liferay-portlet.xml
But I want it to enabling custom fields for my portlet
If i remove the <custom-attributes-display>
The custom fields in control panel works otherwise it doesn't.
So please let me know the solution