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

Olli Aro olli_aro at yahoo.co.uk
Tue Nov 28 12:16:17 CET 2006


Yes it does and especially because structured content, e.g. news, seems to
work. Maybe the standard content is no longer actively developed and the
long term view is that everything will be structured content...

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 11:01
To: The OpenCms mailing list
Subject: Re: [opencms-dev] NullPointerException when saving.
Problemwithdefault body and locales.

Hey Olli and Jonathan,

thanks for your suggestions, I did add a custom default body similar to 
the one below and it works properly this way. It does seem like a flaw 
that the controlcode has to be edited upon adding a new locale though.

regards,
Bart

Jonathan Woods wrote:
> Bart -
>
> The thing you 'copy body from': can't that be a snippet of XML which
> includes empty bodies for all the languages you want?  Then you'd start
off
> with all the necessary body elements defined.  In other words:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
xsi:noNamespaceSchemaLocation="http://www.opencms.org/dtd/6.0/xmlpage.xsd">
>   <page language="en">
>     <element name="body">
>       <links/>
>       <content><![CDATA[]]></content>
>     </element>
>   </page>
>   <page language="de">
>     <element name="body">
>       <links/>
>       <content><![CDATA[]]></content>
>     </element>
>   </page></pages> 
>
> Jon
>
> -----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
>
>
>
> _______________________________________________
> 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
>
>   


_______________________________________________
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