Changes Report

Last modified by Vincent Massol on 2017/05/31


The Icon Theme Application is now providing a REST API. This API allows to request the icons metadata of the provided icon themes.

For instance:

# Request two icons from the current theme:
curl -H 'Accept: application/json' http://localhost:8080/xwiki/rest/wikis/xwiki/iconThemes/icons?name=add&name=home
# # {"icons":[{"name":"add","iconSetType":"FONT","iconSetName":"Font Awesome","cssClass":"fa fa-plus","url":null},{"name":"home","iconSetType":"FONT","iconSetName":"Font Awesome","cssClass":"fa fa-home","url":null}],"missingIcons":[]}

Improved Notification Widget Style

Notification widget messages are now displayed with a style that is more aligned with XWiki UI guidelines regarding spacing, border and font weight.

Panels list

The list of Panels is now displayed using the Live Data Macro.

Likes list in the user profile

The list of likes of a user are now displayed using the Live Data Macro.

Logging Administration uses Live Data Macro

The Logging Administration section is now using the new Live Data macro to list the available loggers, instead of the old live table.

User profile Groups list

The list of groups of a user in the user profile is now displayed using the Live Data Macro.

Improved explanation when creating a translation page

When editing a wiki page in-place you might have seen a "Translate" button if the edited page was missing a translation for the current locale. It wasn't obvious what this button does and the small notification message shown at the bottom of the page was hardly noticeable so we replaced it with a popover that is shown first when you enter edit mode and then whenever you hover the button. We also replaced the notification shown after clicking on the "Translate" button (to create the translation) with a popover on the page title input to invite you to translate the page title.

History delete event

It's now possible to be notified when a range of document history versions is deleted using the event org.xwiki.bridge.event.DocumentVersionRangeDeletedEvent. See Model Bridge API for more details.

Controlling Transformations

It's now possible to control exactly which Rendering Transformations to execute when viewing a page. For example to execute only the macro transformation: http://localhost:8080/xwiki/bin/view/Sandbox/WebHome?transformations=macro.

Orphaned Pages list

The list of Orphaned Pages of theĀ Index Application is now displayed using the Live Data Macro.

Allow to log deprecation warning in scripts

It's possible to log automatically a deprecation warning in a script, to inform users that some scripts might be removed in the future. This method checks the deprecation warnings configuration to only display the message if it is enabled.
You can use it like this:

## First argument is the logger name, second is the message.
$services.logging.deprecate("MyScript", "The script [MyScript] should not be used anymore")

The output warning is displayed with a [DEPRECATED]  prefix.

Siblings list

The list of siblings of a Page are now displayed using the Live Data Macro.

New URL resource scheme for Reset password

The reset password and retrieve username features have been refactored to stop using wiki pages to work. The rationale is that these pages needed to be viewable by the guest user to work, thus making it impossible to protect the full wiki to guests (among other problems related to rights on these pages). Thus they have been re-implemented using dedicated URL schemes and components, and thus have had their URLs changed:

  • Reset password:
    • New URL: /xwiki/authenticate/reset 
    • Old URL: /xwiki/bin/view/XWiki/ResetPassword
  • Retrieve username:
    • New URL: /xwiki/authenticate/forgot 
    • Old URL: /xwiki/bin/view/XWiki/ForgotUsername

The old XWiki.ResetPassword and XWiki.ForgotUsername wiki pages must not be used anymore, and any custom change perform in those pages won't be taken into account (you'll need to port your changes to Java since the new feature is coded in Java). However, the pages have been kept to ensure that using the old URLs will keep working for the time being: the pages now redirect to the new URLs.

Menus list

The list of menus of the Menu Application is now displayed using the Live Data Macro.

Empty Content Placeholder in WYSIWYG Editor

The WYSIWYG Editor shows a placeholder text when the edited content is empty and the text area is not focused. See the CKEditor Integration documentation for more information.

Children list

The list of children of a Page are now displayed using the Live Data Macro.

Raw Macro

When content is parsed, an XDOM tree is created. Sometimes you don't have any way to express the content you wish in that XDOM tree and you only wish that your content is output as is, when the XDOM is then rendered in a given syntax. You can use the raw macro for this need.


{{raw syntax="latex/1.0"}}

New API to unregister a custom right

It was already possible to register a custom right, but we were missing the API to unregister it, this is now possible in the AuthorizationManager API.

Data Types

The list of data types (classes) of the XClass Application is now displayed using the Live Data Macro.

Java API to delete a range of versions

Exposed a Java API to delete a range of versions and used it inside DeleteVersionsAction.

Bulletproofed NumberProperty

NumberProperty now accept any kind of Number in input and will automatically convert it to the right type instead of crash at save.

Improved display when there is no entry

A message is now displayed when there is not entries to be displayed in a Live Data.

The formula macro exposes a new configuration key to define the default image type to be used when rendering a formula. See the Formula Macro documentation to learn more.

Document restoration events

It's now possible to be notified when a document is restored from the recycle bin using the events org.xwiki.bridge.event.DocumentRestoringEvent and org.xwiki.bridge.event.DocumentRestoredEvent. See Model Bridge API for more details.

Support for native rendering of formulas in SVG

It is now possible to render formulas in SVG using the native formula renderer. This will provide more crisp results, which can easily be resized at will. See the Formula Macro documentation to learn more.

History delete event

It's now possible to be notified when a range of document history versions is about to be deleted using the event org.xwiki.bridge.event.DocumentVersionRangeDeletingEvent. See Model Bridge API for more details.

Class Sheet

The list of existing pages with objects described by a class that is provided by the XClass Application as part of the default class sheet is now displayed using the Live Data Macro.


NamespaceURLClassLoader now exposes an API to know if it has been closed.

SecurityEntryReaderExtra in extensions

It's now possible to contribute a component in an installed extension.

Allow to recompute average ratings from script service

A new API methods has been added in Ratings script service to allow computing back the average ratings when needed.

The signature of the method is the following:

     * Recompute the average rating of a reference.
     * Note that this method can be resource consuming if the set of data is large.
     * @param reference the reference for which to recompute the average ratings.
     * @return the average rating in an optional or an empty optional in case of error.
     * @since 13.7RC1
     * @since 13.4.3
     * @since 12.10.9

   Optional<AverageRating> recomputeAverageRating(EntityReference reference)

Filters for Static List properties in Live Data

The suggestions in the Live Data Macro's column filters now display labels or translations (if there are any) of the values of Static List properties instead of the plain values. The search for suggestions considers both the displayed label and the underlying value.

Allow to store Like average xobjects

Like implementation is based on Ratings, and until this version the configuration of Ratings we were using was hardcoded.

We provide in this version 2 new properties that allow to store the average ratings xobjects related to the Like information: those xobjects can notably be used to perform HQL queries with the total number of likes in pages, since this data is stored in them.

We only provide those properties as an experimental feature: it might be removed later, by providing a cleaner API for this usecase.

The properties are the following:

## Specify if the average rating should be stored or not for likes. Default value is false.

## Specify where the average ratings should be stored. Default value is xobject. Possible values are currently solr or xobject.

Less strict code verification in the reset password system

We allow to relax a bit the reset password email link security mechanism to avoid it being revoked at first access, in order to avoid issues with software that checks email links. This mechanism can be used by changing a property in

#-# [Since 13.10.1]
#-# [Since 14.0RC1]
#-# Define the lifetime of the token used for resetting passwords in minutes. Note that this value is only used after
#-# first access.
#-# Default value is 0 meaning that the token is immediately revoked when first accessed.
#-# Use a different value if the reset password email link might be accessed several times (e.g. in case of using an
#-# email link verification system): in such case the user will have the defined lifetime to use again the email link.
#-# The default is:
# security.authentication.resetPasswordTokenLifetime = 0

Provide a script service API for serializing a UserReference

It is possible to serialize a user reference with the default serializer using the user script service:

#set ($userReference = $api.returning.user)
Retrieved user: $services.user.serialize($userReference)

Extension Manager UI improvements

The more advanced search features of the Extension Manager are now hidden under a More button by default and more explanation was added to the shown informations.

Byte array to InputSource

The org.xwiki.filter.input.InputSource converter now support byte[] as input.

Less files in WebJar can be compiled to css

Less code packaged in WebJars can now be compiled to CSS when requested. When Less files are compiled to CSS, the less variables defined in the current skin are available and will be resolved to their current values.

Usage examples:

// Returns the raw content of test.less
$services.webjars.url('org.xwiki.platform:xwiki-platform-example', 'test.less')
// Returns the content of test.less compiled to css.
$services.webjars.url('org.xwiki.platform:xwiki-platform-example', 'test.less', {'evaluate': true})

Live Data performance improvements

The rendering time of the Live Data Macro has been improved. The performance is now comparable to the Livetable Macro.

For instance, taking the loading time of the Panels table with 30 rows, the rendering time is now of 2s 180ms with the optimization, and was 3s 50ms before the optimizations, and 2s 250ms with the Livetable Macro. In addition, when the Less style is not yet cached, the rendering time is improved by about 12 seconds.

Localization REST API

The localization module is now providing a REST API. This API allows to request the raw source from a set of translation keys.

For instance:

# Request of a single translation, the locale is the default one.
curl -H 'Accept: application/json' http://localhost:8080/xwiki/rest/wikis/xwiki/localization/translations?key=administration.section.users.deleteUser.newAuthor.error
# {"translations":[{"key":"administration.section.users.deleteUser.newAuthor.error","rawSource":"The selected user doesn''t have {0} rights!"}]}

Attachments content

It's now possible to indicate in input the list of attachment for which the content should be taken into account (when serializing a document, for example). It used to be all (generally used when exporting a XAR) or nothing (in the case of the document history).

Empty string in Static List

It is now possible to specify empty string values in a Static list by repeating twice the same separator. For example, using the default separators (|, , and space), the Foo||Bar string will be parsed as containing three values (Foo, empty string, and Bar), while Foo, Bar will be parsed as only two values (Foo and Bar), even if two separators (, and space) are used.

Allow Skins to be loaded from the classloader

Skins can now be stored in extensions. If an extension installed on a wiki contains a skins/skinName/ folder, it can be discovered and used as a wiki Skin.

Syntax Registry

There's now the concept of a Syntax Registry and new Syntaxes are expected to register themselves in that registry

You can list all registered syntaxes using:

private SyntaxRegistry registry;
List<Syntax> syntaxes = registry.getSyntaxes();

You can also get a Syntax object from a Syntax id string using (for example):

private SyntaxRegistry registry;
Optional<Syntax> syntax = registry.getSyntax("xwiki/2.1");

See available Syntaxes for more.

New event query helper

SimpleEventQuery now have helpers to manipulate custom event properties. It's done by calling parameter() to "switch" the next comparison to be about custom parameters instead of standard Event fields. See Event Stream Module for more details.

User Authentication Event

The classic Form and Basic Authentication mechanisms now trigger a UserAuthenticatedEvent event whenever a user is authenticated. As a new best practice, custom authenticator authors are advised to implement this new event.

InputSource and OutputTarget converter improvements

The InputSource and OutputTarget converters used for example during macros and filters UI are now extensible so any extension can add support for supporting conversion from more Java types and support for more references prefixes. See Filter Module for more details

Releases list

The list of Releases is now displayed using the Live Data Macro.

Wikis lists

The lists of wikis and wiki templates of the Wiki Application are now displayed using the Live Data Macro.

Mail Sending Status list

The Mail Sending Status list of the Mail Application is now displayed using the Live Data Macro.


Get Connected