2011-03-01

Jease 1.8 released

Gallery, Thumbnails, Roles, Usability

Please read carefully before upgrading:

  • Before performing an upgrade, make a backup of your database directory.
  • If you upgrade from a previous version, you have to call http://localhost:8080/cms/setup after deploying the new version. This will automatically upgrade all required data structures.
  • If you run into character encoding issues with Files storing text contents or Revisions after the upgrade, please see the "Character Encoding Upgrade Notice" below.

This release adds a new content type called Gallery... the name says it all... a Gallery is a container for images which are rendered as image gallery. Along with the Gallery comes a new feature for creating thumbnails: just call any image delivered via Jease with an additional scale-parameter (http://server/...image.jpg?scale=200) which creates a (cached) thumbnail of your image with the given size.

The second new feature is an highly improved user management by introducing roles. A role defines which content types a user can create or edit. This is far more flexible than the former approach of differencing users in privileged and non-privileged users. Per default Jease creates two roles: Administrators and Editors (who are not allowed to create Scripts, Transits or Factories). You can easily change existing roles or add new roles. Additionally Jease stores now all passwords as MD5-hashes.

Another new feature is some improvements regarding the usability of the CMS: Jease allows now to change the root node in the tree navigation by simply clicking a "Go-Into" icon. This is very useful for deep nested content trees. Additionally the node viewer has a new toolbar button which opens the current page in a dedicated browser window (or tab).

Another important changes are some fixes in regard to UTF-8. There were some gaps where an explicit UTF-8 encoding was missing, so Jease fall back to the default encoding of the server (which could be something different than UTF-8). This could result in problems when migrating a Jease instance from a non-UTF-8 instance to a UTF-8 instance. I've fixed now all missing pieces, so that Jease runs from now on with UTF-8 regardless of the servers default encoding. Please read the encoding upgrade if you run into encoding problems now.

Gallery

  • Implementation for an (image) Gallery content type.
  • Thumbs: allow all image-containing content types to create thumbs via scale-parameter. Caches only one scaled image per original to prevent overflooding of cache area.
  • Lightbox: enabled titles and overlay; improved rules for triggering lightbox.
  • Media: append id to file-parameter, so lightbox can detect images.

User-Management

  • Store passwords as md5-hashes.
  • Introduced roles: a role determines which content types a user can create or edit. Removed obsolete #isPrivileged() from Content (Factory, Script, Transit).
  • Force unique user identity (login, email).
  • Added Users.queryByEmail() as helper for retrieving a user by email address.
  • Changed Users.queryByLogin(), so the login is also matched against the email address (allows to login either with login name or email address).
  • Added jfix.util.Crypts.md5 for hashing inputs into md5

Usability

  • Go-Into-Feature for NavigationTree: it is now possible to switch the "root" context in the tree navigation (useful for deep nested sites).
  • Added "fullscreen" mode ("open in browser") to NodeViewer and refactored NodeViewer into jfix.zk.WebBrowser. Use WebBrowser for opening links in LinkEditor.
  • Open current Node in NodeBrowser (e.g. when linking via CKEditor). This avoids the user-unfriendly need to traverse from Root to current context.

UTF-8

  • Use explicit UTF-8 encoded Readers/Writers for creating revisions and backups.
  • jfix.zk.Medias & jfix.servlet.Servlets: fixed missing UTF-8 encoding.
  • jfix.zk.Mediafield: use UTF-8 encoded writer.
  • jfix.util.Files: add UTF-8 aware creators for Readers/Writers.

Access

  • Store passwords as md5-hashes.
  • Skip authorization when user is logged in and user can view contents guarded by Access-Object.
  • Added helper methods (getGuard() / isGuarded()) to Authorizations.
  • Fixed Contents.getGuard(): start traversing from current node instead of parent node, so Access objects work in Composites as expected.

Search

  • Don't index access-guarded content in site search
  • Deliver only top-level container for content contained in Composites (= paged containers).
  • Reference: added missing fulltext-method.
  • Use &nsbp; before ยป in Searchresult to avoid ugly line breaks.
  • Searchform: use page root as default target.

Other changes

  • Mails: added ReplyToSender to Mail-Service so answer is directed to sender regardless if smtp-server rewrites From-header (e.g. GoogleMail).
  • Changed implementation of Navigations.getPageTitle(), so it is better suited for jease.org: use now title of root node and default content of root along with title of content.
  • Added more semantic markup for content type renderers for more fine grained control via CSS/jQuery; also added special parameter which creates an image-name from content-type (replacing / with .) for better handling via Lightbox.
  • Added jfix.zk.Scrollbox (simple component which wraps another component in a container with fixed size and shows scrollbars when needed).

Bug fixes

  • Zip-Imports: fixed bug for zips which contain files only (no inner folder structure, files living in root of zip-archive).

Build

  • build.xml: exchanged CATALINA_HOME with SERVLET_API.

Dependencies

  • ZK 5.0.6
  • db4o 7.12.184.15484
  • CodeMirror 0.94. Also a fix for a bug raised in IE due to trailing comma in zk-codemirror.

Charset Encoding Upgrade Notice

The 1.8 release fixed some missing explicit UTF-8 encodings. This doesn't make any difference if you're running your server already with UTF-8 as default encoding. If not, you might run into encoding issues with Files storing text-contents or Revisions and non-ASCII-characters. So if you use non-ASCII characters and your server didn't run with UTF-8 encoding, you might see garbled characters in Files (with content-type=text) or Revisions.

  1. To upgrade to UTF-8, create a backup of your database folder first.
  2. Then create a Script with id=upgrade.jsp in the CMS and enter the code below.
  3. Please set encoding to the encoding you've used on your server.
  4. Run this script by clicking "View". Please run this script only once (!!!), otherwise you'll end up with a really messed up character encoding.
<%@page import="org.apache.commons.io.*,jfix.db4o.*,jease.cms.domain.*,jease.cmf.service.*"%>
  
<%
  String encoding = "ISO-8859-1";
  
  for(File file : Database.query(File.class)) {
    if(file.getContentType().startsWith("text")) {
      String str = FileUtils.readFileToString(file.getFile(), encoding);
      FileUtils.writeStringToFile(file.getFile(), str, "UTF-8");
    }  
  }
  
  for(Version version : Database.query(Version.class)) {
      String str = FileUtils.readFileToString(version.getBlob().getFile(), encoding);
      FileUtils.writeStringToFile(version.getBlob().getFile(), str, "UTF-8");  
  }
%>

Last modified on 2011-03-01 by Maik Jablonski

Download Jease

1970-01-01

You can download the latest binary release bundle here.