Page 1 of 1
automaticly adding metadata when creating a doc doesn't work
PostPosted:Sat Jun 13, 2026 10:16 am
by alromas
System in short: Ubuntu 24.04.4, java 11.0.31, freshly installed OKM 7.0.1 CE
Hello,
I like to add a metadata-group whenever I create a new document. The metadata is created and can be added by hand without any problems.
First, I created a automation rule with action "AddPropertyGroup", but nothing happens when a pdf was uploaded.
Then I created another rule with action "AddPropertyGroupToWizard". After uploading a pdf, the wizard-button appears in the top. But after clicking on this button, 5 errors appears: 4 times TypeError Cannot read properties of undefined (reading 'cancelEnabled') and 1 TypeError Cannot read properties of undefined (reading '__resize_mutation_handler__'). Further information see attached files, please give me a hint, when something is missing.
How can I fix the problem? Thank you for any help.
Alexander
Re: automaticly adding metadata when creating a doc doesn't work
PostPosted:Mon Jun 22, 2026 8:34 am
by jllort
I have added an internal issue about this matter ( probably there's a bug in the wizard ).
However, the addGrooup should working. sure you have added the group in the profile? because maybe is assigned but you can not watch if you do not enable the group in the profile
Re: automaticly adding metadata when creating a doc doesn't work
PostPosted:Wed Jun 24, 2026 7:32 pm
by alromas
Yes, I have added the metadata group to the default profile.
I have retried the automation with the AddPropertyGroup. In the AddPropertyGroup-Action I've entered the full name of the group from it's definition: "okg:documentdata" in the field "Property group". But when I add a document, this error accurs:
Code: Select allUI date: 2026-06-24 19:27:01
Error name: AutomationException
Server date: 2026-06-24 19:27:01
Message: AutomationException caused by AddPropertyGroup exception
UI stack:
OKMException: AutomationException caused by AddPropertyGroup exception
at a.inputFile (http://localhost:8080/openkm/kcenter/js/app.cd48d86d.js:1:1122907)
at Fn (http://localhost:8080/openkm/kcenter/js/chunk-vendors.e7cb6382.js:74:24345)
at a.n (http://localhost:8080/openkm/kcenter/js/chunk-vendors.e7cb6382.js:74:14154)
at Fn (http://localhost:8080/openkm/kcenter/js/chunk-vendors.e7cb6382.js:74:24345)
at e.$emit (http://localhost:8080/openkm/kcenter/js/chunk-vendors.e7cb6382.js:74:30358)
at a.emitFile (http://localhost:8080/openkm/kcenter/js/chunk-vendors.e7cb6382.js:195:14371)
at a.update (http://localhost:8080/openkm/kcenter/js/chunk-vendors.e7cb6382.js:195:14213)
at XMLHttpRequest.s (http://localhost:8080/openkm/kcenter/js/chunk-vendors.e7cb6382.js:195:18026)
Server stack:
com.openkm.ws.rest.RestException: AddPropertyGroup exception
com.openkm.ws.rest.endpoint.DocumentService.create(DocumentService.java:183)
com.openkm.filter.UserLoggingFilter.doFilter(UserLoggingFilter.java:33)
com.openkm.principal.JwtFilter.doFilterInternal(JwtFilter.java:54)
Caused by: com.openkm.plugin.automation.AutomationException: AddPropertyGroup exception
com.openkm.module.db.DbDocumentModule.create(DbDocumentModule.java:332)
com.openkm.module.db.DbDocumentModule.create(DbDocumentModule.java:167)
com.openkm.module.db.DbDocumentModule.create(DbDocumentModule.java:144)
com.openkm.ws.rest.endpoint.DocumentService.create(DocumentService.java:177)
com.openkm.filter.UserLoggingFilter.doFilter(UserLoggingFilter.java:33)
com.openkm.principal.JwtFilter.doFilterInternal(JwtFilter.java:54)
Re: automaticly adding metadata when creating a doc doesn't work
PostPosted:Mon Jun 29, 2026 6:58 am
by jllort
Shate the stack trace error in the openkm.log file
Re: automaticly adding metadata when creating a doc doesn't work
PostPosted:Tue Jun 30, 2026 6:51 pm
by alromas
Code: Select all2026-06-24 19:27:01.657 ERROR 1531 --- [http-nio-0.0.0.0-8080-exec-8] o.w.r.RestResponseEntityExceptionHandler : AddPropertyGroup exception
com.openkm.ws.rest.RestException: AddPropertyGroup exception
at com.openkm.ws.rest.endpoint.DocumentService.create(DocumentService.java:183)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:555) [10 skipped]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623) [1 skipped]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) [2 skipped]
at com.openkm.filter.UserLoggingFilter.doFilter(UserLoggingFilter.java:33) [2 skipped]
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:54) [2 skipped]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:111) [15 skipped]
at com.openkm.principal.JwtFilter.doFilterInternal(JwtFilter.java:54) [23 skipped]
at io.micrometer.spring.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:107) [34 skipped]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:100) [7 skipped]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:398) [11 skipped]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:939)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1832)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:973)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:491)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.openkm.plugin.automation.AutomationException: AddPropertyGroup exception
at com.openkm.plugin.automation.AutomationManager.fireEvent(AutomationManager.java:90)
at com.openkm.module.db.base.BaseDocumentModule.create(BaseDocumentModule.java:238)
at com.openkm.module.db.DbDocumentModule.create(DbDocumentModule.java:332)
at com.openkm.module.db.DbDocumentModule.create(DbDocumentModule.java:167)
at com.openkm.module.db.DbDocumentModule.create(DbDocumentModule.java:144)
at com.openkm.ws.rest.endpoint.DocumentService.create(DocumentService.java:177)
... 129 common frames omitted
Caused by: com.openkm.plugin.automation.AutomationException: AddPropertyGroup exception
at com.openkm.plugin.automation.action.AddPropertyGroup.executePost(AddPropertyGroup.java:131)
at com.openkm.plugin.automation.AutomationManager.executeRuleActions(AutomationManager.java:118)
at com.openkm.plugin.automation.AutomationManager.fireEvent(AutomationManager.java:87)
... 134 common frames omitted
Caused by: com.openkm.plugin.automation.AutomationException: The Property Group must have at least one default value
at com.openkm.plugin.automation.action.AddPropertyGroup.executePost(AddPropertyGroup.java:125)
... 136 common frames omitted
Re: automaticly adding metadata when creating a doc doesn't work
PostPosted:Thu Jul 02, 2026 2:50 pm
by jllort
The error have been fixed in the code and you will get in the next release of the OpenKM version 7.0.3
Re: automaticly adding metadata when creating a doc doesn't work
PostPosted:Sun Jul 05, 2026 7:09 pm
by alromas
Thank you very much for the quick answer and the fix!