Document Wizard lauching when creating document from template

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.
Post Reply
dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Document Wizard lauching when creating document from template

Post by dferguson » Thu Mar 15, 2018 3:46 pm

I have a case were the new document wizard is launching when creating a new document from a template. I don't have a automation that should trigger this.

Here is what I am seeing in the log.

Code: Select all

2018-03-15 11:37:01,757 [http-bio-10.30.40.185-8180-exec-110] [] WARN  com.openkm.util.PDFUtils - Field 'ENVELOPEID_222E529E739A4920B406B300EAFF9D2C' (value ignored because not included in map)
2018-03-15 11:37:12,418 [http-bio-10.30.40.185-8180-exec-110] [] INFO  com.openkm.dao.NodeBaseDAO - addPropertyGroup(5f030cef-52d0-497c-9946-62c3e948482a, okg:dhf)
2018-03-15 11:37:12,545 [http-bio-10.30.40.185-8180-exec-110] [] INFO  com.openkm.dao.NodeBaseDAO - addPropertyGroup(5f030cef-52d0-497c-9946-62c3e948482a, okg:docstate)
2018-03-15 11:37:12,688 [http-bio-10.30.40.185-8180-exec-110] [] INFO  com.openkm.dao.NodeBaseDAO - addPropertyGroup(5f030cef-52d0-497c-9946-62c3e948482a, okg:subsystem)
2018-03-15 11:37:20,137 [http-bio-10.30.40.185-8180-exec-114] [] WARN  com.openkm.util.ReportUtils - Report '1' has no params.xml file
2018-03-15 11:37:20,138 [http-bio-10.30.40.185-8180-exec-114] [] WARN  com.openkm.util.ReportUtils - Report '2' has no params.xml file
2018-03-15 11:37:20,140 [http-bio-10.30.40.185-8180-exec-114] [] WARN  com.openkm.util.ReportUtils - Report '3' has no params.xml file
2018-03-15 11:37:20,143 [http-bio-10.30.40.185-8180-exec-114] [] INFO  c.o.util.FormUtils$LocalResolver - resolveEntity(publicId=-//OpenKM//DTD Report Parameters 2.0//EN, systemId=http://www.openkm.com/dtd/report-parameters-2.0.dtd) => /home/openkm/tomcat-7.0.61/webapps/OpenKM/WEB-INF/classes/dtd/report-parameters-2.0.dtd
2018-03-15 11:37:24,667 [http-bio-10.30.40.185-8180-exec-105] [] WARN  com.openkm.util.ReportUtils - Report '2' has no params.xml file
2018-03-15 11:37:24,668 [http-bio-10.30.40.185-8180-exec-105] [] WARN  com.openkm.util.ReportUtils - Report '3' has no params.xml file
2018-03-15 11:37:24,671 [http-bio-10.30.40.185-8180-exec-105] [] INFO  c.o.util.FormUtils$LocalResolver - resolveEntity(publicId=-//OpenKM//DTD Report Parameters 2.0//EN, systemId=http://www.openkm.com/dtd/report-parameters-2.0.dtd) => /home/openkm/tomcat-7.0.61/webapps/OpenKM/WEB-INF/classes/dtd/report-parameters-2.0.dtd
2018-03-15 11:37:24,672 [http-bio-10.30.40.185-8180-exec-105] [] WARN  com.openkm.util.ReportUtils - Report '5' has no params.xml file
2018-03-15 11:37:24,673 [http-bio-10.30.40.185-8180-exec-105] [] WARN  com.openkm.util.ReportUtils - Report '6' has no params.xml file
2018-03-15 11:37:57,315 [http-bio-10.30.40.185-8180-exec-98] [] WARN  com.openkm.util.PDFUtils - Field 'ENVELOPEID_222E529E739A4920B406B300EAFF9D2C' (value ignored because not included in map)
2018-03-15 11:38:08,089 [http-bio-10.30.40.185-8180-exec-98] [] INFO  com.openkm.dao.NodeBaseDAO - addPropertyGroup(70eb66b9-2ead-4c63-a041-1a8a74ba5660, okg:dhf)
2018-03-15 11:38:08,206 [http-bio-10.30.40.185-8180-exec-98] [] INFO  com.openkm.dao.NodeBaseDAO - addPropertyGroup(70eb66b9-2ead-4c63-a041-1a8a74ba5660, okg:docstate)
2018-03-15 11:38:08,332 [http-bio-10.30.40.185-8180-exec-98] [] INFO  com.openkm.dao.NodeBaseDAO - addPropertyGroup(70eb66b9-2ead-4c63-a041-1a8a74ba5660, okg:subsystem)
Firstly, what is PDFUtils and why is it getting called under these circumstances?
Secondly, what is ReportUtils and why is it getting called under these circumstances?

I do NOT have an automation which would add these 3 property groups in combination and not a single automation which calls okg:subsystem at all. Why is this getting added?

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Document Wizard lauching when creating document from template

Post by dferguson » Thu Mar 15, 2018 3:56 pm

I tried creating a document from a *doc and this behavior doesn't exist. So it seems to be connected to trying to create a doc from a pdf "template". Can someone point me to why this happening and why it is adding various property groups to this action?

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Document Wizard lauching when creating document from template

Post by dferguson » Thu Mar 15, 2018 4:04 pm

I have looked into this further and found this...

https://docs.openkm.com/kcenter/view/ok ... plate.html

Is there some automated rule inherent in OpenKM when creating from a template from a PDF? Does this built in feature automatically add document wizard property groups diretcly into the pdf where the fields would be defined with the same property group information replacing the ":" with a "_"?

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Document Wizard lauching when creating document from template

Post by dferguson » Thu Mar 15, 2018 6:07 pm

Even though I don't really see a need to always partially fill out company templates with metadata, I played around with the feature using the examples and while the new document wizard does properly ask for the metadata I created I got this error...

Code: Select all

2018-03-15 14:03:27,793 [http-bio-10.30.40.185-8180-exec-181] [] ERROR c.o.servlet.frontend.DocumentServlet - Encountered "&" at line 4, column 5943 in content.xml.
Was expecting one of:
    <STRING_LITERAL> ...
    <RAW_STRING> ...
    "false" ...
    "true" ...
    <INTEGER> ...
    <DECIMAL> ...
    "." ...
    "+" ...
    "-" ...
    "!" ...
    "[" ...
    "(" ...
    ")" ...
    "{" ...
    <ID> ...
    
freemarker.core.ParseException: Encountered "&" at line 4, column 5943 in content.xml.
Was expecting one of:
    <STRING_LITERAL> ...
    <RAW_STRING> ...
    "false" ...
    "true" ...
    <INTEGER> ...
    <DECIMAL> ...
    "." ...
    "+" ...
    "-" ...
    "!" ...
    "[" ...
    "(" ...
    ")" ...
    "{" ...
    <ID> ...
    
	at freemarker.core.FMParser.generateParseException(FMParser.java:4697) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.jj_consume_token(FMParser.java:4568) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.MethodArgs(FMParser.java:905) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.AddSubExpression(FMParser.java:723) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.PrimaryExpression(FMParser.java:273) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.UnaryExpression(FMParser.java:319) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:435) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.AdditiveExpression(FMParser.java:385) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.RangeExpression(FMParser.java:556) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.RelationalExpression(FMParser.java:511) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.EqualityExpression(FMParser.java:476) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.AndExpression(FMParser.java:585) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.OrExpression(FMParser.java:608) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.Expression(FMParser.java:221) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.StringOutput(FMParser.java:1061) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.Content(FMParser.java:2575) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.OptionalBlock(FMParser.java:2786) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.Escape(FMParser.java:2302) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2445) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.Content(FMParser.java:2618) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.OptionalBlock(FMParser.java:2786) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.core.FMParser.Root(FMParser.java:2958) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.template.Template.<init>(Template.java:149) ~[freemarker-2.3.16.jar:2.3.16]
	at freemarker.template.Template.<init>(Template.java:172) ~[freemarker-2.3.16.jar:2.3.16]
	at net.sf.jooreports.templates.TemplateAndModelMerger.process(TemplateAndModelMerger.java:68) ~[jodreports-2.4.0.jar:na]
	at net.sf.jooreports.templates.AbstractDocumentTemplate.createDocument(AbstractDocumentTemplate.java:83) ~[jodreports-2.4.0.jar:na]
	at com.openkm.util.OOUtils.fillTemplate(OOUtils.java:54) ~[OOUtils.class:na]
	at com.openkm.servlet.frontend.DocumentServlet.tmpFromTemplate(DocumentServlet.java:859) ~[DocumentServlet.class:na]
	at com.openkm.servlet.frontend.DocumentServlet.createFromTemplate(DocumentServlet.java:618) ~[DocumentServlet.class:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569) [gwt-servlet-2.4.0.jar:na]
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) [gwt-servlet-2.4.0.jar:na]
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) [gwt-servlet-2.4.0.jar:na]
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) [gwt-servlet-2.4.0.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) [servlet-api.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) [servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [catalina.jar:7.0.61]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.61]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat7-websocket.jar:7.0.61]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.61]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.61]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.61]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.61]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [catalina.jar:7.0.61]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.61]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) [catalina.jar:7.0.61]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [catalina.jar:7.0.61]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.61]
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [catalina.jar:7.0.61]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.61]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) [catalina.jar:7.0.61]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) [tomcat-coyote.jar:7.0.61]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) [tomcat-coyote.jar:7.0.61]
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) [tomcat-coyote.jar:7.0.61]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_161]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_161]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.61]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_161]
Is there a way to turn off this feature when creating a new document from a PDF template. I like the idea of putting all the company templates in the "templates" stack, but I don't think we would want to always have it add metadata to the pdf templates. This is the issue I was initially having. I had not selected to include metadata at the rceataion of the new document but it somehow was adding various preexisting metadata, which was really confusing for my users.

jllort
Moderator
Moderator
Posts: 10077
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Document Wizard lauching when creating document from template

Post by jllort » Sat Mar 17, 2018 8:09 am

When you add property group in a document what is into okm:template context, the application will ask you always for filling it as a part of document creation from template. This is the standard behaviour of the feature an can not be disabled. Here the question is why you are setting metadata into templates, what is the sense ?

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Document Wizard lauching when creating document from template

Post by dferguson » Mon Mar 19, 2018 1:35 pm

Even when I don't add a property group to a pdf, the new document wizard still asks for metadata entry.

So, all documents in okm:templates goes through this behavior? I have observed that Word documents in okm:templates don't ask for metadata entry.

jllort
Moderator
Moderator
Posts: 10077
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Document Wizard lauching when creating document from template

Post by jllort » Tue Mar 20, 2018 7:32 pm

Only odt, pdf and html what can used as a templates, other mime types can not be used as templates, that's the reason.

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Document Wizard lauching when creating document from template

Post by dferguson » Wed Mar 21, 2018 1:48 pm

Well, I can still put doc files in the okm:templates and still use the "create from template" feature. However the automatic entry of metadata doesn't execute. This is fine.

However, with a pdf that has not been previously assigned a metadata group, this feature is adding metadata entries to the new document wizard in an uncontrolled manner. This is disruptive to our users. I gave evidence of this in a previous post. I would like to have users create new documents from pdf templates that do NOT add metadata to the new document wizard. How can I achieve this?

jllort
Moderator
Moderator
Posts: 10077
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Document Wizard lauching when creating document from template

Post by jllort » Fri Mar 23, 2018 6:23 pm

The wizard might be shown for two reasons, or the PDF document into the okm:templates have metadata group ( you are telling us this is not the case ) or you have some automation linked with creation event or you have enabled wizard from profiles when a document is created. Outside these conditions, the wizard is not shown.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests