Release Notes for XWiki 6.3-milestone-1

Last modified by Thomas Mortagne on 2023/10/13

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.

This milestone is mostly about improvements but it also introduce new Velocity tools and macros and also add support for catching and display nicely exceptions in Velocity.

New and Noteworthy (since XWiki 6.2)

Full list of issues fixed and Dashboard for 6.3.

Extension Manager and Repository improvements

  • <scm> element from Maven pom.xml is now supported and has been added to the standard in the API
  • <issueManagement> element from Maven pom.xml is now supported and has been added to the standard in the API
  • When importing an extension unknown but valid versions are not removed anymore

User Directory customized globally

The administrator of the wiki can customize the default columns to be displayed by the user directory.

userDirectoryGloballyConfigurableInAdministration.png

For more information, see the documentation

Flamingo

The Flamingo skin was introduced as experimental in XWiki 6.0 & 6.1 and has been deemed usable in XWiki 6.2. However we're still tuning details. It happens that we did not all agree on the location of the "Add" button (some wanted it inside the content, next to the "Edit" buttons and others wanted it back at the top - You can follow the discussion here if you're interested emoticon_wink). Thus we've decided for the moment to put it back at the top where it was in the Colibri skin in order to not force our users to learn a new location for the moment. This is still a discussion in progress and if you have inputs and preferences please do not hesitate to let us know on the XWiki Users Mailing List or on the related Issue. Thanks!

  • The 'Add' button has been moved back to the top bar and the search bar to the right:

    flamingo-add.png

  • When you click on the 'add' button, the order of the choices have been inverted, to propose to create a page first, then a space, and finally a wiki:

    flamingo-add-options.png

  • The Wiki/Space/Page buttons in the top bar have been changed and are no longer split into two parts. You do not need to click the arrow specifically any more to open the contextual menu:

    flamingo-menubar.png

  • To navigate to the current Wiki/Space/Page in the top bar, there is now a new "Go to..." item:
    WikiSpacePage
    flamingo-goto-wiki.pngflamingo-goto-space.pngflamingo-goto-page.png
  • The languages selection is now located in the top bar. It is displayed only when the multilingual mode is enabled:

    languages.png
    When there is no translation available:
    languages-no-alternative.png
    When there is some translations available:
    languages-with-alternatives.png

  • The Livetable is now responsive to the screen size, so you can use them with smartphones:

    Livetable-Responsive.png

  • The "Add" button has now a default action to create a new page. You can still create other kind of contents (Wiki, Space) by using the arrow, just like we do with the different "edit" actions.

    flamingo-add.png

  • The Flamingo Theme Application now uses a new Color Picker.

    NewColorPicker.png

  • To sum up, this is the new look:

    flamingo.png

Miscellaneous

  • The default color themes (DefaultColorTheme and FlamingoDefaultTheme) have been renamed Azure and Charcoal.
  • In the select field of the 'color theme' property, in the administration, the color themes are now ordered by name.
  • In the administration, clicking the "Customize" button for customizing a Skin or a Color Theme now opens the page it leads to in edit mode.
  • Improved L&F when a template fails to render:

    templateerror.png

  • We have created dedicated groups for Colibri and Flamingo Themes inside the Administration. Every themes can be used with both skins but they looks better when they are used with the corresponding theme.

    ColorThemeDisplayer.png

  • The start/stop shell scripts provided with the Standalone Distribution have been improved to display usage information when an invalid parameter is passed or when the -h or --help parameters are passed. Also note that the start script doesn't stop anymore a running XWiki instance if the -k or --kill parameter is passed (this parameter has been removed).
  • It's now possible to configure the maximum number of search results to be returned from a search operation using xwiki.authentication.ldap.maxresults property in xwiki.cfg file. See LDAP documentation.
  • The "Empty is today" option on Date fields of classes created with Application Within Minutes is now working as expected. See XWIKI-10296
  • Office macro can now take a URL as input. See Office Macro for more details

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

For Developers

Velocity macros to display users and groups

We extracted the code that displays in view mode a property of type 'List of Users' and 'List of Groups' from the corresponding custom displayers (found in displayer_users.vm and displayer_groups.vm) into two Velocity macros that can be used to display arbitrary users and groups, even when you don't have an object. Here's how you can use them:

{{velocity}}
{{html wiki="true"}}
= Users =
== Just one ==
#displayUser('XWiki.Admin')

== List of users ==
#displayUser(['Admin', 'XWiki.mflorea'])

== A reference of a user ==
#displayUser($xcontext.userReference)

== A list of references of users ==
#displayUser([$xcontext.userReference, $otherUserReference])

= Groups =
== Just one ==
#displayGroup('XWiki.XWikiAdminGroup')

== List of groups ==
#displayGroup(['XWikiAdminGroup','XWiki.HRGroup'])

== A reference of a group ==
#set($adminGroupRef = $services.model.resolveDocument('XWiki.XWikiAdminGroup'))
#set($allGroupRef = $services.model.resolveDocument('XWiki.XWikiAllGroup'))
#displayGroup($adminGroupRef)

== A list of references of groups ==
#displayGroup([$adminGroupRef, $allGroupRef])

{{/html}}
{{/velocity}}

New Velocity Tools

  • New URL Tool $urltool: A new tool has been added with one method to parse query string from the URL $urltool.parseQuery(String). The value returned by this is method is a Map<String, List<String>> which maps parameter names to (possibly multiple) values, and can be passed e.g. directly into $escapetool.url(Map<String, ?>) to convert it back to a string. This is useful e.g. in cases where one want to pass a complete query string around between requests, as it happend for the PDF export; the $urltool allows for a sane deserialization of the value passed around.
  • New Exception Tool $exceptiontool: A new tool to manipulate Java Exceptions (get root cause, convert into String, etc).
  • $stringtool moved from org.apache.commons.lang3.StringUtils to org.xwiki.text.StringUtils which extends the first one and add new stuff

Ability to catch Exceptions from Velocity

A new Velocity Directive has been added to catch Exceptions from Velocity. In addition a new #displayUnhandledException() velocity macro has also been added to nicely display an exception to the user.

For example:

#try()
 #set($outputSyntax = $xwiki.getAvailableRendererSyntax($request.outputSyntax, $request.outputSyntaxVersion))
 #if ($outputSyntax)
   ## If the passed syntax is not an HTML-compatible syntax we need to HTML-escape it so that it can be
   ## displayed fine in HTML (since at the point this vm file is called we're already inside an HTML page with
   ## panels on the side, header, etc).
   #set($syntaxType = $outputSyntax.type.toIdString())
   #if (($syntaxType == "xhtml") || ($syntaxType == "html"))
     #set ($renderedContent = $tdoc.getRenderedContent($outputSyntax))
   #else
     ## Make sure to print correctly the result when it's not HTML
     #set ($renderedContent = "<pre>$escapetool.html($tdoc.getRenderedContent($outputSyntax))</pre>")
   #end
 #else
   #set ($renderedContent = $tdoc.getRenderedContent())
 #end
#end
...
<div id="xwikicontent">
 #if ("$!exception" != '')
   #displayUnhandledException($exception)
 #else
    $renderedContent
 #end
</div>
...

This generates the following in case of error rendering the page:

renderingerror.png

New #displayException macro

Displays an error message with a title that can be clicked and expands to display an exception.

Example from a wiki page:

{{velocity}}
#set ($message = $services.mailsender.createMessage())
$message.send()

{{html}}
#displayException("hello world", $services.mailsender.lastError)
{{/html}}
{{/velocity}}

Component Disposal

The order used by the ComponentManager to dispose its components is computed based on declared dependencies. However there might be cases when you wish a Component's dispose() method to be called before or after all other components. In this case you can use the DisposePriority annotation. The default priority is 1000. A higher value will mean disposing before all other components not having this annotation. For example:

@Component
@Singleton
@DisposePriority(10000)
public class DefaultHibernateSessionFactory implements HibernateSessionFactory, Disposable
{
...
   @Override
   public void dispose() throws ComponentLifecycleException
   {
      ... called after other components in order to shut down the database late...
   }
...
}

See the Component Reference documentation for other details.

New LiveTable Filtering Option

You can now specify how the filter value should be matched against the stored value. One use case when this is useful is when you have a live table for an XClass that has a Database List property and you want to use a text input filter instead of the default drop down list filter. Currently the user has to enter the full value in the text input in order to filter. Would be good if partial matching would work. This is possible starting with this version:

#set ($columnsProperties = {
  'doc.name': {'type': 'text', 'size': 10, 'link': 'view'},
  ...
  'myDatabaseList': {'type': 'text', 'size': 10, 'match': 'partial'},
  ...
})

Checkout the LiveTable Macro documentation for more details about the match option.

Miscellaneous

Upgrades

The following dependencies have been upgraded:

Tested Browsers & Databases

Here is the list of browsers we support and how they have been tested for this release:

BrowserTest Result
Chrome30.pngGoogle Chrome 38Not Tested
Firefox30.pngMozilla Firefox 33Jira Fixed For
IE30.pngInternet Explorer 8Not Tested
IE30.pngInternet Explorer 9Not Tested

Here is the list of databases we support and how they have been tested for this release:

DatabaseTest Result
hypersql.pngHyperSQL 2.3.2Jira Fixed For
mysql.pngMySQL 5.6.17Not Tested
oracle.pngOracle 11.2Not Tested
postgresql.pngPostgreSQL 9.3.4Not Tested

For the full list of tests see this page.

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.

Programming Rights disabled for TextArea Properties

If you have a class with a TextArea property and in your sheet you use $doc.display() to display this property then you must know that starting with this version the content of the TextArea is rendered without programming rights, even if the last author or content author of the document that has the object with the TextArea property has programming rights. In other words, if you use wiki syntax in the TextArea content and you use script macros inside, the code that requires programming rights won't be executed even if you have the necessary rights. The reason for this change is because we can't know for sure who is the last author of the TextArea's content. We may remove this limitation in the future if we add a way to know the author. A solution we are currently investigating is the usage of signed scripts in TextArea's content. Until then, if you really want to execute the content of your TextArea properties using programming rights then you can use $doc.getRenderedContent() in your sheet, passing the content of the TextArea property.

API Breakages

The following APIs were modified since XWiki 6.2:

org.xwiki.extension.Extension: Method 'public org.xwiki.extension.ExtensionIssueManagement getIssueManagement()' has been added to an interface
org.xwiki.extension.Extension: Method 'public org.xwiki.extension.ExtensionScm getScm()' has been added to an interface
com.xpn.xwiki.store.XWikiHibernateBaseStore: In method 'protected void createHibernateSequenceIfRequired(java.lang.String, org.hibernate.Session)' the number of arguments has changed

Get Connected