Release Notes for XWiki 7.2 Milestone 1

Version 28.1 by Thomas Mortagne on 2015/06/30

This is the release notes for XWiki Commons, XWiki Rendering, XWiki Platform and XWiki Enterprise. They share the same release notes as they are released together and have the same version.

<insert description of release here>

New and Noteworthy (since XWiki 7.1)

Full list of issues fixed and Dashboard for <version>.

Nested spaces

Error

TODO

Miscellaneous

<insert misc user stuff and important bug fix descriptions here in a list, when they are too small to warrant a section by themselves - Change the version in the URL below!>

See the full list of JIRA issues fixed in this release.

For Developers

Nested spaces

Since nested spaces were already planned and supported in APIs like DocumentReference there is not too much changes for those who were using recent API but there is still some and here are the main ones.

Space reference instead of space name

The heart of the implementation is that the field that used to contain the unique document space now contain the possibly nested space reference. In practice it means that:

  • "." (dot), ":" (colon) and "\" (baskslash) which are part of a space name will now be escaped (using "\" character) in the database document space (XWD_WEB) field. For example a space named "Space:with.special\char" will be stored as "Space\:with\.special".
  • same as for the database XWikiDocument/Document#getSpace() now return a serialized reference of the space instead of what used to be the unique space name (basically it return what's in the database). Same logic for XWikiDocument#setSpace(). Those field are deprecated since a long time but still used a lot...

Space separator properly taken into account

The reference syntax specification was already indication that "." was supposed to be escaped in the space part of the reference but it was not really taken into account so not escaping it was not making any difference. This is now fixed in the various standard String reference resolvers so a reference that don't follow the specification and did not escaped the "." in the space part will be cut is several nested spaces. Anything that was serialized with one of the standard serializers was properly escaped so not worry here, the issue will be more for hand written or hardcoded String references.

New XAR format

To support exporting/importing nested spaces some changes has been made to the XAR format. The format remain upward and downward compatible (except that you won't get nested spaces in your < 7.2 instance obviously).

Two new attributes has been added to the <xwikidoc> root XML element

  • reference: the complete local reference of the document in standard reference format. <web> and <name> are deprecated (but still set). <web> keep containing the (unescaped) space name when there is only one space and will contain the space reference when there is several (when imported in a < 7.2 instance a document exported from a nested space will end up in a space having as name the space reference).
  • locale: the locale of the document. <language> is deprecated. It was not technically needed in the context of nested spaces but it makes having the reference as attribute more consistent. It also make getting all the entries from a new format XAR easier and faster since document space and name would be placed anywhere in the document.

New reference related APIs

Various new API around references has been introduced while adding support for nested spaces.

Complete references Providers

Complete references Providers (for DocumentReference, SpaceReference and WikiReference) with default or current hints. They allow getting complete reference created from each default or current part of those references (for example in SpaceReference you end up with the space of the XWikiContext document and the XWikiContext wiki)

@Inject
Provider<DocumentReference> defaultDocumentReference;

@Inject
@Named("current")
Provider<DocumentReference> currentDocumentReference;

org.xwiki.model.reference.EntityReferenceProvider

org.xwiki.model.reference.EntityReferenceProvider replaces org.xwiki.model.reference.EntityReferenceValueProvider. It's essentially the same thing but with EntityReference instead of string which allow getting multiple spaces when you ask for the current EntityType.SPACE for example.

@Inject
EntityReferenceProvider provider;

Properly support any kind of reference in getDocument

com.xpn.xwiki.XWiki#getDocument(EntityReference) and com.xpn.xwiki.api.XWiki#getDocument(EntityReference) support any kind of reference properly (e.g. a space reference will return the space home page, an object reference will return the object document reference, etc).

New helpers in EntityReference

  • boolean equals(EntityReference otherReference, EntityType to): same as equals but only take into account reference parts up to the passed entity type (included)
  • boolean equals(EntityReference otherReference, EntityType from, EntityType to): same as equals but only take into account reference parts between passed entity types (included)
  • boolean equalsNonRecursive(EntityReference otherReference): same as equals but does not take into account the parent

New helpers in LocalDocumentReference

  • LocalDocumentReference(String pageName, EntityReference spaceReference): allowed created a LocalDocumentReference from a space reference instead of just the space name

New model Script Service helpers

  • new help to escape an entity name according to default reference syntax as in:
    $services.model.escape('some.space:with\specialchars', 'SPACE')

    will print

    some\.space\:with\\specialchars

New readonly XWikiContext provider

You can inject a new "readonly" XWikiContext the following way:

@Inject
@Named("readonly")
Provider<XWikiContext> roXWikiContextProvider;

The difference with default provider is that the readonly one won't try to create a new XWikiContext and will return null if it can't find any. It's been introduce for some low level components that were used during XWikiContext creation but in general it should be used by any component that only search for some XWikiContext property that might be null even in a valid XWikiContext.

Deprecated and Retired projects

<description of deprecated and retired projects>

Upgrades

The following dependencies have been upgraded:

Miscellaneous

  • Objects, attachments and the document's class are now clearly not considered content, but metadata. Thus, any change in these will set the document's (XWikiDocument) metadataDirty flag to true and not touch the document's contentDirty flag unless there is an actual change in the document's content or title fields. This is also in line with the original intent of the contentAuthor document field. The direct impact of this is that the contentAuthor field will be updated only when the content is changed and thus the programming/script rights of a document will be changed much less often than before and much less by accident.

Translations

The following translations have been updated: 

Tested Browsers & Databases

Performances tests compared to <last super stable version>

<a summary of the comparison with latest super stable version>

More details on <link to the test report>.

Known issues

Backward Compatibility and Migration Notes

General Notes

When upgrading make sure you compare your xwiki.cfg, xwiki.properties and web.xml files with the newest version since some configuration parameters may have been modified or added. Note that you should add xwiki.store.migration=1 so that XWiki will attempt to automatically migrate your current database to the new schema. Make sure you backup your Database before doing anything.

Issues specific to XWiki 7.2M1

Nested spaces

See previous Nested spaces section for details on what changes in the way some API and the database are dealing with the document space.

Templates

All the templates specific to Colibri Skin had been moved to it. If your skin depends on some of these templates, you should set Colibri as parent of your skin.

API Breakages

The following APIs were modified since <project> <version - 1>:

<clirr output here>

Get Connected