Release Notes for XWiki Enterprise 4.0 Milestone 2

Version 24.1 by Thomas Mortagne on 2012/04/05

Before upgrading to this version, be sure to have a working backup of your database(s).

This is the second and last milestone of the XWiki Enterprise 4.0 version (Roadmap). This version mainly introduces various ways of customizing users directory and profiles and it also bring all comments features to annotation (answer, threaded annotation, etc.) by merging the two concepts in one comment with optional precise location.

New and Noteworthy (since XWiki Enterprise 4.0 Milestone 2 version)

Extension Manager improvements

TODO

Annotations merged with Comments by default

Starting with version 4.0M2, annotations have been merged by default with comments. More specifically, this means:

  • You can now reply to an annotation (threaded annotations)
  • The Annotations tab is now replaced by the Comments tab where you can see both annotations and comments
  • The default annotation class is now XWiki.XWikiComments instead of AnnotationCode.AnnotationClass

annotations-merged-with-comments-screenshot.png

User profile customization

An admin can now configure which information is displayed in the user profile (the "Profile" tab of a user's profile page). A new section has been added in Administration where an admin can configure which fields of the XWikiUsers class to display. The admin still has to add the new fields to the class the old way, using the class editor for the page XWiki.XWikiUsers, but he no longer needs to write any code.

userProfileCustomizer-screenshot.png

User directory improvements and user customized view

The UserDirectory can now display, as columns, filterable and sortable properties of users, as opposed to the previous version where you just had a fixed column that displayed a composed name in the form "first_name last_name (profilePageID)".

In addition, each user can now customize his view over the UserDirectory by adding or removing columns, or resetting to default.

The default displayed columns are "first_name" and "last_name", and the unmodifiable columns (that will always be displayed as first columns) are "_avatar" and "doc.fullName".

customizableUserDirectory-customize.png

New Velocity tool to serialize Java objects to JSON format

We introduced a new Velocity tool to be able to serialize Java objects to the JSON format. Checkout the documentation. Here's an example that shows how to serialize a Map object:

{{velocity}}
#set($map = {'name': 'xwiki', 'values': [1, 2, 3], 'enabled': true})
$jsontool.serialize($map)
{{/velocity}}

The result is:

{"name":"xwiki","values":[1,2,3],"enabled":true}

We also refactored XWiki.LiveTableResultsMacros page to generate the live table JSON in memory using a Map, which is serialized in the end using the new JSON tool. This makes it easier to customize the live table JSON. For example this is how the JSON for the AppWithinMinutes applications live table is generated:

{{include document="XWiki.LiveTableResultsMacros" /}}

{{velocity}}
#if($xcontext.action == 'get' && "$!{request.outputSyntax}" == 'plain')
  $response.setContentType('application/json')
  #set($map = {})
  #gridresult_buildJSON("$!request.classname" $request.collist.split(',') $map)
  ## Change the URL and permission for the edit and delete actions:
  ## * edit action must trigger the AppWithinMinutes wizard.
  ## * delete action must delete the application space.
  #foreach($row in $map.get('rows'))
    #set($editQueryString = "appName=$escapetool.url($row.get('doc_space'))")
    #set($discard = $row.put('doc_edit_url', $xwiki.getURL('AppWithinMinutes.CreateApplication', 'view', $editQueryString)))
    #if($row.get('doc_hasdelete'))
      ## Deleting an application requires space administration rights.
      #set($discard = $row.put('doc_hasdelete', $xwiki.hasAccessLevel('admin', $xcontext.user, "${row.get('doc_space')}.WebPreferences")))
    #end
    #set($rowDocRef = $services.model.createDocumentReference($row.get('doc_wiki'), $row.get('doc_space'), $row.get('doc_name')))
    #set($discard = $row.put('doc_delete_url', $xwiki.getURL($rowDocRef, 'deletespace', '')))
  #end
  $jsontool.serialize($map)
#end
{{/velocity}}

ColorThemes gradients customizable from ColorTheme Wizard

In version 3.4 we deprecated the old default bundled ColorThemes (because of incompatible variable mix). In version 4.0 this is no longer the case, old default bundled ColorThemes (like Bordo, Nature, etc.) are now being compatible with the 3.4 Colibri Skin changes. We fixed this by adding new gradient ColorThemes variables. All these gradient ColorTheme variables are now changeble from the ColorTheme Wizard.

ColorThemeWizard.png

Bug fixes and improvements

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

For Developers

Class reference always local

The class reference is now stored as a local reference in the BaseObject/BaseCollection which means that like in the storage you can't assign a class coming from another wiki to an xobject which was causing some issue when copying wikis. You can still provide absolute reference but the wiki reference will be automatically removed.

Upgrades

The following dependencies have been upgraded:

  • Json-lib 2.4

Tested Browsers

Here's the list of browsers tested with this version (i.e. browsers that we've tested as working - Check the list of supported browsers):

Firefox
11.0
Chrome
18

Known issues

Test Report

You can check the manual test report to learn about what was tested and the results on various browsers.

Backward Compatibility and Migration Notes

General Notes

If you're running in a multiwiki setup you'll also need to define the property xwiki.store.migration.databases in your xwiki.cfg file if you want to explicitly name some databases to be migrated as the default is now to migrate all databases. Database that are not migrated could not be accessed.

You may also want to import the default wiki XAR in order to benefit from all the improvements listed above.

Always make sure you compare your xwiki.cfg and xwiki.properties files with the newest version since some configuration parameters were 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.

Annotations Application

If you were/are using a custom annotations class, other than the previously default AnnotationsCode.AnnotationsClass, in the annotations configuration then the merging-with-comments feature will not be available to you. What you can do is to enable back the Annotations tab by going to the Administration > Look and Feel > Page Elements and changing the value of "Show document annotations " from "No" to "Yes". Now you will still be able to use your custom annotations without being affected by the changes.

Also, a migration script will automatically convert all your existing default annotations (that are using the default AnnotationCode.AnnotationClass) to the new default class (XWiki.XWikiComments). After the migration, the new database version will be 40001.

User profile customization

If you have a customized user profile tab (you have edited the "XWiki.XWikiUserProfileSheet" page), pay attention when importing the default XAR. If you want keep your customization and don't use the new User Profile Customization UI, just skip the "XWiki.XWikiUserProfileSheet" page. Also, if you do so, the new "User Profile" section in Administration will be useless.

API Breakages

The following APIs were modified since version 3.5:

ERROR: 7012: org.xwiki.component.descriptor.ComponentRole: Method 'public java.lang.reflect.Type getRoleType()' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public org.xwiki.component.descriptor.ComponentDescriptor getComponentDescriptor(java.lang.reflect.Type, java.lang.String)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public java.util.List getComponentDescriptorList(java.lang.reflect.Type)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public boolean hasComponent(java.lang.reflect.Type)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public boolean hasComponent(java.lang.reflect.Type, java.lang.String)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public java.lang.Object lookupComponent(java.lang.reflect.Type)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public java.lang.Object lookupComponent(java.lang.reflect.Type, java.lang.String)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public java.util.List lookupList(java.lang.reflect.Type)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public java.util.Map lookupMap(java.lang.reflect.Type)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public void unregisterComponent(java.lang.reflect.Type, java.lang.String)' has been added to an interface
ERROR: 7012: org.xwiki.component.manager.ComponentManager: Method 'public void unregisterComponent(org.xwiki.component.descriptor.ComponentDescriptor)' has been added to an interface
ERROR: 7002: org.xwiki.component.annotation.DefaultComponentDependencyFactory: Method 'protected java.lang.Class getFieldRole(java.lang.reflect.Field)' has been removed
ERROR: 8001: org.xwiki.bridge.AttachmentName: Class org.xwiki.bridge.AttachmentName removed
ERROR: 7002: org.xwiki.bridge.DocumentAccessBridge: Method 'public java.io.InputStream getAttachmentContent(org.xwiki.bridge.AttachmentName)' has been removed
ERROR: 7002: org.xwiki.bridge.DocumentAccessBridge: Method 'public java.lang.String getAttachmentURL(org.xwiki.bridge.AttachmentName, boolean)' has been removed
ERROR: 7002: org.xwiki.bridge.DocumentAccessBridge: Method 'public java.util.List getAttachmentURLs(org.xwiki.bridge.DocumentName, boolean)' has been removed
ERROR: 7002: org.xwiki.bridge.DocumentAccessBridge: Method 'public java.util.List getAttachments(org.xwiki.bridge.DocumentName)' has been removed
ERROR: 7002: org.xwiki.bridge.DocumentAccessBridge: Method 'public org.xwiki.bridge.DocumentName getCurrentDocumentName()' has been removed
ERROR: 7002: org.xwiki.bridge.DocumentAccessBridge: Method 'public org.xwiki.bridge.DocumentModelBridge getDocument(org.xwiki.bridge.DocumentName)' has been removed
ERROR: 7002: org.xwiki.bridge.DocumentAccessBridge: Method 'public org.xwiki.bridge.DocumentName getDocumentName(java.lang.String)' has been removed
ERROR: 7002: org.xwiki.bridge.DocumentModelBridge: Method 'public org.xwiki.bridge.DocumentName getDocumentName()' has been removed
ERROR: 8001: org.xwiki.bridge.DocumentName: Class org.xwiki.bridge.DocumentName removed
ERROR: 4001: org.xwiki.gwt.user.client.ui.ListBox: Removed com.google.gwt.event.dom.client.KeyDownHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.user.client.ui.ListBox: Removed com.google.gwt.event.dom.client.KeyPressHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.user.client.ui.ListBox: Removed com.google.gwt.event.dom.client.KeyUpHandler from the set of implemented interfaces
ERROR: 7002: org.xwiki.gwt.user.client.ui.ListBox: Method 'public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent)' has been removed
ERROR: 7002: org.xwiki.gwt.user.client.ui.ListBox: Method 'public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent)' has been removed
ERROR: 7002: org.xwiki.gwt.user.client.ui.ListBox: Method 'public void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent)' has been removed
ERROR: 7006: org.xwiki.test.ui.browser.IgnoreBrowser: Return type of method 'public java.lang.String[] value()' has been changed to java.lang.String
ERROR: 7012: org.xwiki.test.ui.browser.IgnoreBrowser: Method 'public java.lang.String version()' has been added to an interface
ERROR: 7002: org.xwiki.test.ui.po.CommentsTab: Method 'public void clickAddComment()' has been removed
ERROR: 7002: org.xwiki.test.ui.po.CommentsTab: Method 'public void clickSaveComment()' has been removed
ERROR: 7002: org.xwiki.test.ui.po.CommentsTab: Method 'public void setCommentContent(java.lang.String)' has been removed
ERROR: 8001: org.xwiki.test.ui.po.DeleteConfirmationPage: Class org.xwiki.test.ui.po.DeleteConfirmationPage removed
ERROR: 8001: org.xwiki.test.ui.po.DeletePage: Class org.xwiki.test.ui.po.DeletePage removed
ERROR: 7006: org.xwiki.test.ui.po.ViewPage: Return type of method 'public org.xwiki.test.ui.po.DeletePage delete()' has been changed to org.xwiki.test.ui.po.ConfirmationPage
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.IELinePlugin: Removed com.google.gwt.event.dom.client.KeyDownHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.IELinePlugin: Removed com.google.gwt.event.dom.client.KeyPressHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.IELinePlugin: Removed com.google.gwt.event.dom.client.KeyUpHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.IELinePlugin: Removed com.google.gwt.event.shared.EventHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin: Removed com.google.gwt.event.dom.client.KeyDownHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin: Removed com.google.gwt.event.dom.client.KeyPressHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin: Removed com.google.gwt.event.dom.client.KeyUpHandler from the set of implemented interfaces
ERROR: 4001: org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin: Removed com.google.gwt.event.shared.EventHandler from the set of implemented interfaces
ERROR: 7002: org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin: Method 'public void onKeyDown(com.google.gwt.event.dom.client.KeyDownEvent)' has been removed
ERROR: 7002: org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin: Method 'public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent)' has been removed
ERROR: 7002: org.xwiki.gwt.wysiwyg.client.plugin.line.LinePlugin: Method 'public void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent)' has been removed
ERROR: 7004: org.xwiki.gwt.wysiwyg.client.plugin.list.ListBehaviorAdjuster: In method 'public ListBehaviorAdjuster()' the number of arguments has changed
ERROR: 7002: org.xwiki.gwt.wysiwyg.client.plugin.list.ListBehaviorAdjuster: Method 'protected void dispatchKey(com.google.gwt.user.client.ui.Widget, int, org.xwiki.gwt.dom.client.Event)' has been removed
ERROR: 7002: org.xwiki.gwt.wysiwyg.client.plugin.list.ListBehaviorAdjuster: Method 'public org.xwiki.gwt.user.client.ui.rta.RichTextArea getTextArea()' has been removed
ERROR: 7002: org.xwiki.gwt.wysiwyg.client.plugin.list.ListBehaviorAdjuster: Method 'public void setTextArea(org.xwiki.gwt.user.client.ui.rta.RichTextArea)' has been removed
ERROR: 7004: org.xwiki.gwt.wysiwyg.client.plugin.macro.exec.InsertExecutable: In method 'public InsertExecutable(org.xwiki.gwt.wysiwyg.client.plugin.macro.MacroSelector)' the number of arguments has changed
ERROR: 7012: org.xwiki.wysiwyg.server.WysiwygEditorConfiguration: Method 'public java.lang.Integer getHistorySize()' has been added to an interface
Tags:
   

Get Connected