[opencms-dev] NullPointerException when saving. Problem with default body and locales.

bart vandendriessche bart at nascom.be
Tue Nov 28 10:51:49 CET 2006


Hey all,

I am working on a multilingual site which has one root folder per 
locale, so e.g.:
en
de
fr

The use case that we are promoting for content that is available in 
multiple languages, is to create the page in one language, for example 
in the en folder, and then when the german content is to be added, 
create a sibling in the de folder that links back to the file in the en 
folder.

This site uses a custom template, so for now, we are always assigning 
the default body as the "Copy body from" property. Now, creating the 
file in the en folder and editing its english content works fine. 
However, when I switch the language inside the FCKeditor, there will be 
no *body element available. I am able to enter content for my newly 
selected language, but when I try to save, a NullPointerException is thrown.
Currently, I have discovered a work around where I can:
a) create the page in English
b) add english content
c) switch to german language
d) add german content
e) switch back to english language
f) save

After doing this, the *body element will be available to the german 
language. However, this workaround is cumbersome for our customers.
It might be of interest that I am currently using OpenCms 6.2.1, so 
maybe this is fixed in a later version. If not, any insight or tips will 
be much appreciated.

Regards,
Bart



More information about the opencms-dev mailing list