Bugfix
I have created a form template for one type
and would now like to use and extend it in a subtype. However, when I select the template in the form editor, I get an internal error:
2024-01-26T15:05:03,314 ERROR [qtp1878700101-204]: com.top_logic.util.error.ErrorHandlingHelper - S(node0105cf11qi4u9a12trqv8yalbi44) Command 'dispatchControlCommand' failed. com.top_logic.util.error.TopLogicException: Internal error at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatchCommand(CommandDispatcher.java:216) at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatch(CommandDispatcher.java:132) at com.top_logic.mig.html.layout.CommandDispatcher.dispatchCommand(CommandDispatcher.java:125) at com.top_logic.base.services.simpleajax.AJAXServlet.processRequest(AJAXServlet.java:688) at com.top_logic.base.services.simpleajax.AJAXServlet.doPost(AJAXServlet.java:358) at javax.servlet.http.HttpServlet.service(HttpServlet.java:665) at com.top_logic.util.TopLogicServlet.doService(TopLogicServlet.java:338) at com.top_logic.util.TopLogicServlet.inContext(TopLogicServlet.java:195) at com.top_logic.util.TopLogicServlet$1.inContext(TopLogicServlet.java:270) at com.top_logic.util.TLContextManager.inInteractionInternal(TLContextManager.java:245) at com.top_logic.util.TLContextManager.inInteraction(TLContextManager.java:221) at com.top_logic.util.TopLogicServlet.enterContext(TopLogicServlet.java:265) at com.top_logic.util.TopLogicServlet.service(TopLogicServlet.java:158) at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1459) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656) at com.top_logic.knowledge.gui.layout.HttpSecureHeaderFilter.doFilter(HttpSecureHeaderFilter.java:66) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.IllegalArgumentException: Item is already an entry in another container. Item: <config config:interface="com.top_logic.element.layout.formeditor.definition.GroupDefinition" xmlns:config="http://www.top-logic.com/ns/config/6.0" class="com.top_logic.element.layout.formeditor.implementation.GroupDefinitionTemplateProvider" > <field attribute="name" fullQualifiedName="myModule:Named#name" type="tl.core:String" /> <field attribute="id" fullQualifiedName="myModule:Named#id" type="tl.core:String" /> <label key="dynamic.a627fe49-ce94-4fdc-ad25-5bb4ee694660"> <en>Basic information</en> <en>Basic information</en> </label> </config> This container: <config config:interface="com.top_logic.model.form.definition.FormDefinition" xmlns:config="http://www.top-logic.com/ns/config/6.0" class="com.top_logic.model.form.implementation.FormDefinitionTemplateProvider" > <group> <field attribute="name" fullQualifiedName="myModule:Named#name" type="tl.core:String" /> <field attribute="id" fullQualifiedName="myModule:Named#id" type="tl.core:String" /> <label key="dynamic.a627fe49-ce94-4fdc-ad25-5bb4ee694660"> <en>Basic information</en> <en>Basic information</en> </label> </group> </config>, other container: <config config:interface="com.top_logic.model.form.definition.FormDefinition" xmlns:config="http://www.top-logic.com/ns/config/6.0" class="com.top_logic.model.form.implementation.FormDefinitionTemplateProvider" > <group> <field attribute="name" fullQualifiedName="myModule:Named#name" type="tl.core:String" /> <field attribute="id" fullQualifiedName="myModule:Named#id" type="tl.core:String" /> <label key="dynamic.a627fe49-ce94-4fdc-ad25-5bb4ee694660"> <en>Basic information</en> <en>Basic information</en> </label> </group> <group> <field attribute="tType" fullQualifiedName="tl.model:TLObject#tType" type="tl.model:TLType" visibility="read-only" /> <label key="dynamic.76f439c6-bf91-4b4a-a487-8ea000ea5f92"> <en>Further information</en> <en>Further information</en> </label> </group> </config> at com.top_logic.basic.config.container.ConfigPartUtilInternal.checkHasNoContainer(ConfigPartUtilInternal.java:151) at com.top_logic.basic.config.container.ConfigPartUtilInternal.initContainerInternal(ConfigPartUtilInternal.java:143) at com.top_logic.basic.config.container.ConfigPartUtilInternal.initContainer(ConfigPartUtilInternal.java:111) at com.top_logic.basic.config.ChangeEvent.add(ChangeEvent.java:99) at com.top_logic.basic.config.PropertyList.internalAdd(PropertyList.java:129) at com.top_logic.basic.config.PropertyList.addAll(PropertyList.java:71) at com.top_logic.basic.config.PropertyList.addAll(PropertyList.java:57) at com.top_logic.basic.config.MutableConfigItem.internalUpdate(MutableConfigItem.java:143) at com.top_logic.basic.config.AbstractConfigItem.update(AbstractConfigItem.java:246) at com.top_logic.basic.config.SimpleSetter.invoke(SimpleSetter.java:26) at com.top_logic.basic.config.ReflectiveConfigItem.invoke(ReflectiveConfigItem.java:426) at com.sun.proxy.$Proxy521.setContent(Unknown Source) at com.top_logic.element.layout.formeditor.DisplayFormEditorBuilder$3.valueChanged(DisplayFormEditorBuilder.java:185) at com.top_logic.layout.form.model.AbstractFormField.fireValueChanged(AbstractFormField.java:1390) at com.top_logic.layout.form.model.AbstractFormField.fireValueChanged(AbstractFormField.java:1117) at com.top_logic.layout.form.model.AbstractFormField.internalSetValue(AbstractFormField.java:544) at com.top_logic.layout.form.model.AbstractFormField.deliverValue(AbstractFormField.java:492) at com.top_logic.layout.form.model.FormFieldInternals.setValue(FormFieldInternals.java:59) at com.top_logic.layout.form.control.DropDownControl.deliverValue(DropDownControl.java:586) at com.top_logic.layout.form.control.DropDownControl$DropDownItemSelected.execute(DropDownControl.java:560) at com.top_logic.layout.basic.AbstractControlBase.executeCommand(AbstractControlBase.java:975) at com.top_logic.layout.basic.component.ControlSupport.executeCommand(ControlSupport.java:223) at com.top_logic.layout.basic.component.ControlComponent$DispatchAction.handleCommand(ControlComponent.java:233) at com.top_logic.tool.boundsec.CommandHandlerUtil.handleCommand(CommandHandlerUtil.java:32) at com.top_logic.mig.html.layout.LayoutComponent.dispatchCommand(LayoutComponent.java:3046) at com.top_logic.mig.html.layout.CommandDispatcher.internalDispatchCommand(CommandDispatcher.java:194) ... 51 more
Test
- Define type A with subtype B.
- Define a form for A.
- In the form editor of B, select the form of A as the template.