GithubHelp home page GithubHelp logo

alkacon / opencms-core Goto Github PK

View Code? Open in Web Editor NEW
516.0 98.0 473.0 968.11 MB

The Java open source content management system by Alkacon Software

Home Page: http://www.opencms.org

License: GNU Lesser General Public License v2.1

Shell 0.10% HTML 1.50% Java 91.04% JavaScript 6.61% CSS 0.33% Batchfile 0.02% XSLT 0.06% Rich Text Format 0.04% SCSS 0.31% StringTemplate 0.01%

opencms-core's Introduction

OpenCms

OpenCms logo

A powerful open source website content management system.

OpenCms is build in Java and XML from open source components. OpenCms provides compelling features especially suited for large Internet or Intranet websites.

Table of contents

General OpenCms features

OpenCms features include:

  • The page editor allows WYSIWYG inline editing of web pages and arrangement of content by drag & drop.
  • The form based editor allows editing of structured content in a well defined form mask.
  • The sitemap editor allows to create new pages and re-arrange the navigation tree by drag & drop.
  • Responsive "Mercury" default template based on Bootstrap 4 with many features.
  • Headless API for accessing content as JSON from external applications.
  • Content creation for mobile devices with preview and device specific content control.
  • Structured contents can be defined using a simple XML schema.
  • Easy to use "Online / Offline" workflow, changes must be approved before they become visible.
  • Link management for all internal resources with broken link detection.
  • Integrated image scaling and cropping.
  • SEO features with automatic sitemap.xml generation and page alias support.
  • Full featured user management that supports the concept of "Organizational Units" (OUs).
  • Allows management of multiple websites within one installation.
  • Contents can be served dynamically or exported to static HTML files.
  • File access to the OpenCms content repository over a shared network / SMB drive.
  • CMIS and WebDAV access to the OpenCms content repository.
  • Integrates Apache SOLR for powerful content searching and noSQL like queries.
  • Full text search for web pages as well as in office documents like PDF, MS Office and Open Office.
  • Extensions can be added through a flexible module system.
  • The "time warp" feature allows to view resources which are expired or not yet released.
  • JSP integration for dynamic functionality in templates, dynamic forms etc.
  • ... and much more

See the OpenCms website for further information.

Online live demo

If you want to try OpenCms, the easiest option is to use our OpenCms Live Demo server.

The live demo provides a personal OpenCms installation exclusively for you. All you need to do is register with a valid email address. We will not use the data you provide for anything else than setting up your personal demo installation!

Documentation

The OpenCms Documentation Central is the portal to all documentation regarding OpenCms related technology.

Community

Receive updates about the OpenCms development and get in touch with the core developers and community members.

Compatibility

OpenCms 17 is compatible with Java 21, 17, 11 and 8.

Please note that OpenCms 17 will be the last major OpenCms release that keeps Java 8 compatibility. Future OpenCms Versions will require at least Java 11.

OpenCms 17 requires a Java Servlet 4.0 compatible web container. We have tested this release using Jetty and Tomcat. It works "out of the box" with Jetty 12 or Tomcat 9. Others have reported deploying OpenCms successfully on other web servlet containers like WildFly, GlassFish, WebLogic, WebSphere and Resin.

On the database side, we provide support for MySQL, MariaDB, Oracle, PostgreSQL, MS SQL Server, DB2 and HSQLDB.

Installing OpenCms

Docker based installation

The easiest way to install OpenCms is to use our official docker image. See alkacon/opencms-docker on Docker hub for full information about running the OpenCms docker image.

Manual installation

You can install OpenCms "from scratch" manually on your server as well. See the OpenCms installation guide for full information about manually installing OpenCms.

Bugs and feature requests

Please report issues and file feature requests on using our GitHub OpenCms issue tracker.

Contributing

Contributions to the OpenCms core development are most welcome. Please send us your pull requests directly on GitHub..

Security issues

Please report security issues in OpenCms using the security issue report form on the Alkacon website.

Creators

OpenCms is developed by Alkacon Software with the help of an international OpenCms community.

Copyright and license

OpenCms is copyright by Alkacon Software GmbH & Co. KG. The OpenCms source code is released under the GNU LGPL.

opencms-core's People

Contributors

adrianrm avatar akandzior avatar alkacon-jgraf avatar andreasrosdal avatar annjul avatar azahner avatar chirkovmail avatar dseidel avatar fhopf avatar gallardo avatar goshoo avatar gwestenberger avatar interone-ms avatar latzer avatar makarov-iliya avatar memmerich avatar mjaeger avatar msach1 avatar mwxwidmann avatar paulflakstad avatar psmagina avatar psreckovic avatar pstrudthoff avatar rgaviras avatar rohtake avatar serrapos avatar shuewe avatar t-nasu avatar therrmann avatar twofisher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencms-core's Issues

Please reinstate deleteResource in cmsshell

With OpenCms 6, a command 'deleteResource' was available and we use it in our scripts. On upgrade to OpenCms 8, this command is no longer available. Please could you reinstate this command?

Alexander confirmed the issue on opencms dev, quote: "Seems access to deleteResource was 'lost' by accident in OpenCms 7. You could add the old functionality by adding the method to org.opencms.main.CmsShellCommands."

restypes.available accepts explorertypes

It would be nice that restypes.available could handle explorertypes (or that
itcan handle that with another property).

Now using an explorertypes in restaypes.available shows the resource creation
dialog, but the continue button does not work

Bug in org.opencms.xml.content.CmsDefaultXmlContentHandler.removeEmptyMappings(CmsObject, CmsXmlContent)

There is property name resolution code, which does not handle explicit shared or individual property mapping.

String property;
if (mapping.startsWith(MAPTO_PROPERTY_LIST)) {
    // this is a property list mapping
    property = mapping.substring(MAPTO_PROPERTY_LIST.length());
} else {
    // this is a property mapping
    property = mapping.substring(MAPTO_PROPERTY.length());
}
// delete the property value for the not existing node
rootCms.writePropertyObject(filename, new CmsProperty(property, CmsProperty.DELETE_VALUE, null));

In this case suffixes from MAPTO_PROPERTY_LIST_INDIVIDUAL and MAPTO_PROPERTY_LIST_SHARED are not handled, and, for example, for mapping "propertyList:individual:propertyName" we will have "individual:propertyName" as the name of the property instead of "propertyName".

I suggest to implement this block like this:

String property;
boolean shared = false;
if (mapping.startsWith(MAPTO_PROPERTY_LIST_INDIVIDUAL)) {
    property = mapping.substring(MAPTO_PROPERTY_LIST_INDIVIDUAL.length());
} else if (mapping.startsWith(MAPTO_PROPERTY_LIST_SHARED)) {
    property = mapping.substring(MAPTO_PROPERTY_LIST_SHARED.length());
    shared = true;
} else if (mapping.startsWith(MAPTO_PROPERTY_LIST)) {
    property = mapping.substring(MAPTO_PROPERTY_LIST.length());
} else if (mapping.startsWith(MAPTO_PROPERTY_SHARED)) {
    property = mapping.substring(MAPTO_PROPERTY_SHARED.length());
    shared = true;
} else if (mapping.startsWith(MAPTO_PROPERTY_INDIVIDUAL)) {
    property = mapping.substring(MAPTO_PROPERTY_INDIVIDUAL.length());
} else {
    property = mapping.substring(MAPTO_PROPERTY.length());
}
rootCms.writePropertyObject(filename, new CmsProperty(property, CmsProperty.DELETE_VALUE, shared ? CmsProperty.DELETE_VALUE : null));

False (?) ERROR "Could not resolve OpenCms XML entity reference" when importing module

When importing a module for the first time, I get the above mentioned ERROR in the server stack traces. The module is imported in the workspace successfully, though.

I have spent some time trying to debug the code, and I have the impression that OpenCms tries to get a resource when it is still not available. Apparently, it will query the file again later. But logging this error is extremely misleading.

Server Stacktrace

(original filename substituted)

30 Aug 2012 16:35:48,475 ERROR [encms.xml.CmsXmlEntityResolver: 410] Could not resolve OpenCms XML entity reference "opencms://system/modules/my.module/schemas/my_schema.xsd"
org.opencms.file.CmsVfsResourceNotFoundException: Fehler beim Lesen der Ressource aus dem Pfad "/system/modules/my.module/schemas/my_schema.xsd".
    at org.opencms.file.CmsVfsResourceNotFoundException.createException(CmsVfsResourceNotFoundException.java:71)
    at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:334)
    at org.opencms.db.CmsDbContext.report(CmsDbContext.java:286)
    at org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4687)
    at org.opencms.file.CmsObject.readResource(CmsObject.java:2943)
    at org.opencms.file.CmsObject.readFile(CmsObject.java:2357)
    at org.opencms.xml.CmsXmlEntityResolver.resolveEntity(CmsXmlEntityResolver.java:401)
    at org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:386)
    at org.opencms.file.types.CmsResourceTypeXmlContent.initialize(CmsResourceTypeXmlContent.java:256)
    at org.opencms.loader.CmsResourceManager.initialize(CmsResourceManager.java:1038)
    at org.opencms.module.CmsModuleImportExportHandler.importModule(CmsModuleImportExportHandler.java:567)
    at org.opencms.module.CmsModuleImportExportHandler.importData(CmsModuleImportExportHandler.java:372)
    at org.opencms.importexport.CmsImportExportManager.importData(CmsImportExportManager.java:729)
    at org.opencms.workplace.threads.CmsDatabaseImportThread.run(CmsDatabaseImportThread.java:85)
Caused by: org.opencms.file.CmsVfsResourceNotFoundException: Kann die Ressource "/system/modules/my.module/schemas/my_schema.xsd" nicht lesen.
    at org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:2163)
    at org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java:7310)
    at org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:6922)
    at org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4685)
    ... 10 more
30 Aug 2012 16:35:48,478 ERROR [ypes.CmsResourceTypeXmlContent: 259] Ungültiges XML Schema "/system/modules/my.module/schemas/my_schema.xsd" konfiguriert für den Resourcetyp "my_type".
org.opencms.xml.CmsXmlException: Das Laden des XML Dokuments ist fehlgeschlagen.
    at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:676)
    at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:639)
    at org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:387)
    at org.opencms.file.types.CmsResourceTypeXmlContent.initialize(CmsResourceTypeXmlContent.java:256)
    at org.opencms.loader.CmsResourceManager.initialize(CmsResourceManager.java:1038)
    at org.opencms.module.CmsModuleImportExportHandler.importModule(CmsModuleImportExportHandler.java:567)
    at org.opencms.module.CmsModuleImportExportHandler.importData(CmsModuleImportExportHandler.java:372)
    at org.opencms.importexport.CmsImportExportManager.importData(CmsImportExportManager.java:729)
    at org.opencms.workplace.threads.CmsDatabaseImportThread.run(CmsDatabaseImportThread.java:85)
Caused by: org.dom4j.DocumentException: null Nested exception: null
    at org.dom4j.io.SAXReader.read(SAXReader.java:484)
    at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:674)
    ... 8 more

Query

I could find the query that OpenCms builds, but I'm not acquainted with the OpenCms db. I don't think either that the failure is related to the query:

stmt = (org.apache.commons.dbcp.DelegatingPreparedStatement) com.mysql.jdbc.PreparedStatement@4c796d71:
SELECT CMS_OFFLINE_STRUCTURE.STRUCTURE_ID,CMS_OFFLINE_STRUCTURE.RESOURCE_ID,CMS_OFFLINE_STRUCTURE.RESOURCE_PATH,CMS_OFFLINE_STRUCTURE.STRUCTURE_STATE,CMS_OFFLINE_STRUCTURE.DATE_RELEASED,CMS_OFFLINE_STRUCTURE.DATE_EXPIRED,CMS_OFFLINE_STRUCTURE.STRUCTURE_VERSION,CMS_OFFLINE_RESOURCES.RESOURCE_ID,CMS_OFFLINE_RESOURCES.RESOURCE_TYPE,CMS_OFFLINE_RESOURCES.RESOURCE_FLAGS,CMS_OFFLINE_RESOURCES.RESOURCE_STATE,CMS_OFFLINE_RESOURCES.DATE_CREATED,CMS_OFFLINE_RESOURCES.DATE_LASTMODIFIED,CMS_OFFLINE_RESOURCES.USER_CREATED,CMS_OFFLINE_RESOURCES.USER_LASTMODIFIED,CMS_OFFLINE_RESOURCES.PROJECT_LASTMODIFIED 
    AS LOCKED_IN_PROJECT,CMS_OFFLINE_RESOURCES.RESOURCE_SIZE,CMS_OFFLINE_RESOURCES.DATE_CONTENT,CMS_OFFLINE_RESOURCES.SIBLING_COUNT,CMS_OFFLINE_RESOURCES.RESOURCE_VERSION,CMS_OFFLINE_RESOURCES.PROJECT_LASTMODIFIED 
    FROM
CMS_OFFLINE_STRUCTURE,CMS_OFFLINE_RESOURCES
    WHERE
CMS_OFFLINE_STRUCTURE.RESOURCE_PATH='/system/modules/my.module/schemas/my_schema.xsd' AND CMS_OFFLINE_STRUCTURE.RESOURCE_ID=CMS_OFFLINE_RESOURCES.RESOURCE_ID 
    ORDER BY
CMS_OFFLINE_STRUCTURE.STRUCTURE_STATE ASC

Increase contrast for details in workplace

Some views in the workplace, like for example "Administration View > Account
Management > Organizational Unit: root organizational unit > User Management:
root organizational unit "
show details (Groups or Roles for example) in a light gray, which is difficult
to read since it has only little contrast to the white background.

Please change the color in new-admin.css, td.listdetailitem from "threedshadow"
to something like #666666

td.listdetailitem {
color: #666666;
font-size: 10px;
padding-left: 10px;
}

Cannot save properties values for xmlpage content

I installed the OpenCMS 7.5.3 on Websphere 7.0.0.11, Oracle 11g. I got a
problem for saving the properties values for the xmlpage type of content. When
I click the "Advanced" button on the properties dialog, I saw two windows
there, one for advanced properties, and the other one is for basic properties.
I entered some value for those advanced properties, and click "OK" button. The
values are not saved.I installed the OpenCMS 7.5.3 on Websphere 7.0.0.11, Oracle 11g. I got a
problem for saving the properties values for the xmlpage type of content. When
I click the "Advanced" button on the properties dialog, I saw two windows
there, one for advanced properties, and the other one is for basic properties.
I entered some value for those advanced properties, and click "OK" button. The
values are not saved.

I have also tried it on WAS6, also got the same problem. The error log as
following:
18 Jan 2011 16:46:42,992 ERROR [rg.opencms.workplace.CmsDialog:1452] The
workplace dialog caused an error.
java.lang.NullPointerException
at
org.opencms.workplace.commons.CmsPropertyAdvanced.performDialogOperation(CmsPropertyAdvanced.java:1317)
at
org.opencms.workplace.commons.CmsPropertyAdvanced.actionEdit(CmsPropertyAdvanced.java:391)
at
com.ibm._jsp._property_5F_advanced._jspService(_property_5F_advanced.java:137)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:606)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:555)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:173)
at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:829)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:512)
at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1052)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1491)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)

CmsPublishScheduled fails to parse the date string depending on the workplace locale

CmsPublishScheduled fails to parse the date string when the workplace locale is
other then the ones with witch the data format is MM/dd/yyyy

How to reproduce:

  1. Set the workplace language Japanese.
  2. Create a resource
  3. Choose Publish Scheduled in the right click context menu.
  4. Choose a date from a calender.
  5. Press OK
  • then an exception will be thrown.

Here is my suggestion for fix:

The problem is that CmsPublishScheduled uses user's workplace locale to
determine which data format string to use. However, the calender widget always
returns MM/dd/yyyy formatted date, unless configured otherwise.


// here is the original code
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.SHORT, getLocale());
Date date = dateFormat.parse(publishScheduledDate);


So I used CmsCalendarWidget.getCalendarDate() like the other dialogs and
everything worked fine.


// here is my fix--
Date date = new Date(CmsCalendarWidget.getCalendarDate(getMessages(),
publishScheduledDate, true));

OpenCMS 8.0.4, CmsDefaultLinkSubstitutionHandler.getLink returns incorrect value for urls that reference non-opencms local resources.

OpenCMS : 8.0.4
Installed as /web/page/ instead of /opencms/opencms/

Large images are stored locally on the server that hosts OpenCMS. http://server/largefiles/bigimage.jpg

Enter a link to this asset in OpenCMS via TinyMCE as follows: download.

Upon clicking save, OpenCMS changes the url to /web/page/largefiles/bigimage.jpg

At the end of the day, getLink returns serverPrefix.concat(resultLIink)

Not sure how getLink every returns a link from this method without appending serverPrefix (in this case /web/page ).

Problema in Site Map Editor with locale in html redirect

I have found a problem with a multi-locale site. The problem comes when I have a html-redirect inside sitemap with a locale other than the default locale. The sitemap editor gives me a NullPointer exception. If I change the locale of the resource and put the default OpenCms work correctly, however, if I put the locale of the current sites gives the error.

Lucene search, analyzers & co

OpenCms 8 uses Lucene 3.1.0 and OpenCms 7.5 uses Lucene 2.4.1.

On OpenCms 7, a search like "R?unio*" was working perfectly.
On OpenCms 8, we often have no results when we put wildcards and a lot of words
seems not to be indexed.

Results are the same with snowballanalyzer (french stemmer) or frenchanalyzer
(french website). This issue may be the same for all languages with special
chars.

Select spaces removed when mapping to property using mapto="property:..."

When mapping text to property using mapto="property:...", some spaces are removed.

The removed spaces are those at the line-breaks in the control code. The problem appears only when viewing of the properties. A string fetched by reading an affected property value is fine, and will have no missing spaces.

Observed on OpenCms v8.0.4 (running on Tomcat / MySQL).

CmsSelectWidget accepts <optgroup>

Hi.

I think it will be interesting that CmsSelectWidget accepts '' label.

It's just a little modification, we have it done already.

in CmsSelectWidgetClass:

public final static String OPTGROUP_START_VALUE = "optgroup_start";
public final static String OPTGROUP_END_VALUE = "optgroup_end";
...

public String getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog,
I_CmsWidgetParameter param){

...
CmsSelectWidgetOption option = (CmsSelectWidgetOption)i.next();

if(OPTGROUP_START_VALUE.equals(option.getValue())){
result.append("<optgroup label="")
.append(option.getOption())
.append("">");
}
else if(OPTGROUP_END_VALUE.equals(option.getValue())){
result.append("");
}
else{
// create the option
...
}
...
}

Exception when upgrading to 8.0.3 wizard

When Upgrading from 8.0.1 to 8.0.3 (it also applies in other upgrade packages),
in the step 5 an exception is thrown as the application cannot create
update/cmsupdate.txt file, even though the folder update has set write
permissions for user tomcat.

I suggest that you include an empty update/cmsupdate.txt file in future Upgrade
packages, as it will prevent the exception to be thrown, improving user
experience.

You can check the issue in the following link, as is reported by other users:
http://mail.opencms.org/pipermail/opencms-dev/2011q3/036165.html

additional file name translation rules

Opencms only comes with file translation rules for the most basic types of characters. It would be good to have more translation rules by default so that latin characters with diacritical marks will be converted into their basic letter forms without diacritics.

Please take a look at pull-request #70 for a proposed patch against the latest version of opencms-vfs.xml. The patch adds translation rules for all latin character versions with diacritical marks. The characters are encoded as numeric XML character entities.

BUG W3C in headincludes tag

With DTD
The generated with the tag cms:headincludes with parameter css return a
error on W3C validation, because it's not closed with .

I'm on OpenCms 8.0.2.

With DTD
The generated with the tag cms:headincludes with parameter css return a
error on W3C validation, because it's not closed with .

I'm on OpenCms 8.0.2.

In OpenCms 8.0.3I inserted <cms:headincludes type="css" closetags="true"/> in
my HTML5 template.
It generates .
It's not W3C compliant.
I need
Sorry for the lake of precision in my first comment...

Opencms 7.5.3- FCKEditor save problem

If a structed xml file was edit and the user click to the save-button,
sometimes the following error message was shown "Not enough permissions to
execute the operation on the resource "null". Required permissions are; "+w"".
If the tomcat service was restart there was no problem. If the tomcat service
runs same days (without restart) the error message was shown sometimes. The
OpenCms-User has enough permissions.

------- Comment #1 From Mario Jaeger 2011-07-04 12:51:33 [reply] -------

The permissions per user are calculated by the permission handler configured in
the WEB-INF/config/opencms-system.xml in the node . Per
default that is the org.opencms.security.CmsDefaultPermissionHandler. Do you
also use that permission handler?

If you use that permission handler: The permissions are calculated in the
method hasPermissions(). That is a longish method. To see when that method is
left, add the following line in the WEB-INF/config/opencms.properties in
section "Set levels for all default channels available in OpenCms", please:

log4j.logger.org.opencms.security=DEBUG

Restart the servlet container after that, please.

Post the OpenCms logfile WEB-INF/logs/opencms.log in that bugzilla entry when
the issue does occur the next time then.

------- Comment #2 From Mario Jaeger 2011-07-12 12:06:08 [reply] -------

The line "log4j.logger.org.opencms.security=DEBUG" is to add in file
WEB-INF/classes/log4j.properties, not in WEB-INF/config/opencms.properties.

------- Comment #3 From Berni213 2011-07-26 10:14:50 [reply] -------

I only use the default permission handler, I never change the configuration
file WEB-INF/config/opencms-system.xml in the node .
It seems that the error were often caused by insert an image from image
gallery.

Enclosed the log:

26 Jul 2011 08:49:20,123 INFO [rg.opencms.jsp.CmsJspLoginBean: 209]
Erfolgreiche Anmeldung des Benutzers "Admin": Request von IP 212.184.182.145
mit der URI "/system/login/index.html".
26 Jul 2011 09:11:14,404 ERROR [rg.opencms.workplace.CmsDialog:1452] Der
Workplace Dialog hat einen Fehler verursacht.
org.opencms.file.CmsVfsResourceAlreadyExistsException: Fehler beim Erstellen
der Ressource
"/sites/default/html/de/01_Division/Unternehmen/Partner/index.html/".
at
org.opencms.file.CmsVfsResourceAlreadyExistsException.createException(CmsVfsResourceAlreadyExistsException.java:78)
at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:318)
at org.opencms.db.CmsDbContext.report(CmsDbContext.java:292)
at
org.opencms.db.CmsSecurityManager.createResource(CmsSecurityManager.java:1013)
at
org.opencms.file.types.A_CmsResourceType.createResource(A_CmsResourceType.java:301)
at
org.opencms.file.types.A_CmsResourceTypeFolderBase.createResource(A_CmsResourceTypeFolderBase.java:134)
at org.opencms.file.CmsObject.createResource(CmsObject.java:733)
at
org.opencms.workplace.explorer.CmsNewResourceFolder.actionCreateResource(CmsNewResourceFolder.java:221)
at
org.opencms.workplace.explorer.CmsNewResourceFolder.actionDialog(CmsNewResourceFolder.java:242)
at
org.opencms.workplace.list.A_CmsListDialog.displayDialog(A_CmsListDialog.java:411)
at
org.opencms.workplace.list.A_CmsListDialog.displayDialog(A_CmsListDialog.java:396)
at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.commons.newresource_005ffolder_jsp._jspService(newresource_005ffolder_jsp.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:555)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:173)
at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:829)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:512)
at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1052)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1491)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:248)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Unknown Source)
Caused by: org.opencms.file.CmsVfsResourceAlreadyExistsException: Die Ressource
"/html/de/01_Division/Unternehmen/Partner/index.html/" kann nicht erstellt
werden, denn sie bereits existiert.
at
org.opencms.db.generic.CmsVfsDriver.createResource(CmsVfsDriver.java:571)
at
org.opencms.db.CmsDriverManager.createResource(CmsDriverManager.java:1778)
at
org.opencms.db.CmsDriverManager.createResource(CmsDriverManager.java:1892)
at
org.opencms.db.CmsSecurityManager.createResource(CmsSecurityManager.java:1011)
... 47 more
26 Jul 2011 10:01:03,015 ERROR [ace.editors.CmsPreEditorAction: 169] Fehler
beim Lesen der Ressource aus dem Pfad "null".
org.opencms.file.CmsVfsResourceNotFoundException: Fehler beim Lesen der
Ressource aus dem Pfad "null".
at
org.opencms.file.CmsVfsResourceNotFoundException.createException(CmsVfsResourceNotFoundException.java:79)
at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:318)
at org.opencms.db.CmsDbContext.report(CmsDbContext.java:292)
at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4034)
at org.opencms.file.CmsObject.readResource(CmsObject.java:3524)
at
org.opencms.workplace.editors.CmsPreEditorAction.doPreAction(CmsPreEditorAction.java:159)
at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.editor_jsp._jspService(editor_jsp.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:194)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:555)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:423)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:173)
at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:829)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:512)
at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1052)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1491)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:248)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Unknown Source)
Caused by: org.opencms.file.CmsVfsResourceNotFoundException: Kann die Ressource
"null" nicht lesen.
at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:5857)
at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4032)
... 41 more

Selection dialog for xsd:choice doesn't show up in Firefox 6

(Platform is JBoss/Postgresql)

Editing content files whose schema contains xsd:choice elements in Internet
Explorer 8 and Firefox 3.6 works fine, upon adding a new choice element, the
selection dialog pops up.

However, on Firefox 6 (didn't test with 4, 5 or 7) the selection dialog doesn't
pop up. Instead only empty choice elements are added.

Here are the XSD-files:

choice.xsd

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>

<xsd:element name="Choices" type="OpenCmsChoices"/>

<xsd:complexType name="OpenCmsChoices">
xsd:sequence
<xsd:element name="Choice" type="OpenCmsChoice" minOccurs="0"
maxOccurs="unbounded"/>
/xsd:sequence
/xsd:complexType

<xsd:complexType name="OpenCmsChoice">
xsd:choice
<xsd:element name="Option1" type="OpenCmsString" minOccurs="0" />
<xsd:element name="Option2" type="OpenCmsString" minOccurs="0" />
/xsd:choice

<xsd:attribute name="language" type="OpenCmsLocale"
  use="optional"/>

/xsd:complexType
/xsd:schema

test.xsd

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>

<xsd:include
schemaLocation="opencms://system/modules/my.module/schemas/test/choice.xsd"/>

<xsd:element name="Tests" type="OpenCmsTests"/>

<xsd:complexType name="OpenCmsTests">
xsd:sequence
<xsd:element name="Test" type="OpenCmsTest"
minOccurs="0" maxOccurs="unbounded"/>
/xsd:sequence
/xsd:complexType

<xsd:complexType name="OpenCmsTest">
xsd:sequence
<xsd:element name="Choose" type="OpenCmsChoice" minOccurs="0"
maxOccurs="unbounded"/>
/xsd:sequence

<xsd:attribute name="language" type="OpenCmsLocale"
  use="optional"/>

/xsd:complexType
/xsd:schema

And here's a resulting file. Note that the English part was created using IE 8
whereas the German part was added using FF6:














Note the empty elements in the German part. FF 6 didn't even ask me
what sub type should be selected.

Misleading parsing error message for schemas with nested schemas: 'Unable to unmarshal XML content definition schema "opencms:// ...container.xsd"'

If a schema includes another corrupt schema, OpenCms displays the user the following misleading error (container schema fullpath substituted with [container.xsd]), suggesting that the container schema is the corrupt one. No hint is provided as for what included schema is the offending one:

Error

Unable to unmarshal XML content definition schema "opencms://[container.xsd]".
Reason: Unmarshalling XML document failed.
Reason: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.

The "Details" view does not help either (container schema fullpath substituted with [container.xsd]). Notice that the last Exception in the chain does not show location info but only a humble "Error on line 1 of document " (there is a double whitespace after "document").

Details

org.opencms.main.CmsRuntimeException: Kann das XML Content Definitionsschema"[container.xsd]" nicht generieren.
    at org.opencms.xml.content.CmsXmlContent.getContentDefinition(CmsXmlContent.java:803)
    at org.opencms.xml.content.CmsXmlContent.<init>(CmsXmlContent.java:132)
    at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:293)
    at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:139)
    at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:210)
    at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:160)
    at org.opencms.xml.content.CmsXmlContentFactory.unmarshal(CmsXmlContentFactory.java:265)
    at org.opencms.loader.CmsXmlContentLoader.unmarshalXmlDocument(CmsXmlContentLoader.java:75)
    at org.opencms.loader.A_CmsXmlDocumentLoader.load(A_CmsXmlDocumentLoader.java:218)
    at org.opencms.loader.CmsXmlContentLoader.load(CmsXmlContentLoader.java:44)
    at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1062)
    at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1598)
    at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.opencms.xml.CmsXmlException: Das Laden des XML Dokuments ist fehlgeschlagen.
    at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:676)
    at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:639)
    at org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:435)
    at org.opencms.xml.CmsXmlContentDefinition.unmarshalInternal(CmsXmlContentDefinition.java:891)
    at org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:463)
    at org.opencms.xml.content.CmsXmlContent.getContentDefinition(CmsXmlContent.java:797)
    ... 26 more
Caused by: org.dom4j.DocumentException: Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
    at org.dom4j.io.SAXReader.read(SAXReader.java:482)
    at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:674)
    ... 31 more

The CmsXmlException could be catched higher in the call hierarchy, for instance, in org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:435), where OpenCms still knows the offending schema name (String schemaLocation).

PS: I'm not opening a Pull Request because I I'm not familiarized with the localization of Exceptions in OpenCms.

WebDAV PUT XML content BOM remove error

If XML content import to OpenCms 8.0.4 using WebDAV servlet, 409 error is appear.

The reason is BOM is not removed from XML taken from input stream.

Such error is related with changes in org.opencms.file.wrapper.CmsObjectWrapper#needUtf8Marker method - additional marker check was added:

        if (typeMatch && res.isFile()) {
            CmsFile file = m_cms.readFile(res);
            if ((file.getContents().length >= 3)
                && (file.getContents()[0] == CmsResourceWrapperUtils.UTF8_MARKER[0])
                && (file.getContents()[1] == CmsResourceWrapperUtils.UTF8_MARKER[1])
                && (file.getContents()[2] == CmsResourceWrapperUtils.UTF8_MARKER[2])) {
                typeMatch = false;
            }
        }

So removing of BOM in org.opencms.file.wrapper.CmsObjectWrapper#writeFile in the previous OpenCms version is not performed now:

    // remove the added UTF-8 marker
    if (needUtf8Marker(resource)) {
        resource.setContents(CmsResourceWrapperUtils.removeUtf8Marker(resource.getContents()));
    }

Method writeFile returns false for XML content which already contains BOM.

Temporal solution for current OpenCms version is substitute org.opencms.file.wrapper.CmsObjectWrapper.class file in the opencms.jar.

But such bug should be fixed in next OpenCms version.

Problems with labels in workplace_ru.properties

Hi, I've a russian website, and I can view it correctly with UTF-8 encoding but I've problems with labels from workplace_ru.properties

I've found this code:
http://lists.opencms.org/pipermail/opencms-dev/2009q3/032999.html

but when I adapt it in my page, I get only "?????"

This is my code in jsp element page:

String jvmDefaultCharsetName = Charset.defaultCharset().displayName();
byte[] OldCharset = cms.label("label.contacts_subject").getBytes(jvmDefaultCharsetName);
byte[] NewCharset = CmsEncoder.changeEncoding(OldCharset, jvmDefaultCharsetName, "UTF-8");
String RussianLabel = CmsEncoder.createString(NewCharset, "UTF-8");

out.print(RussianLabel); // The output is "?????"

I also tried to put this code at the top of the page:
String ReqUr = CmsRequestContext.setEncoding("UTF-8");

but labels are in italian (my default workplace.properties)

How can I solve this problem?

Container page editor allows editing siblings of container pages that should not be editable

Description
If you edit a sibling of a container page with the ADE editor that was created with the workplace copy option:

'Copy no resource, just create siblings of all resources in the folder'

the latest sibling changed will "undo" and remove previously changed locale nodes of that container page that have not been published.

In the OpenCms workplace explorer it is not allowed to edit the new sibling after the copy operation, and it is also not possible to steal its lock until the newly created sibling was published.

Steps to reproduce

  • Create a container page in one of the subsitemaps (e.g. /nl/testPage/index.html)
  • Copy the folder /nl/testPage/ of this container page into another languages folder (e.g. /fr/) use the option 'Copy no resource, just create siblings of all resources in the folder'. Afterwards you can't edit /fr/testPage/index.html with the workplace, but ADE allows editing
  • Edit the previous created container page /nl/testPage/index.html with the ADE container page editor and add a element on that page: Save and Exit
  • Edit the (secondly) created sibling of the container page /fr/testPage/index.html with the ADE container page editor and add a element on that page: Save and Exit
  • Now the Dutch version misses the element that we had added short before and the French one is existent

How to solve this issue

In order to avoid unwanted side effects one should not be able to edit the new sibling in ADE unless it has already been published. So the fix should adjust the behavior of the ADE container page editor according to the workplace. The resource will therefore be editable via the ADE container page editor, only when it is also editable in the workplace.

CategoryWidget ADE minOccurs="0"

When adding a content with Direct Edit (ADE) and activate the Category Widget
"Category", an error is logged.

org.opencms.widgets.CmsCategoryWidget.getResource(CmsObject,
I_CmsWidgetParameter) => cms.readSiblings()

21 Sep 2011 16:08:53,869 ERROR [CmsCategoryWidget.java: 478] Error reading
resource from path "/.content/event/e_0006.html".
org.opencms.file.CmsVfsResourceNotFoundException: Error reading resource from
path "/.content/event/e_0006.html".
at
org.opencms.file.CmsVfsResourceNotFoundException.createException(CmsVfsResourceNotFoundException.java:71)
at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:334)
at org.opencms.db.CmsDbContext.report(CmsDbContext.java:286)
at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4593)
at org.opencms.file.CmsObject.readResource(CmsObject.java:2834)
at org.opencms.file.CmsObject.readSiblings(CmsObject.java:3020)
at
org.opencms.widgets.CmsCategoryWidget.getResource(CmsCategoryWidget.java:466)
at
org.opencms.widgets.CmsCategoryWidget.getDialogWidget(CmsCategoryWidget.java:204)
at
org.opencms.workplace.editors.CmsXmlContentEditor.getXmlEditorForm(CmsXmlContentEditor.java:2018)
at
org.opencms.workplace.editors.CmsXmlContentEditor.getXmlEditorForm(CmsXmlContentEditor.java:971)
at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.xmlcontent.editor_005fform_jsp._jspService(editor_005fform_jsp.java:597)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:188)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:163)
at org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:612)
at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:417)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:167)
at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:886)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:517)
at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1062)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1598)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:851)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:278)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.opencms.file.CmsVfsResourceNotFoundException: Unable to read
resource "/.content/event/e_0006.html".
at
org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:2170)
at
org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java:7310)
at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:6772)
at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4591)
... 47 more

Font, Font Size, Color in HtmlWidget

I am a developer working on upgrading my companies website from opencms 6 to
8.0.
The HtmlWidget in the opencms 6 had font selection boxes for, family, size
and color. I have reviewed the wiki page http://opencms-wiki.org/HtmlWidget
regarding the HtmlWidget. It seems that using formatselect in the xsd
configuration would place these on the editor. However this only appears to
add bold, alignment, bullets and other items.
Do I need to create a complete custom buttonbar to get these back on the
HtmlWidget?

Thanks

Properties of CmsResource get lost using CmsRepository

When extending org.opencms.repository.CmsRepositorySession, it is not possible
to change and save timestamps (like DateLastModified). They seem to get lost in
one of the wrappers. My test-class looks like this:

public class CmsRepositorySession extends
org.opencms.repository.CmsRepositorySession {
private final CmsObjectWrapper cms;

public CmsRepositorySession(CmsObjectWrapper cms, CmsRepositoryFilterfilter) {
super(cms, filter);
this.cms = cms;
}

public void setDateLastModified(String path, long time) throws CmsException{
CmsFile file = cms.readFile(path, CmsResourceFilter.DEFAULT);
file.setDateLastModified(time);
cms.writeFile(file);
}
}

I didn't test, but I guess this applies to most the properties you usually are
able to set on a CmsResource/CmsFile.

Background: I'm working on an almost working SMB-Interface for the VFS, which
sits on top of a repository. Unfortunately the interface I_CmsRepositorySession
seems to be optimized for WebDAV and lacks some usefull operations like
modifing dates.

Downloading Libraries where it shouldn't be possible

It is possible to download the .jar file in modules/moduleNAME/lib/xxxx.jar when logged in and when not logged in. I wouldn't like it if anyone gets access to the library as it may contain passwords or something similar. So i think this is kind of security issue.

Don't know if I'm right, please let me know.

Greetings

Feature Request: create folders from ADE

It's not possible to create folder or extended folders directly from ADE, for
example I would like the user to add Image Gallery folders to store Photos of a
certain gallery.

start folder for user not synchronized when changed folder name

when setting a start folder in the edit user screen to some value and you later
change the folder name in the vfs, the start folder setting stays with the old
name. So after changing a folder name, the settings for users which have this
folder name within their start folder setting do not work anymore.

CategoryWidget ADE minOccurs="1"

When adding a content with Direct Edit (ADE), the Category widget will not
display properly if it is Mandatory. See the node "location" in the screenshot.

Created an attachment (id=346) [details]
Category widget will not display properly if it is Mandatory

Browsing download gallery with custom resource types shows up empty

There seems to be a problem with the download gallery. When trying to open one
with custom resource types it shows up empty even though it is looking in the
right folder. To get the results to show, one must manually specify the type.
This "Type" is not present from the download gallery browser when opening from
the editor and it is therefore not possible to use the gallery browser to
select custom content.

Impossible to install opencms to pre-configured database tables.

  • The setup dialog has two checkboxes that allow bypassing table-creation and
    user creation.
  • If both are de-selected in the next step one is asked if the existing databse
    should be dropped.
  • When deciding not to drop the pre-configured database tables setup goes back
    to the database screen.

This is a "nuisance" for DB-Admins who think that they know a bit more on how
opencms tables should be stored on their DB. Sometimes there might be real
reasons why one would separate the Database / Table creation and the setup of
OpenCms (highly customized DB settings).

cheers!
Achim

Localize file type in explorer view

When creating a new file, e.g. some structured content, the type is localized
in the wizard and the actual type name is not displayed.

However, in the explorer the actual type name is displayed and there's no
possibility to localize it.

This is inconsistent and might cause confusion with the users.

Example:

Real type name in the explorer: TermsPage
Localized name in the German wizard: AGB-Seite

There's no obvious correlation between these two so the user might not notice
that the "AGB-Seite" she created is actually of type TermsPage.

build.xml: Task openjpac missing dependencies

The execution of the target compile invokes OpenJPA if ${enhance}=1 (default!), but the invocation is missing libraries:

    <path id="opencms.input.libs.all">
        <fileset dir="${opencms.input.libs.compile}">
            <include name="**/*.jar" />
        </fileset>
        <fileset dir="${opencms.input.libs.runtime}">
            <include name="**/*.jar" />
        </fileset>
    </path>

    <openjpac>
        <fileset dir="${opencms.output.classes}/org/opencms/db/jpa/persistence">
            <include name="*.class" />
            <exclude name="*$*.class" />
        </fileset>
        <classpath>
            <pathelement location="${opencms.output.classes}" />
            <path refid="opencms.input.libs.all" /> <!-- This is missing! -->
        </classpath>
        <config propertiesFile="${opencms.input}/webapp/WEB-INF/classes/META-INF/persistence.xml" />
    </openjpac>

Preview of expired resource crashes after directly editing it

Steps to reproduce:

  1. Set the availability (date released) of a resource to be a future date and
    publish it.
  2. In the OpenCms Workplace click on the file to open the preview in a web
    browser.
  3. Click 'Edit' (direct edit) and make a change.
  4. Click the 'Exit', 'Save & Exit' or 'Publish directly' icon (and click OK on
    the 'Resources to be published' screen).
  5. An exception is thrown (Error reading resource from path "...").

Direct Edit

Issue:
Editor displayed when Direct Edit is used has changed since updating our
system from opencms 8.0 to 8.1.

The Direct Edit for 8.0 displays a black border around the edit information.
This editor is preserving request parameters. The Direct Edit for 8.1/8.2 is
not, thus the other is desired.
Both of these setups had the following in opencms-workplace.xml

History:
I am developer working for a corporation that was using opencms 6 and have
updated their website to use 8.0. We have synced our website using webdav and
our development work is being done with Rational Application Developer. Have
done configuration changes such using the app as ROOT, created custom
collectors, filestypes, etc.

CmsPointerLoader doesn't encode URLs properly

If a pointer contains characters which are not ASCII the redirect will fail.

Possible solution is to set the encoding in CmsPointerLoader#load and CmsPointerLoader#export

String pointer = new String(cms.readFile(resource).getContents());
to
String pointer = new String(cms.readFile(resource).getContents(), OpenCms.getSystemInfo().getDefaultEncoding());

and

res.sendRedirect(pointer);
to
res.sendRedirect(URIUtil.encodePath(pointer, OpenCms.getSystemInfo().getDefaultEncoding()));

(org.apache.commons.httpclient.util.URIUtil)

kind regards
Markus Daniel

cms:headincludes "defaults" attribute splits every char

Using the "defaults" attribute on cms:headincludes generates a lot of javascript includes because it splits every char of the value. i.e. if I use
<cms:headincludes defaults="my.js" />

It will generate a scrip include tag for m, y, ., j, s instead of one for my.js

It's because the CmsJspTagHeadIncludes uses m_defaults.split("|") instead of m_defaults.split("\|")

I made a patch, that I'll attach right away.

Build Issue

I'm trying to build the master branch wich "war" from ant, and I got this log :
Any idea ?

Buildfile: C:\dev\projets\opencms-core\build.xml
init:
[echo] Building OpenCms 8.0.2
[echo]
[echo] OpenCms input directory is: C:\dev\projets\opencms-core
[echo] OpenCms output directory is: C:\dev\projets\BuildCms
[echo] Java version detected: 1.6
[echo] Java target version: 1.5
[echo] Java home is: c:\Program Files\Java\jdk1.6.0_26
[echo] Tomcat home is: ${tomcat.home}
compile:
[javac] C:\dev\projets\opencms-core\build.xml:126: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1335 source files to C:\dev\projets\BuildCms\build\classes-core
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\containerpage\shared\rpc\I_CmsContainerpageServiceAsync.java:42: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\galleries\shared\rpc\I_CmsPreviewServiceAsync.java:36: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapService.java:42: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapServiceAsync.java:41: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\search\CmsSearchManager.java:75: warning: [deprecation] org.apache.lucene.analysis.snowball.SnowballAnalyzer in org.apache.lucene.analysis.snowball has been deprecated
[javac] import org.apache.lucene.analysis.snowball.SnowballAnalyzer;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:46: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\containerpage\shared\rpc\I_CmsContainerpageServiceAsync.java:226: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\galleries\shared\rpc\I_CmsPreviewServiceAsync.java:74: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.galleries.shared.rpc.I_CmsPreviewServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapService.java:135: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapService
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapServiceAsync.java:114: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:125: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:143: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:154: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:203: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\containerpage\shared\rpc\I_CmsContainerpageServiceAsync.java:42: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\galleries\shared\rpc\I_CmsPreviewServiceAsync.java:36: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapService.java:42: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapServiceAsync.java:41: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\search\CmsSearchManager.java:75: warning: [deprecation] org.apache.lucene.analysis.snowball.SnowballAnalyzer in org.apache.lucene.analysis.snowball has been deprecated
[javac] import org.apache.lucene.analysis.snowball.SnowballAnalyzer;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:46: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: package com.google.gwt.user.client.rpc
[javac] import com.google.gwt.user.client.rpc.SynchronizedRpcRequest;
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\containerpage\shared\rpc\I_CmsContainerpageServiceAsync.java:226: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\galleries\shared\rpc\I_CmsPreviewServiceAsync.java:74: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.galleries.shared.rpc.I_CmsPreviewServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapService.java:135: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapService
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\ade\sitemap\shared\rpc\I_CmsSitemapServiceAsync.java:114: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:125: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:143: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:154: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\gwt\shared\rpc\I_CmsCoreServiceAsync.java:203: cannot find symbol
[javac] symbol : class SynchronizedRpcRequest
[javac] location: interface org.opencms.gwt.shared.rpc.I_CmsCoreServiceAsync
[javac] @SynchronizedRpcRequest
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\search\CmsSearchManager.java:535: warning: [deprecation] org.apache.lucene.analysis.snowball.SnowballAnalyzer in org.apache.lucene.analysis.snowball has been deprecated
[javac] } else if ((snowballStemmer != null) && SnowballAnalyzer.class.equals(analyzerClass)) {
[javac] ^
[javac] C:\dev\projets\opencms-core\src\org\opencms\search\CmsSearchManager.java:537: warning: [deprecation] org.apache.lucene.analysis.snowball.SnowballAnalyzer in org.apache.lucene.analysis.snowball has been deprecated
[javac] analyzer = new SnowballAnalyzer(CmsSearchIndex.LUCENE_VERSION, snowballStemmer);
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 13 errors
[javac] 3 warnings

BUILD FAILED
C:\dev\projets\opencms-core\build.xml:126: Compile failed; see the compiler error output for details.

Total time: 1 minute

Setup with JPA PostgreSQL fails

OpenCms 8.0.3 / Tomcat 7.0.23 / PostgreSQL 9.1.2

The setup with JPA PostgreSQL fails. The setup with the "normal" PostgreSQL
driver works. The problem occurs on both Linux and Windows systems.

Log below:

78:
77: Shutdown completed, total uptime was 00:09:12.
76: Shutting down OpenCms, version 8.0.3 in web application "opencms"
75:
74:
73: at
org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:202)
72: at
org.opencms.setup.CmsSetupWorkplaceImportThread.kill(CmsSetupWorkplaceImportThread.java:110)
71: at org.opencms.main.CmsShell.exit(CmsShell.java:571)
70: java.lang.NullPointerException
69: at
org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:187)
68: at org.opencms.main.CmsShell.start(CmsShell.java:663)
67: at org.opencms.main.CmsShell.executeCommands(CmsShell.java:835)
66: at org.opencms.main.CmsShell.executeCommand(CmsShell.java:760)
65: ${user}@${project}>java.lang.NullPointerException
64: ${user}@${project}># Turn echo on
63: ... 18 more
62: at
org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34)
61: at
org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:2070)
60: at
org.apache.openjpa.datacache.QueryCacheStoreQuery$CachingResultObjectProvider.open(QueryCacheStoreQuery.java:644)
59: at
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
58: at
org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
57: at
org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
56: at
org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427)
55: at
org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:391)
54: at
org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
53: at
org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
52: at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
51: at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1785)
50: at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
49: at
org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1004)
48: at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
47: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1183)
46: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:72)
45: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:265)
44: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
43: Hint: ESCAPE-Zeichenkette muss null oder ein Zeichen lang sein
{prepstmnt 24024212 SELECT t1.group_id, t0.group_id, t0.user_id, t1.group_ou,
t1.group_name FROM public.cms_groupusers t0, public.cms_groups t1 WHERE
(t0.user_id = ? AND t1.group_id = t0.group_id AND t1.group_ou LIKE ? ESCAPE
'' AND t1.group_flags >= ?) ORDER BY t1.group_ou ASC, t1.group_name ASC
[params=?, ?, ?]} [code=0, state=22025]
42: Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: FEHLER:
ungültige ESCAPE-Zeichenkette
41: ... 6 more
40: at
org.opencms.db.CmsSecurityManager.checkRole(CmsSecurityManager.java:537)
39: at
org.opencms.db.CmsSecurityManager.checkRole(CmsSecurityManager.java:513)
38: at
org.opencms.db.CmsSecurityManager.hasRole(CmsSecurityManager.java:2745)
37: at
org.opencms.db.CmsDriverManager.getGroupsOfUser(CmsDriverManager.java:3842)
36: at
org.opencms.db.jpa.CmsUserDriver.readGroupsOfUser(CmsUserDriver.java:1304)
35: at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:319)
34: at
org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
33: at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
32: at
org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
31: at
org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
30: at
org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
29: at
org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251)
28: at
org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:40)
27: at
org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.handleCheckedException(QueryImpl.java:2111)
26: at
org.apache.openjpa.datacache.QueryCacheStoreQuery$CachingResultObjectProvider.handleCheckedException(QueryCacheStoreQuery.java:701)
25: at
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:155)
24: at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:70)
23: at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:118)
22: at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
21: at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4829)
20: at
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4869)
19: FailedObject: SELECT T_CmsDAOGroups, T_CmsDAOGroupUsers FROM
CmsDAOGroups T_CmsDAOGroups, CmsDAOGroupUsers T_CmsDAOGroupUsers WHERE
T_CmsDAOGroupUsers.m_userId=?1 AND
T_CmsDAOGroups.m_groupId=T_CmsDAOGroupUsers.m_groupId AND
T_CmsDAOGroups.m_groupOu LIKE ?2 AND T_CmsDAOGroups.m_groupFlags >= ?3 ORDER BY
T_CmsDAOGroups.m_groupOu, T_CmsDAOGroups.m_groupName [java.lang.String]
18: Hint: ESCAPE-Zeichenkette muss null oder ein Zeichen lang sein
{prepstmnt 24024212 SELECT t1.group_id, t0.group_id, t0.user_id, t1.group_ou,
t1.group_name FROM public.cms_groupusers t0, public.cms_groups t1 WHERE
(t0.user_id = ? AND t1.group_id = t0.group_id AND t1.group_ou LIKE ? ESCAPE
'' AND t1.group_flags >= ?) ORDER BY t1.group_ou ASC, t1.group_name ASC
[params=?, ?, ?]} [code=0, state=22025]
17: Caused by: <openjpa-2.1.0-r422266:1071316 fatal general error>
org.apache.openjpa.persistence.PersistenceException: FEHLER: ungültige
ESCAPE-Zeichenkette
16: at
org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:148)
15: at org.opencms.main.CmsShell.(CmsShell.java:447)
14: at
org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:1816)
13: at
org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:1196)
12: at
org.opencms.scheduler.CmsScheduleManager.initialize(CmsScheduleManager.java:235)
11: at
org.opencms.security.CmsRoleManager.checkRole(CmsRoleManager.java:110)
10: at
org.opencms.db.CmsSecurityManager.checkRole(CmsSecurityManager.java:539)
9: at org.opencms.db.jpa.CmsDbContext.clear(CmsDbContext.java:80)
8: at
org.opencms.db.jpa.CmsDbContext.commitAndClose(CmsDbContext.java:146)
7: at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:585)
6: FailedObject: SELECT T_CmsDAOGroups, T_CmsDAOGroupUsers FROM
CmsDAOGroups T_CmsDAOGroups, CmsDAOGroupUsers T_CmsDAOGroupUsers WHERE
T_CmsDAOGroupUsers.m_userId=?1 AND
T_CmsDAOGroups.m_groupId=T_CmsDAOGroupUsers.m_groupId AND
T_CmsDAOGroups.m_groupOu LIKE ?2 AND T_CmsDAOGroups.m_groupFlags >= ?3 ORDER BY
T_CmsDAOGroups.m_groupOu, T_CmsDAOGroups.m_groupName [java.lang.String]
5: Hint: ESCAPE-Zeichenkette muss null oder ein Zeichen lang sein
{prepstmnt 24024212 SELECT t1.group_id, t0.group_id, t0.user_id, t1.group_ou,
t1.group_name FROM public.cms_groupusers t0, public.cms_groups t1 WHERE
(t0.user_id = ? AND t1.group_id = t0.group_id AND t1.group_ou LIKE ? ESCAPE
'' AND t1.group_flags >= ?) ORDER BY t1.group_ou ASC, t1.group_name ASC
[params=?, ?, ?]} [code=0, state=22025]
4: <openjpa-2.1.0-r422266:1071316 fatal store error>
org.apache.openjpa.persistence.RollbackException: FEHLER: ungültige
ESCAPE-Zeichenkette
3:
2: OpenCms property file: "C:\Programme\Apache Software Foundation\Tomcat
7.0\webapps\opencms\WEB-INF\config\opencms.properties".
1: OpenCms WEB-INF path: "C:\Programme\Apache Software Foundation\Tomcat
7.0\webapps\opencms\WEB-INF".

Direct Edit: wrong redirect on Delete action

Hello,

sometimes when I use delete content using Direct Edit I get an empty page.
I'm using opencms 7.5.3 but if I use the same installation on another pc it works right.

How can I fix it? Is there a way to know what file has been corrupted?

Thanks in advance.

collector should not list a structured document if it doesn't have the current locale

In a multilanguage site, the collector should not list a structured document if
it doesn't have the current locale. Otherwise, the pagination fails because the
documented is counted and listed, even if no content is shown.
You can see this behavior in the Flower Demo by deleting a localized content in
a news element.
The right behavior is the one of the search, where documents without the set
locale are not listed.

xml-apis jar contains misleading version number in filename

The xml-apis jar is named xml-apis-2.9.1.jar though the version seems to be
1.3.04The xml-apis jar is named xml-apis-2.9.1.jar though the version seems to be
1.3.04

unzip -p xml-apis-2.9.1.jar META-INF/MANIFEST.MF | less

Name: org/apache/xmlcommons/Version
Comment: XmlCommonsExternal for http://xml.apache.org/ subproject's use
Implementation-Title: org.apache.xmlcommons.Version
Implementation-Version: 1.3.04
Implementation-Vendor: Apache Software Foundation
Implementation-URL: http://xml.apache.org/commons/

HTML Gallery does not include css from modules

When selecting something in the HTML Gallery and viewing it in the preview tab
the css from our module is not included in the iframe and thus the html is
rendered wrong making the preview pane useless.

This is a major problem. With alot of elements in the gallery not being able to
see a preview makes selecting the right element time-consuming.

Another "anoing" change from our old version 7 of OpenCms is that a preview is
only shown after selecting the element from the gallery. In version 7 there was
a preview accessible right under the GalleryListing making "browsing" the
gallery easy.

System error message i18n character set problem

During translation of OpenCms 8.0.3 error related with result message encoding
for Cyrillic characters was founded.

The system error messages in property files (for example,
/system/workplace/locales/ru/messages/org/opencms/db/generic/messages_.properties)
are displayed with incorrect encoding on the error message page.

The reason is absent of response encoding UTF-8 in the
org.opencms.main.OpenCmsCore.errorHandling method - UTF-8 encoding should be
set here.

As temporal decision we are using custom HTTP filter to set character set for
all responses which have no explicitly set encoding (Filter class is attached).

Internar link error in TinyMCE

I've noticed that when creating a new internal link in TinyMCE editor is saved in the field link/target value "/sites/default/..." instead of "/sites/MySites/...."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.