AW: [opencms-dev] A really weird XML Template related bug in 4.6

Hanjo Riege Hanjo.Riege at framfab.de
Tue May 14 14:49:33 CEST 2002


Hi Werner,

im not sure if i understand the problem right. 
 I don't think you need CDATA tags when editing a page. In your example you
use the method getServletPath in a page. This method is deprecated and
should not be used, specially not in a page. There you just enter the link
like <A href="/test.html" target=_self>testlink</A>. Then OpenCms will
generate the code with the link tags needed by the System: <a
href="]]><LINK><![CDATA[/test.html]]></LINK>. The servlet path is added when
the template engine generates the page. 

 If you edit a template or an element you should use "Edit Sourcecode"
instead of "Edit Html". Then you have to set the link tags by yourself. I
know the manual still uses the getServletPath method in the examles. I hope
we will find some time to correct this soon. 

I hope this helps.

Greetings

Hanjo

-----Ursprüngliche Nachricht-----
Von: Werner Punz [mailto:werpu at gmx.at]
Gesendet: Dienstag, 14. Mai 2002 13:01
An: opencms-dev at opencms.com
Betreff: [opencms-dev] A really weird XML Template related bug in 4.6


Hi I spent the last several days researching into a weird XML related bug,
which I now could nail down to OpenCMS 4.6. (I and another Guy from germany
(thanks Clemens Wilkens to test several things out for me) could reproduce
the
bug, and so far I nailed it down to several parts, where I´m not exactly
sure
which one of them causes it, but the bug is definitely caused there.

Here is the description:

Following construct:


Mastertemplate; 
<?xml version="1.0"?> 
<XMLTEMPLATE> 
<TEMPLATE> 

<ELEMENT  name = "body"/> 

</TEMPLATE> 
</XMLTEMPLATE> 


The page which uses the mastertemplate above
  
<![CDATA[ test ]]> <method name="getServletPath"/> <![CDATA[test2]]> 


What happens is that the page is resolved into something follwing construct

test ]]> 

There seems to me a bug in xml resolution, cause I have similar problems
using XML elements. This only occurs however if the page and the template
are
created new not imported from an older project.
I debugged into the system the last 3 hours and found out that the error
already occurs at the time the XML template is written from the temporary
file.
So my conclusion, it either is already written down incorrectly into the
temporary file, or there is a bug in the CmsXmlControlFile class. I haven´t
debugged into the class yet to see if my conclusions are correct. But I
would need
a comment from the OpenCMS developers regarding this problem and if it is
fixed already in the CVS tree and where!


Kind Regards Werner Punz Labor_C
http://www.labor-c.net

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net



More information about the opencms-dev mailing list