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

Olli Aro olli_aro at yahoo.co.uk
Tue Nov 28 11:03:40 CET 2006


We had the same problem. The issue was the body template not having empty
bodies for all languages and editor getting confused. The way we fixed this
was to create our own body template, which had all required languages in,
and then using this template when creating new pages.

However, as far as the old pages were concerned, we had to go and edit the
control code in order to add the missing languages in and fix the editor
behavior. 

This means that if you want to introduce a new language to a site, which
already has content, you must edit the control code for all existing content
items :(

Regards,

Olli 

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of bart vandendriessche
Sent: 28 November 2006 09:52
To: The OpenCms mailing list
Subject: [opencms-dev] NullPointerException when saving. Problem withdefault
body and locales.

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

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.19/555 - Release Date: 27/11/2006
18:09


Send instant messages to your online friends http://uk.messenger.yahoo.com 



More information about the opencms-dev mailing list