<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [opencms-dev] Error Saving Page: This document is "page", but it should be "XMLTEMPLATE"</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Hello,</FONT>
</P>
<P><FONT SIZE=2>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.</FONT></P>
<P><FONT SIZE=2>I'm not sure if it is the same problem in your case, but please check title properties of your templates.</FONT>
</P>
<P><FONT SIZE=2>Best regards,</FONT>
<BR><FONT SIZE=2> Lukas</FONT>
</P>
<P><FONT SIZE=2>P.S.</FONT>
<BR><FONT SIZE=2>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.</FONT></P>
<P><FONT SIZE=2>-------------------</FONT>
<BR><FONT SIZE=2>£ukasz Bott</FONT>
<BR><FONT SIZE=2>Datacom Software</FONT>
<BR><FONT SIZE=2>tel. 0 601 912 017</FONT>
<BR><FONT SIZE=2>-------------------</FONT>
</P>
<P><FONT SIZE=2>>-----Original Message-----</FONT>
<BR><FONT SIZE=2>>From: Thomas Gagné [<A HREF="mailto:tgagne@wideopenwest.com">mailto:tgagne@wideopenwest.com</A>] </FONT>
<BR><FONT SIZE=2>>Sent: Thursday, February 12, 2004 5:03 PM</FONT>
<BR><FONT SIZE=2>>To: opencms-dev@opencms.org</FONT>
<BR><FONT SIZE=2>>Subject: [opencms-dev] Error Saving Page: This document is </FONT>
<BR><FONT SIZE=2>>"page", but it should be "XMLTEMPLATE"</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>I was going through the template example with a coworker and </FONT>
<BR><FONT SIZE=2>>am getting </FONT>
<BR><FONT SIZE=2>>some odd errors.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>After creating the master template and my own template, whenever I try </FONT>
<BR><FONT SIZE=2>>to edit a PAGE that uses it I'm unable to quit the sourcecode editor. </FONT>
<BR><FONT SIZE=2>> The page gets created, and the sourcecode editor will start </FONT>
<BR><FONT SIZE=2>>up (showing </FONT>
<BR><FONT SIZE=2>>only "<![CDATA[ ]]>"), but I can't quit the source code editor </FONT>
<BR><FONT SIZE=2>>because I </FONT>
<BR><FONT SIZE=2>>get the error/traceback below.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>I even tried creating a page using the how-to templates as the master </FONT>
<BR><FONT SIZE=2>>and got the same error.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>If I try editing the simple-page.html from the template tutorial I get </FONT>
<BR><FONT SIZE=2>>the same error trying to quit the document.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>com.opencms.core.CmsException: 20 Wrong XML content type. Detailed </FONT>
<BR><FONT SIZE=2>>error: XML document /system/modules/gagne.tgagne/second.html is not of </FONT>
<BR><FONT SIZE=2>>the expected type. This document is "page", but it should be </FONT>
<BR><FONT SIZE=2>>"XMLTEMPLATE" (OpenCms XML template file)..</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.A_CmsXmlContent.throwException(A_CmsXmlCon</FONT>
<BR><FONT SIZE=2>>tent.java:1943)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.A_CmsXmlContent.init(A_CmsXmlContent.java:1165)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.A_CmsXmlContent.init(A_CmsXmlContent.java:1029)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.CmsXmlTemplateFile.<init>(CmsXmlTemplateFi</FONT>
<BR><FONT SIZE=2>>le.java:107)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.CmsXmlTemplate.getOwnTemplateFile(CmsXmlTe</FONT>
<BR><FONT SIZE=2>>mplate.java:399)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.workplace.CmsXmlTemplateEditor.getContent(CmsXmlTem</FONT>
<BR><FONT SIZE=2>>plateEditor.java:460)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.cache.CmsElementXml.getContent(CmsElementX</FONT>
<BR><FONT SIZE=2>>ml.java:171)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.cache.CmsUri.callCanonicalRoot(CmsUri.java:185)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.template.cache.CmsElementCache.callCanonicalRoot(Cm</FONT>
<BR><FONT SIZE=2>>sElementCache.java:149)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLaunch</FONT>
<BR><FONT SIZE=2>>er.java:285)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:341)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:274)</FONT>
<BR><FONT SIZE=2>> at com.opencms.core.OpenCms.showResource(OpenCms.java:961)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>com.opencms.core.OpenCmsHttpServlet.doPost(OpenCmsHttpServlet.java:331)</FONT>
<BR><FONT SIZE=2>> at javax.servlet.http.HttpServlet.service(HttpServlet.java)</FONT>
<BR><FONT SIZE=2>> at javax.servlet.http.HttpServlet.service(HttpServlet.java)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilte</FONT>
<BR><FONT SIZE=2>>r(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardPipeline$StandardPipelineValve</FONT>
<BR><FONT SIZE=2>Context.invokeNext(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardPipeline$StandardPipelineValve</FONT>
<BR><FONT SIZE=2>Context.invokeNext(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.StandardContext.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardPipeline$StandardPipelineValve</FONT>
<BR><FONT SIZE=2>Context.invokeNext(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardPipeline$StandardPipelineValve</FONT>
<BR><FONT SIZE=2>Context.invokeNext(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardPipeline$StandardPipelineValve</FONT>
<BR><FONT SIZE=2>Context.invokeNext(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.catalina.core.StandardPipeline$StandardPipelineValve</FONT>
<BR><FONT SIZE=2>Context.invokeNext(Unknown </FONT>
<BR><FONT SIZE=2>>Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.coyote.http11.Http11Processor.process(Http11Processo</FONT>
<BR><FONT SIZE=2>r.java:594)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler</FONT>
<BR><FONT SIZE=2>.processConnection(Http11Protocol.java:392)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoin</FONT>
<BR><FONT SIZE=2>t.java:565)</FONT>
<BR><FONT SIZE=2>> at </FONT>
<BR><FONT SIZE=2>>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(T</FONT>
<BR><FONT SIZE=2>hreadPool.java:619)</FONT>
<BR><FONT SIZE=2>> at java.lang.Thread.run(Thread.java:536)</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>>_______________________________________________</FONT>
<BR><FONT SIZE=2>>This mail is send to you from the opencms-dev mailing list</FONT>
<BR><FONT SIZE=2>>To change your list options, or to unsubscribe from the list, </FONT>
<BR><FONT SIZE=2>>please visit <A HREF="http://mail.opencms.org/mailman/listinfo/opencms-dev" TARGET="_blank">http://mail.opencms.org/mailman/listinfo/opencms-dev</A></FONT>
<BR><FONT SIZE=2>></FONT>
</P>
</BODY>
</HTML>