• automaticly adding metadata when creating a doc doesn't work

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #55082  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
Attachments
metadata-group
(14.01 KiB) Downloaded 194 times
automation config and error messages
(92.13 KiB) Downloaded 227 times
systemdetails
(22.1 KiB) Downloaded 212 times
logs
(39.48 KiB) Downloaded 177 times
 #55088  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
 #55090  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 all
UI 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)
 #55093  by alromas
 
Code: Select all
2026-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

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.