[opencms-dev] null pointer in edit source code: v.6.0
Marcus Popetz
marcus at roundpeg.com
Wed Sep 21 22:09:37 CEST 2005
I'm getting a NullPointerExceptoin when trying to edit sourcecode.
I think it has something to do with the editor trying to translate the
"../" paths in my imported html. See below for more info:
Here's how it's happening:
1) import a partial html file (attached is an example)
2) change it's type from "text" to "page"
3) right click -> edit sourcecode
java.lang.NullPointerException
at
org.opencms.workplace.editors.CmsDefaultPageEditor.initBodyElementLanguage(CmsDefaultPageEditor.java:470)
at
org.opencms.workplace.editors.CmsSimplePageEditor.initWorkplaceRequestValues(CmsSimplePageEditor.java:205)
at
org.opencms.workplace.CmsWorkplace.initWorkplaceMembers(CmsWorkplace.java:1995)
at org.opencms.workplace.CmsWorkplace.<init>(CmsWorkplace.java:248)
at
org.opencms.workplace.tools.CmsToolDialog.<init>(CmsToolDialog.java:84)
at org.opencms.workplace.CmsDialog.<init>(CmsDialog.java:240)
at org.opencms.workplace.editors.CmsEditor.<init>(CmsEditor.java:187)
at
org.opencms.workplace.editors.CmsDefaultPageEditor.<init>(CmsDefaultPageEditor.java:115)
at
org.opencms.workplace.editors.CmsSimplePageEditor.<init>(CmsSimplePageEditor.java:82)
If I edit the sourcecode when it's of type "text" it works fine.
I then
select all, copy the content, delete the content, save
change the type to page
edit source code
paste content
save
edit source code, no null pointer.
If I diff what I wanted to import with what the editor changed it to that
now works, I get:
$ diff v1 v2
< <div class="breadcrumb"><a
href="../index-2.html">Home</a> > <a href="index.html">Animation
& Visual Effects</a> > <b>Our Facilities</b></div><img
src="../medlib/schools_ani_facilities.gif">
---
> <div class="breadcrumb"><a
href="/opencms/opencms/AAU/index-2.html">Home</a> > <a
href="/opencms/opencms/AAU/anm/index.html">Animation & Visual
Effects</a> > <b>Our Facilities</b></div><img
src="/opencms/opencms/AAU/medlib/schools_ani_facilities.gif" alt="">
Thoughts?
-mp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050921/2010162e/attachment.html>
More information about the opencms-dev
mailing list