AW: [opencms-dev] Add Locale Problem

Kai Schliemann k.schliemann at comundus.com
Thu Sep 21 16:22:23 CEST 2006


Hi Radu,

it is not a bug. You have to add the languages to your body-template which
is usually located in the default-bodies directory of your module.

Regards

Kai
  -----Ursprüngliche Nachricht-----
  Von: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]Im Auftrag von Radu Sora
  Gesendet: Donnerstag, 21. September 2006 10:42
  An: opencms-dev at opencms.org
  Betreff: [opencms-dev] Add Locale Problem


  Hello,

  I have some problems when adding different locales to a OpenCMS site.

  The steps to reproduce the bug (assuming is a bug, and i am not doing
something wrong) are the following:

  1) Edit opencms-system.xml to add more languages:

  Exemple:

  [...]

  <internationalization>
        <localehandler class="org.opencms.i18n.CmsDefaultLocaleHandler"/>
        <localesconfigured>
          <locale>ro</locale>
          <locale>hu</locale>
          <locale>en</locale>
        </localesconfigured>
        <localesdefault>
          <locale>ro</locale>
        </localesdefault>
      </internationalization>

  [...]

  2) Restart tomcat server

  3) Create a JSP template

  4) Create a "Page with free text" based on the template selected on step
3.

  5) Try to "Edit Page" on the template

  The error generated is:
  Error javax.servlet.jsp.JspException: Index: 0, Size: 0

  Some notes:

  - if i try to edit controlcode, and manually created the xml structure for
all the languages, then i can edit page corectlly.
  - the problem doesnt exists for structured content editing;

  The stack for the error is:

  21 Sep 2006 11:39:37,445 ERROR [ina.core.ApplicationDispatcher: 704]
Servlet.service() for servlet jsp threw exception
  java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.ArrayList.RangeCheck(ArrayList.java:546)
      at java.util.ArrayList.get(ArrayList.java:321)
      at
org.opencms.workplace.editors.CmsDefaultPageEditor.initBodyElementName(CmsDe
faultPageEditor.java:548)
      at
org.opencms.workplace.editors.CmsSimplePageEditor.initWorkplaceRequestValues
(CmsSimplePageEditor.java:258)
      at
org.opencms.editors.fckeditor.CmsFCKEditor.initWorkplaceRequestValues(CmsFCK
Editor.java:178)
      at
org.opencms.workplace.CmsWorkplace.initWorkplaceMembers(CmsWorkplace.java:20
67)
      at org.opencms.workplace.CmsWorkplace.<init>(CmsWorkplace.java:253)
      at org.opencms.workplace.tools.CmsToolDialog.<init>(
CmsToolDialog.java:93)
      at org.opencms.workplace.CmsDialog.<init>(CmsDialog.java:249)
      at org.opencms.workplace.editors.CmsEditor.<init>(CmsEditor.java:186)
      at org.opencms.workplace.editors.CmsDefaultPageEditor
.<init>(CmsDefaultPageEditor.java:115)
      at
org.opencms.workplace.editors.CmsSimplePageEditor.<init>(CmsSimplePageEditor
.java:90)
      at org.opencms.editors.fckeditor.CmsFCKEditor.<init>(CmsFCKEditor.java
:92)
      at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.fckeditor.ed
itor_jsp._jspService(editor_jsp.java:51)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
      at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
32)
      at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)
      at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:672)
  [...]


  Any clue on what may be causing that? I suppose is a problem on the script
that creates the initial xmlstructure for a page (is doesn't cycle correctly
through all the languages).

  Thank you,
  Radu



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060921/7218b3d0/attachment.htm>


More information about the opencms-dev mailing list