[opencms-dev] OpenCms 6.0.x editor, relative links, and XML

DI Gunther Schmidl schmidl at webdynamite.com
Mon Feb 13 11:08:48 CET 2006


Hi all,

I've run into the exact same problem that Philipp mentions in his post from
Friday: the OpenCms structured content WYSIWYG editor replaces relative
links with absolute links when re-opening any given OpenCms content file.
This only happens on Internet Explorer.

Steps to reproduce:

- create a new XML Content of type Article (although it happens in any other
structured content)
- edit the article, switch to source mode, and type something like <a
href="test">test</a>
- save and close the article

At this point, if you edit the file's control code, it still looks correct:

    <Text name="Text0">
      <links>
        <link name="link0" type="A" internal="false">
          <target><![CDATA[test]]></target>
        </link>
      </links>
      <content><![CDATA[<a href="${link0}">test</a>]]></content>
    </Text>

Upon re-opening the file in the Structured Content editor and switching to
source code mode, however, the source now looks as follows:

     <a
href="http://127.0.0.1:8787/opencms/opencms/system/workplace/editors/xmlcont
ent/test">test</a> 

For a second before the editor switches to WYSIWYG mode, you can see the old
link correctly -- the replacement must take place there. As mentioned, this
only happens on Internet Explorer, not on Firefox. On saving and exiting,
the control code now looks wrong, too:

    <Text name="Text0">
      <links>
        <link name="link0" type="A" internal="false">
 
<target><![CDATA[http://127.0.0.1:8787/opencms/opencms/system/workplace/edit
ors/xmlcontent/test]]></target>
        </link>
      </links>
      <content><![CDATA[<a href="${link0}">test</a> ]]></content>
    </Text>

Anyone have an idea what the problem is? This seems like a bug to me.

Thanks,

-- Gunther




More information about the opencms-dev mailing list