Release Notes for XWiki 7.2 Milestone 2

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.

The focus of this release was on fixing issues introduced in 7.2 Milestone 1 with the new Nested Document/Nested Spaces features and to continue adding support for this feature in various existing features (using a tree for the Import UI instead of a list, new DB table to have performant Space queries, start of Nested Spaces support in the XWiki JS APIs, etc). Another major feature added was the new Script permission to allow forbidding Script execution to specific Users or Groups.

New and Noteworthy (since XWiki 7.2 Milestone 1)

Full list of issues fixed and Dashboard for 7.2.

Script Right

The Script Right is now set to DENY by default, meaning that if you do not have it explicitly, you will not be able to execute the scripts that you write with your user account.

However, for backward-compatibility reasons, the standard XWiki Enterprise distribution comes with the Script Right being allowed for all users at the main wiki level, so that, unless you (as an Admin) explicitly revoke the right for some users or explicitly deny it, they will be able to execute the scripts they wrote, just like before.

scriptRightsExplicitlyAllowedInXWikiPreferences.png

Hiding of the Parent-Child Relationship

Following our decision to drop the Parent-Child relationship, it's now been turned off by default in favor of Nested Documents.

Note that it's possible to go back to the previous behavior, in which the Breadcrumb was following the Parent/Child relationship, by setting the core.hierarchyMode property to parentchild in the xwiki.properties configuration file.

New Breadcrumb

The Breadcrumb has been reworked to reflect the location of a Document in the reference hierarchy. For example for a Document "CEO" inside a Document "Boarding" inside a Document "Management" inside a Document "Staff" you would have the following Breadcrumb:

breadcrumb.png

New Index Tree

The Index Tree is now using the reworked Document Tree Macro and is thus now honoring the Nested Document hierarchy. For example:

indextree.png

Updated Edit Mode

In Edit mode, the ability to change the Parent has been removed by default since we're now honoring the Nested Document hierarchy. For example:

editmode.png

Miscellaneous

  • Import UI move to new standard tree

    import.png

  • The size of the Job status cache is now configurable. See job.statusCacheSize property in xwiki.properties files.
  • The Spaces macro (which lists all Spaces) is now working fine when there are Nested Spaces (some links were failing).
  • The LiveTable macro is now working fine when there are Nested Spaces (some links were failing).
  • The Solr Search is now able to correctly find nested documents. The Search UI still needs to be fixed though (some links may be broken and the document location/paths are not correctly displayed) but otherwise the results should be accurate.

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

For Developers

New Space/XWikiSpace table

A new table dedicated to Spaces has been introduced, in order to have performant and scalable Space-related queries (like supporting getting paginated Space which is useful for the Document Tree macro for example).

Queries improvement

Allow executing complete SELECT queries

In HQL and XWQL it's now possible to execute full SELECT queries without Programming Right as long as you follow some rules currently defined in com.xpn.xwiki.internal.store.hibernate.query.HqlQueryUtils, which contains a list of the database field allowed in the SELECT clause. Namely:

  • For the Document/XWikiDocument table: fullName, name, space, language, defaultLanguage, translation, hidden
  • For the Space/XWikiSpace table: reference, name, parent, hidden

This is also true for the Named Queries located in the queries.hbm.xml file.

New Secure Query

The right to execute or not some Query is now controlled by each org.xwiki.query.QueryExecutor.

Anyone can ask the executor to check or ignore Right through the new org.xwiki.query.SecureQuery extending org.xwiki.query.Query:

  • checkCurrentAuthor(): indicate if the current author right should be checked
  • checkCurrentUser(): indicate if the result should be filtered based on current user Right (only implemented by SOLR right now)

JS API Improvements

  • It's now possible to create a Nested Spaces Reference using XWiki's Javascript API. For example:
    // Construct a Nested Space reference
    var reference = new XWiki.SpaceReference('wiki', ['space1', 'space2']);
    expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2');
    reference = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
    expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2.page');
    // Construct a non-Nested Space reference
    reference = new XWiki.SpaceReference('wiki', 'space');
    expect(XWiki.Model.serialize(reference)).toEqual('wiki:space');
    // Try passing non-valid space parameters
    expect(function() {new XWiki.SpaceReference('wiki', [])}).toThrow('Missing mandatory space name or invalid type for: []');
    expect(function() {new XWiki.SpaceReference('wiki', 12)}).toThrow('Missing mandatory space name or invalid type for: [12]');
  • A new XWiki.EntityReference.equals() method has been added. For example:
    var reference1 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
    var reference2 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
    var reference3 = new XWiki.DocumentReference('wiki2', ['space1', 'space2'], 'page');
    expect(reference1.equals(reference2)).toBe(true);
    expect(reference1.equals(reference3)).toBe(false);
  • A new XWiki.EntityReference.fromJSONObject(obejct) has been added to create a Javascript XWiki.EntityReference from a Java EntityReference directly serialized as JSON:
    var reference = XWiki.EntityReference.fromJSONObject(jsonText.evalJSON());
  • A new XWiki.EntityReferenceTree JS class has been added, which partially mimics the Java EntityReferenceTree Class. It's still missing features though as it was introduced mostly to make it easier to manipulate a serialized Java EntityReferenceTree.

Updated Document Tree Macro

The Document Tree Macro now supports Nested Documents and Nested Spaces modes. Specifically, the following changes have been made:

  • removed the showSpaceAsDocument parameter (was introduced recently in 7.2M1)
  • deprecated the showChildDocuments parameter
  • added the hierarchyMode parameter with two supported values: reference (default) and parentchild

As a result, you can use the document tree macro like this:

  • Nested Document Tree
    {{documentTree/}}
  • Nested Space + Page Tree
    {{documentTree showSpaces="true" /}}
  • Parent-Child Document Tree
    {{documentTree hierarchyMode="parentchild" /}}
  • Old Document Index Tree (i.e. Parent-Child mixed with space grouping)
    {{documentTree hierarchyMode="parentchild" showSpaces="true" /}}

Reference Scripting API for Nested Spaces

The Script API for Entity References has been updated with new APIs to support creating Nested Spaces references. For example:

{{velocity}}
$services.model.createDocumentReference("wiki", ["space1", "space2"], "page")
$services.model.createDocumentReference("wiki", ["space1", "space2"], "page", "default")
$services.model.createSpaceReference(["space1", "space2"], $services.model.createWikiReference("wiki"))
{{/velocity}}

Miscellaneous

  • Custom displayers are now executed with the Rights of the user who wrote them (i.e. author of the class document or content author of the displayer document), and not the Rights of the user who wrote the script that uses them (i.e. current context document's content author). See XWIKI-12306 for more details.
  • In the Active Install Extension, a new Velocity Macro has been introduced to compute the number of Active Installs having a specific Extension. Example usage:
    {{include reference="ActiveInstalls.ExtensionCount"/}}

    {{velocity}}
      #set ($extensionIds = [
        'org.xwiki.contrib:xwiki-totem-application',
        'jsimard:event-reporter-application',
        'mouhb:likeapplication'
      ])
      |=Extension Id|=Count
      #foreach($extensionId in $extensionIds)
        #countActiveInstallsUsingExtension($extensionId $count)
        |$extensionId|$count
      #end
    {{/velocity}}
  • Better support of non-DOCUMENT EntityReferences in DocumentReferenceConverter. It now behaves like XWiki#getDocument(EntityReference)
  • The Copy/Rename/Delete UI actions are now using the Refactoring Module's Script Services.

Deprecated and Retired projects

  • The OSCache-based Cache Extension has been moved to xwiki-contrib since we've been using the Infinispan implementation for a while now and the XWiki Core developers don't intend to continue supporting the OSCache-based one (it can be maintained by the Community, by whoever's interested in supporting it).

Upgrades

The following dependencies have been upgraded:

Translations

The following translations have been updated: 

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 41Not Tested
Firefox30.pngMozilla Firefox 40Jira Tickets Marked as Fixed in the Release Notes
IE30.pngInternet Explorer 10Not Tested
IE30.pngInternet Explorer 11Not Tested
Safari30.pngSafari 5Not Tested

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

DatabaseTest Result
hypersql.pngHyperSQL 2.3.2Not Tested
mysql.pngMySQL 5.5.44Jira Tickets Marked as Fixed in the Release Notes
oracle.pngOracle 11.2Not Tested
postgresql.pngPostgreSQL 9.4.1Not Tested

For the full list of tests see this page.

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.2 Milestone 2

<issues specific to the project>

API Breakages

The following APIs were modified since XWiki 7.1.1:

  • New configuration option to change the size of the Job statuses cache:
    org.xwiki.job.JobManagerConfiguration: Method 'public int getJobStatusCacheSize()' has been added to an interface
  • Added missing methods to the DocumentModelBridge class, which are already implemented by XWikiDocument;
    org.xwiki.bridge.DocumentModelBridge: Method 'public org.xwiki.model.reference.DocumentReference getContentAuthorReference()' has been added to an interface
  • ExportURLFactoryContext, getExportURLFactoryContext() and #ExportURLFactoryActionHandler# were Young APIs. ExportURLFactoryContext been renamed to FilesystemExportContext and moved to the Filesystem URL Scheme module:
    com.xpn.xwiki.web.ExportURLFactory: Method 'public com.xpn.xwiki.web.ExportURLFactoryContext getExportURLFactoryContext()' has been removed
    com.xpn.xwiki.web.ExportURLFactoryActionHandler: Parameter 7 of 'public java.net.URL createURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.xpn.xwiki.XWikiContext, com.xpn.xwiki.web.ExportURLFactoryContext)' has changed its type to org.xwiki.url.filesystem.FilesystemExportContext
    com.xpn.xwiki.web.ExportURLFactoryContext: Class com.xpn.xwiki.web.ExportURLFactoryContext removed
Tags:
   

Get Connected