[opencms-dev] Error Saving Page: This document is "page", but it should be "XMLTEMPLATE"

Bott, Lukasz Lukasz.bott at datacom.pl
Thu Feb 12 17:47:02 CET 2004


Hello,

I've been fighting this problem for last few days. In my case it appeared
that templates, I had created, had apostrophe (') character in their names.
When I removed that character, everything ran ok. I mean there are no more
problems with creating and using templates.

I'm not sure if it is the same problem in your case, but please check title
properties of your templates.

Best regards,
 Lukas

P.S.
More details about that apostrophe character. When I tried to edit a sample
html page in WYSIWYG editor, a JavaScript error appeared. JavaScript
controls the work of the editor. The error was caused by the method
"document.write(...)" which generates the template combobox list in top menu
of the editor. This method takes a string argument enclosed, at least in
this case, with apostrophes. So, when I started editing the page using my
template with apostrophe in its title, the process of generating the
template list crashed. The JavaScript interpreter thought that it was the
end of the string and shouted that ')' character was expected to close
method's invocation, but in real there were much more characters for the
method's argument.

-------------------
Łukasz Bott
Datacom Software
tel. 0 601 912 017
-------------------

>-----Original Message-----
>From: Thomas Gagné [mailto:tgagne at wideopenwest.com] 
>Sent: Thursday, February 12, 2004 5:03 PM
>To: opencms-dev at opencms.org
>Subject: [opencms-dev] Error Saving Page: This document is 
>"page", but it should be "XMLTEMPLATE"
>
>
>I was going through the template example with a coworker and 
>am getting 
>some odd errors.
>
>After creating the master template and my own template, whenever I try 
>to edit a PAGE that uses it I'm unable to quit the sourcecode editor. 
> The page gets created, and the sourcecode editor will start 
>up (showing 
>only "<![CDATA[ ]]>"), but I can't quit the source code editor 
>because I 
>get the error/traceback below.
>
>I even tried creating a page using the how-to templates as the master 
>and got the same error.
>
>If I try editing the simple-page.html from the template tutorial I get 
>the same error trying to quit the document.
>
>
>com.opencms.core.CmsException: 20 Wrong XML content type. Detailed 
>error: XML document /system/modules/gagne.tgagne/second.html is not of 
>the expected type. This document is "page", but it should be 
>"XMLTEMPLATE" (OpenCms XML template file)..
>    at 
>com.opencms.template.A_CmsXmlContent.throwException(A_CmsXmlCon
>tent.java:1943)
>    at 
>com.opencms.template.A_CmsXmlContent.init(A_CmsXmlContent.java:1165)
>    at 
>com.opencms.template.A_CmsXmlContent.init(A_CmsXmlContent.java:1029)
>    at 
>com.opencms.template.CmsXmlTemplateFile.<init>(CmsXmlTemplateFi
>le.java:107)
>    at 
>com.opencms.template.CmsXmlTemplate.getOwnTemplateFile(CmsXmlTe
>mplate.java:399)
>    at 
>com.opencms.workplace.CmsXmlTemplateEditor.getContent(CmsXmlTem
>plateEditor.java:460)
>    at 
>com.opencms.template.cache.CmsElementXml.getContent(CmsElementX
>ml.java:171)
>    at 
>com.opencms.template.cache.CmsUri.callCanonicalRoot(CmsUri.java:185)
>    at 
>com.opencms.template.cache.CmsElementCache.callCanonicalRoot(Cm
>sElementCache.java:149)
>    at 
>com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLaunch
>er.java:285)
>    at 
>com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:341)
>    at 
>com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:274)
>    at com.opencms.core.OpenCms.showResource(OpenCms.java:961)
>    at 
>com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)
>    at 
>com.opencms.core.OpenCmsHttpServlet.doPost(OpenCmsHttpServlet.java:331)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>    at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilte
>r(Unknown 
>Source)
>    at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown 
>Source)
>    at 
>org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValve
Context.invokeNext(Unknown 
>Source)
>    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>    at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValve
Context.invokeNext(Unknown 
>Source)
>    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>    at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>    at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValve
Context.invokeNext(Unknown 
>Source)
>    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown 
>Source)
>    at 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValve
Context.invokeNext(Unknown 
>Source)
>    at 
>org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValve
Context.invokeNext(Unknown 
>Source)
>    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>    at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
>    at 
>org.apache.catalina.core.StandardPipeline$StandardPipelineValve
Context.invokeNext(Unknown 
>Source)
>    at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>    at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>    at 
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>    at 
>org.apache.coyote.http11.Http11Processor.process(Http11Processo
r.java:594)
>    at 
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler
.processConnection(Http11Protocol.java:392)
>    at 
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoin
t.java:565)
>    at 
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(T
hreadPool.java:619)
>    at java.lang.Thread.run(Thread.java:536)
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, 
>please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040212/ae437562/attachment.htm>


More information about the opencms-dev mailing list