<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.E-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Great news - since 8.0.4 is out and there was not that much time ... is this bug fixed or do I need to create a bugtracker bug?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Carsten<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE"> opencms-dev-bounces@opencms.org
 [mailto:opencms-dev-bounces@opencms.org] <b>Im Auftrag von </b>Tobias Herrmann<br>
<b>Gesendet:</b> Dienstag, 10. April 2012 15:51<br>
<b>An:</b> The OpenCms mailing list<br>
<b>Betreff:</b> Re: [opencms-dev] Bug if locales of the form "lc_CC" is used<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Carsten,<br>
<br>
I think you are right. There are many calls to 'new Locale(String)' that should be replaced with calling the static 'CmsLocaleManager.getLocale(String)' method. We will include that into the soon to be released version 8.0.4 of OpenCms.<br>
<br>
Greetings, Tobias<br>
<br>
<o:p></o:p></p>
<pre>--<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Visit OpenCms Days 2012 Conference and Expo September 24 to 25, 2012 in Cologne, Germany <a href="http://www.opencms-days.org">http://www.opencms-days.org</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Alkacon Software GmbH - The OpenCms Experts<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><a href="http://www.alkacon.com">http://www.alkacon.com</a>  --  <a href="http://www.opencms.org">http://www.opencms.org</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<p class="MsoNormal"><br>
Am 10.04.2012 11:31, schrieb Carsten Wilhelm: <o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Hi,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Sorry - has nobody a similar problem? I found a lot of calls to the constructor „new Locale(locale)“ which is incorrect if you are using locales containing country and maybe variant.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">I found a correct working solution in CmsLocaleManager.getLocale(locale), which checks for underscores and calls the Java Locale constructor accordingly.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">From my point of view, all occurrences of the standard constructor (where user defined locales are used) need to be replaced by a call to the static method above.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Can anybody confirm this? Maybe I will patch the 8.0.3 code and try this out in our installation.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Kind regads,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Carsten</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE">
<a href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a> [<a href="mailto:opencms-dev-bounces@opencms.org">mailto:opencms-dev-bounces@opencms.org</a>]
<b>Im Auftrag von </b>Carsten Wilhelm<br>
<b>Gesendet:</b> Mittwoch, 4. April 2012 12:20<br>
<b>An:</b> <a href="mailto:opencms-dev@opencms.org">opencms-dev@opencms.org</a><br>
<b>Betreff:</b> [opencms-dev] Bug if locales of the form "lc_CC" is used</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Just found a potentially bug in 8.0.3.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">We’ve changed to the locale „de_DE“, which is displayed correctly in the XML-Content-Editors Dropdowns in the Explorer view. All content is displayed correctly on the website and can be edited using ADE normally.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Adding existing content using the „New“ wizard, checking the content type and drag the existing element to the page is working, too.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Creating new content by dragging the content type to the webpage results in an error message: „Language de_DE already exists in xml document“ (I get the german error message, so the english one might vary a little bit).<o:p></o:p></p>
<p class="MsoNormal">Debugging using Eclipse and source distribution leads to this line in CmsContainerpageService.java:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">                Locale locale = new Locale(localeName);<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Which fails if a locale containing a „_“ is used. Unfortunately the java.util.Locale Class doesn’t look after Underscores and puts „de_DE“ in the language name. Afterwards, this seems to lead to confusion within the OpenCms. If I add a
 breakpoint here and change the value manually in Eclipse to „new Locale(„de“, „DE“)“ I can add the contant and from there on content addition is working for every other page. After restarting Tomcat I get the error again if I add new content.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">So - should the new Locale() part be exchanged to something similar to what the CmsLocaleManager is doing? Or am I doing something completely wrong?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
<p class="MsoNormal">Carsten<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>This mail is sent to you from the opencms-dev mailing list<o:p></o:p></pre>
<pre>To change your list options, or to unsubscribe from the list, please visit<o:p></o:p></pre>
<pre><a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
</div>
</div>
</body>
</html>