Wiki source code of Release Notes for XWiki 7.2

Version 81.2 by Vincent Massol on 2015/11/13

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 This is the release notes for [[XWiki Commons>>http://commons.xwiki.org]], [[XWiki Rendering>>http://rendering.xwiki.org]], [[XWiki Platform>>http://platform.xwiki.org]] and [[XWiki Enterprise>>http://enterprise.xwiki.org]]. They share the same release notes as they are released together and have the same version.
6
7 This release is probably one of the biggest releases we have done in XWiki for years (more than 900 commits)! We have worked hard during all the summer to finally achieve the introduction of a new concept: **//Nested Pages//**. This big change affects both the platform and the user interface, and you will discover many differences while using XWiki.
8
9 {{warning}}
10 As a consequence, we do not recommend using this version in production because we still need to fine-tune the UI to fully adapt it to Nested Pages. This will be done in XWiki 7.3. However, in order to flush out all issues, especially about usability, please try upgrading to this version and play with it to let us know what you like/don't like. There's still time to adjust things. Thanks for your help!
11 {{/warning}}
12
13 {{error}}
14 The following blocking issues were found after this version was released. You should verify if you're using the affected features and if so you can click on them to see in which version they are fixed):
15
16 {{jira url="http://jira.xwiki.org" style="list"}}
17 MOCCACAL-77
18 FILEMAN-114
19 XWIKI-12651|This issue is a problem only if you configure XWiki to hide the "view" action
20 XWIKI-12660|This issue is a problem only if you configure XWiki to hide the "view" action
21 XWIKI-12667|This issue is a problem only if you have zip attachments (docx, zips, etc) in Nested Pages
22 XWIKI-12752
23 XWIKI-12678
24 XWIKI-12641
25 XWIKI-12625
26 {{/jira}}
27 {{/error}}
28
29 For developers, this release also introduces a new //Script// right and some changes in the REST, Job and Refactoring modules, just to list a few...
30
31 Finally, it also brings a lot of bugs fixes!
32
33 = New and Noteworthy (since XWiki 7.1) =
34
35 [[Full list of issues fixed and Dashboard for 7.2>>http://jira.xwiki.org/secure/Dashboard.jspa?selectPageId=13499]].
36
37 == Nested Pages ==
38
39 It's now possible to create wiki pages inside other wiki pages. More specifically we've decided to drop the concept of Space in the UI (it's still there at the API/platform level) and instead, to replace it with the concept of Nested Pages.
40
41 We've also decided to drop the concept of Parent/Child relationship since it was too complex for end users to have 2 hierarchies: the Space/Page hierarchy and the Parent/Child hierarchy. The Parent/Child hierarchy also had limitations: you couldn't inherit page permissions for example. Thus the idea is to have a single hierarchy based on Nested Pages.
42
43 Advantages of Nested Pages:
44
45 * The URL reflects the page hierarchy
46 * Finer-grained control: Ability to set permissions at each level
47 * Generally speaking, a nicer and simpler way to organize your content hierarchically
48 * Moving and Deleting pages updates the hierarchy
49
50 Terminology:
51
52 * **Nested Page** (a.k.a **Non-Terminal Page**): This is a wiki page that can have children pages. Technically a Nested Page is implemented as a Nested Space (i.e. a **WebHome** page).
53 * **Non-Nested Page** (a.k.a **Terminal Page**): This a wiki page that cannot have children pages. Applications and script can create Terminal Pages. Advanced Users will also be able to create Terminal Pages from the UI. Standard Users will only be able to create Nested Pages.
54 * **Nested Space**: A Space which has another Space as parent. As mentioned above, a Nested Page is technically implemented as a Nested Space. You will used the term Nested Space when speaking technically about XWiki APIs for example but when talking about UI you should favor using the term Nested Page instead.
55
56 For more information, see [[Content Organization>>platform:Features.ContentOrganization||anchor="HHistory"]].
57
58 We have worked a lot to minimize the retro-compatibility issues. However, some Extensions are not adapted for //Nested Pages// yet, and their execution is still sub-optimal. For the next releases, we plan to work on the adaptation of these Extensions.
59
60 == Script right ==
61
62 A new Script Right has been added to allow controlling who has the right to write Scripts. Specifically anyone with Edit rights can edit a page and write a Script in it. However, when the page is rendered the script will only execute if the last author of the page has the Script right.
63
64 Example when the author of a script doesn't have the Script right:
65
66 {{image reference="scriptRightsErrorNotAllowed.png"/}}
67
68 The Script Right is 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.
69
70 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.
71
72 {{image reference="scriptRightsExplicitlyAllowedInXWikiPreferences.png"/}}
73
74 == Hiding of the Parent-Child Relationship ==
75
76 Following our decision to drop the Parent-Child relationship (see above), it's now been turned off by default in favor of Nested Pages.
77
78 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.
79
80 === New Breadcrumb ===
81
82 The Breadcrumb has been reworked to reflect the location of a Page in the reference hierarchy. For example for a Page "CEO" inside a Page "Boarding" inside a Page "Management" inside a Page "Staff" you would have the following Breadcrumb:
83
84 {{image reference="ReleaseNotesXWiki72M2@breadcrumb.png"/}}
85
86 === New Index Tree ===
87
88 The Index Tree is now using the [[reworked Document Tree Macro>>extensions:Extension.Document Tree Macro]] and is thus honoring the Nested Pages hierarchy. For example:
89
90 {{image reference="ReleaseNotesXWiki72M2@indextree.png"/}}
91
92 === Updated Edit Mode ===
93
94 In Edit mode, the ability to change the Parent has been removed by default since we're now honoring the Nested Pages hierarchy. For example:
95
96 {{image reference="ReleaseNotesXWiki72M2@editmode.png"/}}
97
98 == Flamingo ==
99
100 Following the introduction of the Nested Pages feature, we have changed a lot our default skin, Flamingo:
101
102 * The top menu has been removed and replaced by a //drawer// menu that you can expand by clicking on the top right icon
103 * The add menu has been relocated near the edit one
104 * The L&F of the Add, Edit, and "More Actions" menus has been changed
105 * A lot of actions have been moved to the "More Actions" menu
106 * The page breadcrumb has suffered some changes:
107 ** it is now also displayed on the wiki home page
108 ** the wiki home page is now included when it is part of the current document's hierarchy, i.e. for children and descendants of the wiki home page. See [[XWIKI-12423>>http://jira.xwiki.org/browse/XWIKI-12423]] for more details.
109 ** the sub-wiki pretty name is included between the home icon and the local page path
110 * The actions menus (edit, create, more actions) are now available from the rename, copy and delete actions.
111 * The create, copy and rename page actions have been modified to support nested pages:
112 ** The source and target pages are displayed using the breadcrumb
113 ** The target page can be selected using a document tree picker
114 ** For advanced users there is also the option to specify the target page using some text input fields (location advanced edit mode). This is useful especially if you want to create/move the page under a parent that doesn't exist yet (you cannot use the tree picker in this case because the parent would not be available in the tree).
115 * The delete action proposes to delete the children of the page.
116 * The welcome message from the main wiki home page has been updated.
117 * The "Spaces" widget from the wiki dashboard has been replaced with "Pages" which shows the hierarchy of nested pages from that wiki.
118 * For non terminal pages, we have introduced a "Page Administration", where you will find settings that concern the page and its children (it's actually the old space administration behind the scene). But we have also introduced 2 sections for setting rights on these pages:
119 ** a section to set rights for the page only.
120 ** a section to set rights for the page and its children.
121 * For terminal pages, nothing changes, you can change the access rights of the page in the "edit" menu. The only addition is a "Administer Parent" link in the "More actions" menu to administer the parent page (which again is the space administration behind the scene).
122 * The create action has been re-looked (with the introduction of the "page type" field) and proposes to import an office document.
123 * A new "children" viewer is now accessible in the "more actions" menu, along with the other viewers.
124 * For Terminal Pages, a new "siblings" viewer is present, which replaces the old "space index" feature.
125
126 {{gallery}}
127 image:ReleaseNotesXWiki72RC1@flamingo.png
128 image:ReleaseNotesXWiki72M3@edit.png
129 image:ReleaseNotesXWiki72M3@more_actions.png
130 image:ReleaseNotesXWiki72M3@drawer.png
131 image:ReleaseNotesXWiki72M3@drawer-languages.png
132 image:ReleaseNotesXWiki72M3@flamingo-phone.png
133 image:ReleaseNotesXWiki72M3@homepageInBreadcrumbs-after.png
134 image:ReleaseNotesXWiki72M3@subWikiBreadcrumb.png
135 image:ReleaseNotesXWiki72M3@createPage-full.png
136 image:ReleaseNotesXWiki72M3@delete.png
137 image:ReleaseNotesXWiki72M3@deleting.png
138 image:ReleaseNotesXWiki72M3@deleted.png
139 image:ReleaseNotesXWiki72M3@delete-error.png
140 image:ReleaseNotesXWiki72M3@copyPage-full.png
141 image:ReleaseNotesXWiki72M3@copyPage-full-treePicker.png
142 image:ReleaseNotesXWiki72M3@copyPage-full-advanced.png
143 image:ReleaseNotesXWiki72M3@renamePage-full.png
144 image:ReleaseNotesXWiki72RC1@AdministerPageMenu.png
145 image:ReleaseNotesXWiki72RC1@AdminPageAndChildrenRights.png
146 image:ReleaseNotesXWiki72RC1@AdminPageRights.png
147 image:ReleaseNotesXWiki72RC1@AdministerParentMenu.png
148 image:ReleaseNotesXWiki72RC1@create.png
149 image:ReleaseNotesXWiki72RC1@CreatePopUp.png
150 image:ReleaseNotesXWiki72RC1@menu-children.png
151 image:ReleaseNotesXWiki72RC1@menu-siblings.png
152 {{/gallery}}
153
154 == LDAP improvements ==
155
156 It's now possible to disable subgroups resolution using ##xwiki.authentication.ldap.group_sync_resolve_subgroups## property in ##xwiki.cfg## configuration file. Resolving each member to check if it's a group might be very expensive with big groups so if you know there is no subgroup you should really disable it.
157
158 == Solr Search ==
159
160 You can now search for nested pages using the [[Solr Search Application>>extensions:Extension.Solr Search Application]]. The display of the search result location has been updated to support nested pages.
161
162 {{image reference="ReleaseNotesXWiki72RC1@searchResultLocation.png"/}}
163
164 The "Space" facet has been replaced with a "Location" facet that supports nested pages. This allows you to search in a specific location in the page hierarchy.
165
166 {{image reference="ReleaseNotesXWiki72RC1@searchLocationFacet.png"/}}
167
168 The "Page" facet has been removed by default because it doesn't bring value in the context of the nested pages: all non-terminal pages have the same name 'WebHome'. The "Wiki" facet is displayed by default only on the main wiki and only if you have multiple wikis.
169
170 The search results location displayed on the [[Search suggest>>extensions:Extension.Search Application||anchor="HSearchSuggest"]] has also been updated to support nested pages.
171
172 {{image reference="searchSuggestLocation.png"/}}
173
174 == Miscellaneous ==
175
176 * When a space home page has an empty title (and the space home page doesn't have a sheet or the sheet doesn't control the title) then the displayed title is now the space name instead of 'WebHome'.
177 * The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] has a new parameter called ##showSpaceAsDocument## which allows you to merge the space nodes with the space home page nodes.
178 * The list of available template providers is now sorted by document full name.
179 * The [[Orphaned Pages>>extensions:Extension.Index Application||anchor="HAllorphanedDocuments"]] tab from the [[Document Index>>extensions:Extension.Index Application||anchor="HAccessingtheIndexes"]] is now displayed only when [[the Parent-Child Hierarchy Mode>>ReleaseNotesXWiki72M2||anchor="HHidingoftheParent-ChildRelationship"]] is enabled (which is not the case by default).
180 * Import UI move to new standard tree(((
181 {{image reference="ReleaseNotesXWiki72M2@import.png"/}}
182 )))
183 * The size of the Job status cache is now configurable. See ##job.statusCacheSize## property in ##xwiki.properties## files.
184 * The Spaces macro (which lists all Spaces) is now working fine when there are Nested Spaces.
185 * The LiveTable macro is now working fine when there are Nested Spaces.
186 * The Navigation panel displays nested pages:(((
187 {{image reference="ReleaseNotesXWiki72M3@navigationpanel.png"/}}
188 )))
189 * When renaming or copying a nested page the document title is updated to reflect the new page name if its previous value was equal the old page name. This was happening already for terminal pages. We extended the behaviour to nested pages.
190 * Fixed various issues for several applications bundled in XE (such as WatchList and Annotations), which should now work well with Nested Spaces.
191 * The Administration mode for spaces and wikis now uses the standard reference-based breadcrumbs instead of the previously custom section-based breadcrumbs.(((
192 {{image reference="ReleaseNotesXWiki72M3@administrationUI-breadcrumbs-standard.png"/}}
193 )))
194 * The Administration mode no longer features a select input on the right side for navigation between spaces since that input does no longer scale in the context of Nested Spaces. Thus, the breadcrumbs should be used instead and the future UI improvements that will soon become available in this direction.
195 * It's now possible to create Skins in Nested Spaces.
196 * Changed the exception message displayed when a script execution fails due to lack of rights to make it clearer that it's not a problem with the current user, but with the script.
197 * When [[creating, copying or renaming a page>>platform:Features.DocumentLifecycle]] you can now select a top level location from the tree picker (e.g. copy as top level page) even if you have a single wiki (i.e. only the main wiki). You do this by selecting the root of the tree (i.e. the wiki node).
198 * The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] is now displaying a message when the tree is empty.(((
199 {{image reference="ReleaseNotesXWiki72RC1@emptyDocTree.png"/}}
200
201 With the new ##showRoot## parameter you can force the document tree to show the actual root node (either the one specified by the ##root## parameter or the default root node).
202 )))
203 * A couple of bugs in the [[App Within Minutes Application>>extensions:Extension.App Within Minutes Application]], that were caused by the introduction of the Nested Pages feature, have been fixed.
204 * It's now possible create new FAQs in Nested Spaces.
205 * When using the XWiki Jetty distribution, a memory dump is automatically created in XWiki's ##data/## folder when an ##Out Of Memory## error occurs.
206 * The Activity Stream now also displays activity for Nested Spaces.
207
208 See the [[full list of JIRA issues>>http://jira.xwiki.org/issues/?filter=14213]] fixed in this release.
209
210 = For Developers =
211
212 == Nested Spaces ==
213
214 Since Nested Spaces were already planned and supported in APIs like ##DocumentReference## there are not too many changes for those who were using recent APIs but there is still some and here are the main ones.
215
216 === Space Reference instead of Space name ===
217
218 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:
219
220 * "##.##" (dot), "##:##" (colon) and "##\##" (baskslash) characters, which are part of a Space name will now be escaped (using the "##\##" character) in the ##space## (##XWD_WEB##) field from the Document's table in the Database. For example a space named ##Space:with.special\char## will be stored as ##Space\:with\.special~\~\char##.
221 * Same as for the database, the ##XWikiDocument/Document#getSpace()## methods now return a serialized Reference to 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 have been deprecated a long time ago but they are still used in lots of places...
222 * Various APIs are also affected by this Space name to Space Reference input change:
223 ** ##XWiki#getSpaceDocsName## methods (both in the public and private XWiki API)
224 ** All the default ##XWikiURLFactory## implementation methods accepting a Space as parameter have been modified to accept a serialized Space Reference. Extensions/code implementing ##XWikiURLFactory## (or extending classes implementing ##XWikiURLFactory## such as ##XWikiServletURLFactory##) will need to be modified to handle nested spaces passed in the ##space## parameter of the various APIs. Here's how to parse Spaces passed as a String:(((
225 {{code language="java"}}
226 private EntityReferenceResolver<String> relativeEntityReferenceResolver =
227 Utils.getComponent(EntityReferenceResolver.TYPE_STRING, "relative");
228 ...
229 or
230 ...
231 @Inject
232 @Named("relative")
233 private EntityReferenceResolver<String> relativeEntityReferenceResolver;
234 ...
235 private List<String> extractSpaceNames(String spaces)
236 {
237 List<String> spaceNames = new ArrayList<>();
238 // Parse the spaces list into Space References
239 EntityReference spaceReference = this.relativeEntityReferenceResolver.resolve(spaces, EntityType.SPACE);
240 for (EntityReference reference : spaceReference.getReversedReferenceChain()) {
241 spaceNames.add(reference.getName());
242 }
243 return spaceNames;
244 }
245 {{/code}}
246 )))
247 ** Extensions/code implementing ##ExportURLFactoryActionHandler## will also need to be modified to handle nested Spaces passed in the ##space## parameter.
248 * Extensions/code implementing ##EntityReferenceSerializer## or ##DocumentReferenceResolver## must now handle Nested Spaces (in the past they were already supposed to handle Nested Spaces but since it was not used they could take shortcuts and it wasn't visible. It's now going to fail, see [[XWIKI-12191>>http://jira.xwiki.org/browse/XWIKI-12191]]).
249
250 === Space separator properly taken into account ===
251
252 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.
253
254 === New XAR format ===
255
256 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).
257
258 Two new attributes has been added to the ##<xwikidoc>## root XML element
259
260 * ##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).
261 * ##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 could be located anywhere in the XML document.
262
263 === REST module ===
264
265 * The REST module now supports Nested Spaces. Example of url to access the page ##A.B.C.MyPage##: ##/xwiki/rest/wikis/xwiki/spaces/A/spaces/B/spaces/C/pages/MyPage##.
266
267 === URL modules ===
268
269 The URL modules have been modified to support Nested Spaces. As a consequence the [[URL formats supported by the ##standard## URL scheme have been modified>>extensions:Extension.Standard URL API]].
270
271 === New Rename/Delete Jobs ===
272
273 New code has been developed to support Nested Pages/Nested Spaces and Script Services have been provided and they now run inside Jobs to better handle the fact that they are long-running operations.
274
275 The corresponding Script Services APIs have been added:
276
277 * Copy a Space(((
278 {{code language="none"}}
279 #set ($source = $services.model.resolveSpace('Path.To.Source'))
280 #set ($destination = $services.model.resolveSpace('Path.To.New.Parent'))
281 $services.refactoring.copy($source, $destination).join()
282 {{/code}}
283 )))
284 * Copy a Space As(((
285 {{code language="none"}}
286 #set ($source = $services.model.resolveSpace('Path.To.Source'))
287 #set ($destination = $services.model.resolveSpace('Path.To.New.Name'))
288 $services.refactoring.copyAs($source, $destination).join()
289 {{/code}}
290 )))
291 * Move a Space(((
292 {{code language="none"}}
293 #set ($source = $services.model.resolveSpace('Path.To.Source'))
294 #set ($destination = $services.model.resolveSpace('Path.To.New.Parent'))
295 $services.refactoring.move($source, $destination).join()
296 {{/code}}
297 )))
298 * Move a Page(((
299 {{code language="none"}}
300 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
301 #set ($destination = $services.model.resolveSpace('Path.To.New.Parent'))
302 $services.refactoring.move($source, $destination).join()
303 {{/code}}
304 )))
305 * Rename a Space(((
306 {{code language="none"}}
307 #set ($source = $services.model.resolveSpace('Path.To.Source'))
308 $services.refactoring.rename($source, 'NewName').join()
309 {{/code}}
310 )))
311 * Rename a Page(((
312 {{code language="none"}}
313 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
314 $services.refactoring.rename($source, 'NewName').join()
315 {{/code}}
316 )))
317 * Delete a Page(((
318 {{code language="none"}}
319 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
320 $services.refactoring.delete($source).join()
321 {{/code}}
322 )))
323 * Delete a Space(((
324 {{code language="none"}}
325 #set ($source = $services.model.resolveSpace('Path.To.Source'))
326 $services.refactoring.delete($source).join()
327 {{/code}}
328 )))
329 * Convert a Terminal Page to a Nested Page(((
330 {{code language="none"}}
331 #set ($source = $services.model.resolveDocument('Path.To.Page'))
332 $services.refactoring.convertToNestedDocument($source).join()
333 {{/code}}
334 )))
335 * Convert a Nested Page to a Terminal Page(((
336 {{code language="none"}}
337 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
338 $services.refactoring.convertToTerminalDocument($source).join()
339 {{/code}}
340 )))
341
342 === New create action parameters and logic ===
343
344 The create action now accepts a ##spaceReference## parameter and a ##name## parameter, together with an optional ##tocreate=terminal## parameter (usable on non-terminal pages). The previous space parameters was not scalable in the context of Nested Spaces since it was just a top-level space name so it did not allow the creation of deeper space levels. More details are available in the [[create action's documentation>>platform:DevGuide.Standard URL Format||anchor="HAction:create"]].
345
346 As explained previously, these logic is also available in the improved create UI, with the terminal pages option appearing only for advanced users and being checked or unchecked by default, depending on the type of the current page.
347
348 === JS API Improvements ===
349
350 * It's now possible to create a Nested Spaces Reference using XWiki's Javascript API. For example:(((
351 {{code language="javascript"}}
352 // Construct a Nested Space reference
353 var reference = new XWiki.SpaceReference('wiki', ['space1', 'space2']);
354 expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2');
355 reference = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
356 expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2.page');
357 // Construct a non-Nested Space reference
358 reference = new XWiki.SpaceReference('wiki', 'space');
359 expect(XWiki.Model.serialize(reference)).toEqual('wiki:space');
360 // Try passing non-valid space parameters
361 expect(function() {new XWiki.SpaceReference('wiki', [])}).toThrow('Missing mandatory space name or invalid type for: []');
362 expect(function() {new XWiki.SpaceReference('wiki', 12)}).toThrow('Missing mandatory space name or invalid type for: [12]');
363 {{/code}}
364 )))
365 * A new ##XWiki.EntityReference.equals()## method has been added. For example:(((
366 {{code language="javascript"}}
367 var reference1 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
368 var reference2 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
369 var reference3 = new XWiki.DocumentReference('wiki2', ['space1', 'space2'], 'page');
370 expect(reference1.equals(reference2)).toBe(true);
371 expect(reference1.equals(reference3)).toBe(false);
372 {{/code}}
373 )))
374 * A new ##XWiki.EntityReference.fromJSONObject(obejct)## has been added to create a Javascript ##XWiki.EntityReference## from a Java ##EntityReference## directly serialized as JSON:(((
375 {{code language="javascript"}}
376 var reference = XWiki.EntityReference.fromJSONObject(jsonText.evalJSON());
377 {{/code}}
378 )))
379 * 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##.
380
381 === Updated Document Tree Macro ===
382
383 The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] now supports Nested Pages and Nested Spaces modes. Specifically, the following changes have been made:
384
385 * removed the ##showSpaceAsDocument## parameter (was introduced recently in 7.2M1)
386 * deprecated the ##showChildDocuments## parameter
387 * added the ##hierarchyMode## parameter with two supported values: ##reference## (default) and ##parentchild##
388
389 As a result, you can use the document tree macro like this:
390
391 * Nested Page Tree(((
392 {{code language="none"}}
393 {{documentTree/}}
394 {{/code}}
395 )))
396 * Nested Space + Page Tree(((
397 {{code language="none"}}
398 {{documentTree showSpaces="true" /}}
399 {{/code}}
400 )))
401 * Parent-Child Page Tree(((
402 {{code language="none"}}
403 {{documentTree hierarchyMode="parentchild" /}}
404 {{/code}}
405 )))
406 * Old Page Index Tree (i.e. Parent-Child mixed with space grouping)(((
407 {{code language="none"}}
408 {{documentTree hierarchyMode="parentchild" showSpaces="true" /}}
409 {{/code}}
410 )))
411
412 === Solr Search ===
413
414 We added 3 new fields to the [[Solr Index>>design:Design.SolrSchema]] related to Nested Spaces:
415
416 * spaces: the list of nested spaces, e.g. ['A', 'B', 'C']
417 * space_facet: used for [[hierarchical faceting>>https://wiki.apache.org/solr/HierarchicalFaceting]] (the 'facet.prefix'-based drill down approach)
418 * space_prefix: used to match descendant documents, e.g. all documents from space ##A.B## and all its descendants (like space ##A.B.C##)
419
420 We also modified the value of the ##space## and ##space_exact## fields to contain the full local reference of the space (it was holding only the name of the last space prior to 7.2). Finally, the ##space## field has been deprecated in favour of the ##spaces## field.
421
422 == New Reference-related APIs ==
423
424 Various new API around References has been introduced while adding support for nested spaces.
425
426 === Complete References Providers ===
427
428 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)
429
430 {{code language="java"}}
431 @Inject
432 Provider<DocumentReference> defaultDocumentReference;
433
434 @Inject
435 @Named("current")
436 Provider<DocumentReference> currentDocumentReference;
437 {{/code}}
438
439 === org.xwiki.model.reference.EntityReferenceProvider ===
440
441 ##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.
442
443 {{code language="java"}}
444 @Inject
445 EntityReferenceProvider provider;
446 {{/code}}
447
448 === Properly support any kind of References in getDocument and getURL ===
449
450 ##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).
451
452 Same for ##com.xpn.xwiki.XWiki#getURL(EntityReference)## and ##com.xpn.xwiki.api.XWiki#getURL(EntityReference)## (e.g. passing a Document Reference with Locale will return the URL to the specified document translation, by adding ##language=xx## to the query string).
453
454 === New helpers in EntityReference ===
455
456 * ##boolean equals(EntityReference otherReference, EntityType to)##: same as equals but only take into account Reference parts up to the passed entity type (included)
457 * ##boolean equals(EntityReference otherReference, EntityType from, EntityType to)##: same as equals but only take into account Reference parts between passed entity types (included)
458 * ##boolean equalsNonRecursive(EntityReference otherReference)##: same as equals but does not take into account the parent
459
460 === New helpers in LocalDocumentReference ===
461
462 * ##LocalDocumentReference(String pageName, EntityReference spaceReference)##: allowed created a LocalDocumentReference from a Space Reference instead of just the space name
463
464 === org.xwiki.model.reference.SpaceReferenceResolver ===
465
466 New default ##String## and ##EntityReference## based SpaceReferenceResolver has been added. It's the same behavior then ##DocumentReferenceResolver## but for spaces.
467
468 {{code language="java"}}
469 @Inject
470 SpaceReferenceResolver<String> stringResolver;
471
472 @Inject
473 SpaceReferenceResolver<EntityReference> referenceResolver;
474 {{/code}}
475
476 === New model Script Service helpers ===
477
478 * new help to escape an entity name according to default Reference syntax as in:(((
479 {{code language="velocity"}}
480 $services.model.escape('some.space:with\specialchars', 'SPACE')
481 {{/code}}
482
483 will print
484
485 {{code language="nonde"}}
486 some\.space\:with\\specialchars
487 {{/code}}
488 )))
489 * you can retrieve a node from an ##EntityReferenceTree## using its reference:(((
490 {{code language="velocity"}}
491 #set ($alice = $services.model.resolveDocument('wiki:Users.Alice.WebHome'))
492 #set ($bob = $services.model.resolveDocument('wiki:Users.Directory'))
493 #set ($tree = $services.model.toTree($alice, $bob))
494 #set ($usersNode = $tree.get($bob.lastSpaceReference))
495 {{/code}}
496 )))
497
498 === New components to generate REST URLs ===
499
500 * The component ##RestURLGenerator## has been added. Its role, in the long term, is to generate a REST URL for any kind of EntityReference. It currently handles ##DocumentReference## and ##SpaceReference##.
501 * The corresponding script service has been added: ##$services.rest## with the method ##$services.rest.url($entityReference)##.
502
503 === Reference Scripting API for Nested Spaces ===
504
505 The Script API for Entity References has been updated with new APIs to support creating Nested Spaces references. For example:
506
507 {{code language="none"}}
508 {{velocity}}
509 $services.model.createDocumentReference("wiki", ["space1", "space2"], "page")
510 $services.model.createDocumentReference("wiki", ["space1", "space2"], "page", "default")
511 $services.model.createSpaceReference(["space1", "space2"], $services.model.createWikiReference("wiki"))
512 {{/velocity}}
513 {{/code}}
514
515 === Resolve nested spaces in JavaScript ===
516
517 {{code language="js"}}
518 var spaceReference = XWiki.Model.resolve('A.B.C', XWiki.EntityType.SPACE);
519 spaceReference.getReversedReferenceChain().map(function(entityReference) {
520 return entityReference.name;
521 }).join(' > ');
522 // Produces: A > B > C
523 {{/code}}
524
525 See the [[JavaScript API documentation>>platform:DevGuide.JavaScriptAPI||anchor="HWorkwithEntityReferences"]] for more details.
526
527 == New readonly XWikiContext provider ==
528
529 You can inject a new "readonly" XWikiContext the following way:
530
531 {{code language="java"}}
532 @Inject
533 @Named("readonly")
534 Provider<XWikiContext> roXWikiContextProvider;
535 {{/code}}
536
537 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 introduced 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.
538
539 == New Space/XWikiSpace table ==
540
541 A [[new table dedicated to Spaces has been introduced>>platform:DevGuide.DatabaseSchema]], 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).
542
543 == Queries improvement ==
544
545 === Allow executing complete SELECT queries ===
546
547 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:
548
549 * For the ##Document##/##XWikiDocument## table: ##fullName##, ##name##, ##space##, ##language##, ##defaultLanguage##, ##translation##, ##hidden##
550 * For the ##Space##/##XWikiSpace## table: ##reference##, ##name##, ##parent##, ##hidden##
551
552 This is also true for the Named Queries located in the ##queries.hbm.xml## file.
553
554 === New Secure Query ===
555
556 The right to execute or not some Query is now controlled by each ##org.xwiki.query.QueryExecutor##.
557
558 Anyone can ask the executor to check or ignore Right through the new ##org.xwiki.query.SecureQuery## extending ##org.xwiki.query.Query##:
559
560 * ##checkCurrentAuthor()##: indicate if the current author right should be checked
561 * ##checkCurrentUser()##: indicate if the result should be filtered based on current user Right (only implemented by SOLR right now)
562
563 == XWiki Select Widget ==
564
565 A [[new widget has been introduced>>platform:DevGuide.XWikiSelect]], to have a rich select box:
566
567 {{image reference="ReleaseNotesXWiki72RC1@xwiki-select.png"/}}
568
569 == Document Picker ==
570
571 Two new Velocity macros has been added to allow selecting a page from a tree picker and to display the path (breadcrumbs) to the selected page.
572
573 {{image reference="ReleaseNotesXWiki72RC1@locationPicker.png"/}}
574
575 Check the [[Document Picker documentation>>extensions:Extension.Document Picker]] for more details.
576
577 == REST ==
578
579 2 new resources have been exposed to the REST API:
580
581 * [[JobStatus>>platform:Features.XWikiRESTfulAPI||anchor="HJobresources"]]
582 * [[JobLog>>platform:Features.XWikiRESTfulAPI||anchor="HJobresources"]]
583
584 === REST script services ===
585
586 New ##url(EntityReference)## was introduced to return relative REST URL of an entity. The new ##url(EntityReference reference, boolean external)## has been added to force returning an external form URL. See [[Generate a REST URL for a resource>>platform:Features.XWikiRESTfulAPI||anchor="HGenerateaRESTURLforaresource"]] for more details.
587
588 == Miscellaneous ==
589
590 * 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.
591 * custom Maven properties which have a special meaning (like ##xwiki.extension.features##) are not ##duplicated## in Extension custom properties anymore.
592 * standard fields names have been added to ##org.xwiki.extension.rating.RatingExtension##.
593 * URL configuration now use default ##ConfigurationSource## provider instead of only ##xwiki.properties## one which means it's possible to overwrite properties for each wiki among other things.
594 * Added ability to set and change the URL scheme to use in the Execution Context. This allows code to dynamically change the generated URLs when Rendering a document (useful when performing an Export for example).
595 * Started a new ##filesystem## URL Scheme for exporting Resources to the filesystem and generating URLs to them (useful for the HTML Export for example). At the moment, only the ##webjars## Resource Type is using it and all other Resource Types are using the old ##XWikiURLFactory## class.
596 * A new DocumentModelBridge.getContentAuthorReference() method has been added to allow accessing the content author of a document without depending on oldcore.
597 * Deprecate XWiki.parseContent(...) since it is was misleading and outdated. Its documentation mentioned that the passed content is parsed as velocity code, but it was actually doing much more than that and had some unwanted side-effect. Instead, use the parse/renderer that is specific to the type of content you have. See more details in [[XWIKI-12299>>http://jira.xwiki.org/browse/XWIKI-12299]].
598 * A new script service is available to retrieve the status of a specified job or the status of the currently running job from a specified group. See the [[Job Module>>extensions:Extension.Job Module||anchor="HScriptService"]] documentation for details.
599 * 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>>http://jira.xwiki.org/browse/XWIKI-12306]] for more details.
600 * In the [[Active Install Extension>>extensions:Extension.Active Installs Server Application]], a new Velocity Macro has been introduced to compute the number of Active Installs having a specific Extension. Example usage:(((
601 {{code language="none"}}
602 {{include reference="ActiveInstalls.ExtensionCount"/}}
603
604 {{velocity}}
605 #set ($extensionIds = [
606 'org.xwiki.contrib:xwiki-totem-application',
607 'jsimard:event-reporter-application',
608 'mouhb:likeapplication'
609 ])
610 |=Extension Id|=Count
611 #foreach($extensionId in $extensionIds)
612 #countActiveInstallsUsingExtension($extensionId $count)
613 |$extensionId|$count
614 #end
615 {{/velocity}}
616 {{/code}}
617 )))
618 * Better support of non-DOCUMENT ##EntityReferences## in ##DocumentReferenceConverter##. It now behaves like ##XWiki#getDocument(EntityReference)##.
619 * The Copy/Rename/Delete UI actions are now using the [[Refactoring Module's Script Services>>extensions:Extension.Refactoring Module]].
620 * You can see the children and backlinks of any document with the new parameters ##?xpage=children## and ##?xpage=backlinks## to add to the document URL. To get the children according to the parent/child mechanism, you can use ##?xpage=children&hierarchy=parentchild##.
621 ** The features are also available as viewers: ##?viewer=children## and ##?viewer=backlinks##
622 ** A new "siblings" viewer has been added, accessible both with ##?viewer=siblings## and ##?xpage=siblings##.
623 ** For this viewers, a ##displayHidden## parameter has been added. By default, the hidden pages are not displayed unless the user's configuration overwrites this.
624 * You can now reuse the velocity ##hierarchy## macros defined in the Flamingo Skin's ##hierarchy_macros.vm## template to display the breadcrumbs for a particular document. See [[XWIKI-12408>>http://jira.xwiki.org/browse/XWIKI-12408]].
625
626 * In JavaScript, the class ##XWiki.Document## has been modified to handle nested spaces. A new constructor have been created, and the old one is deprecated.
627
628 == Deprecated and Retired projects ==
629
630 * The [[OSCache-based Cache Extension>>extensions:Extension.Cache OSCache]] has been [[moved to ##xwiki-contrib##>>https://github.com/xwiki-contrib/xwiki-platform-cache-oscache]] 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).
631
632 == Upgrades ==
633
634 The following dependencies have been upgraded:
635
636 * [[Bootstrap 3.3.5>>http://jira.xwiki.org/browse/XWIKI-12211]]
637 * [[Cssparser 0.9.16>>http://jira.xwiki.org/browse/XCOMMONS-817]]
638 * [[Commons-compress 1.10>>http://jira.xwiki.org/browse/XCOMMONS-842]]
639 * [[Groovy 2.4.4>>http://jira.xwiki.org/browse/XCOMMONS-831]]
640 * [[Hibernate Validator 4.3.2>>http://jira.xwiki.org/browse/XWIKI-12365]]
641 * [[HSQLDB 2.3.3>>http://jira.xwiki.org/browse/XE-1491]]
642 * [[Httpclient 4.5>>http://jira.xwiki.org/browse/XCOMMONS-815]]
643 * [[Httpcore 4.4.3>>http://jira.xwiki.org/browse/XCOMMONS-845]]
644 * [[Infinispan 7.2.5>>http://jira.xwiki.org/browse/XWIKI-12557]]
645 * [[Jackson 2.6.1>>http://jira.xwiki.org/browse/XCOMMONS-839]]
646 * [[JGroups 3.6.6>>http://jira.xwiki.org/browse/XWIKI-12507]]
647 * [[Joda-Time 2.8.2>>http://jira.xwiki.org/browse/XWIKI-12402]]
648 * [[JRuby 1.7.21>>http://jira.xwiki.org/browse/XWIKI-12344]]
649 * [[Less4j 1.14.0>>http://jira.xwiki.org/browse/XWIKI-12400]]
650 * [[Tika 1.10>>http://jira.xwiki.org/browse/XWIKI-12401]]
651
652 = Translations =
653
654 The following translations have been updated:
655
656 {{language codes="da, de, fr, hu, ko, pt_BR, sk, sv"/}}
657
658 = Tested Browsers & Databases =
659
660 {{include reference="TestReports.ManualTestReportSummaryXWiki72"/}}
661
662 = Performances tests compared to 6.4.5 =
663
664 There hasn't really been much performance work on this version (it will most probably start again in 7.3 and 7.4) which was dedicated to nested spaces support so we get mostly the same results than in [[7.1>>test:Performances.Jetty HSQLDB single wiki 712 to 72]]. The important point here was to check if nested spaces refactoring had much impact on performances.
665
666 {{warning}}
667 It's important to note that the way to measure performances has changed in this version (used to me a range of 10 values taken one by one and we are now using [[Dumbbench>>https://github.com/tsee/dumbbench]] usually on 100 values) and this is why you'll see some differences if you compare this Performance report with the one in [[7.1 release note>>ReleaseNotesXWiki71]] for example.
668 {{/warning}}
669
670 {{display reference="test:Performances.Jetty HSQLDB single wiki 645 to 72" section="HSummary"/}}
671
672 More details on [[performance comparison on single wiki between 7.2 and 6.4.5>>test:Performances.Jetty HSQLDB single wiki 645 to 72]].
673
674 = Known issues =
675
676 * [[Bugs we know about>>http://jira.xwiki.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=category+%3D+%22Top+Level+Projects%22+AND+issuetype+%3D+Bug+AND+resolution+%3D+Unresolved+ORDER+BY+updated+DESC]]
677
678 = Backward Compatibility and Migration Notes =
679
680 == General Notes ==
681
682 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.
683
684 == Issues specific to XWiki 7.2 ==
685
686 === Nested spaces ===
687
688 See [[previous Nested spaces section>>||anchor="HNestedSpaces"]] for details on what changes in the way some API and the database are dealing with the Document Space.
689
690 Note that some existing Extensions are impacted and may break slightly: Extensions taking some user input and creating Spaces based on that will most likely display {{{"\."}}}, {{{"\:"}}} and {{{"\\"}}} in the UI. Unless they already clean the user input and remove ".", ":" and "\" characters. So for example if a user enter a Space name of "my.space":
691
692 * before 7.2: the Extension would create/display a Space named "my.space"
693 * after 7.2: the Extension will create/display a Space named "my\.space"
694
695 === URLs ===
696
697 In order to support Nested Pages and have the ability that typing a URL such as ##/A## will lead to ##A.WebHome## we have stopped supporting URLs that don't specify the ##view## action (when ##xwiki.showviewaction=1##). Thus URLs such as ##/xwiki/bin/Something## now need to be written as ##/xwiki/bin/view/Something##. If ##xwiki.showviewaction=0## then you can still write ##/xwiki/bin/<something>## provided that ##<something>## isn't equal to ##view##. If it is (you have a space named ##view##) then you need to use ##/xwiki/bin/view/view[...]##.
698
699 === Templates ===
700
701 All the templates specific to [[extensions:Extension.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.
702
703 === Solr Search Index ===
704
705 We made [[important changes>>||anchor="HSolrSearch-1"]] to the Solr schema in this release and unfortunately we don't have support for automatic Solr search index migration at this point. You have to delete the 'solr' folder from the configured permanent directory of your XWiki instance. The Solr index will be recreated automatically and the entire wiki/farm will be re-indexed after a server restart.
706
707 == API Breakages ==
708
709 The following APIs were modified since XWiki 7.1.2:
710
711 * New configuration option to change the size of the Job statuses cache:(((
712 {{code language="none"}}
713 org.xwiki.job.JobManagerConfiguration: Method 'public int getJobStatusCacheSize()' has been added to an interface
714 {{/code}}
715 )))
716
717 * Added missing methods to the ##DocumentModelBridge## class, which are already implemented by XWikiDocument:(((
718 {{code language="none"}}
719 org.xwiki.bridge.DocumentModelBridge: Method 'public org.xwiki.model.reference.DocumentReference getContentAuthorReference()' has been added to an interface
720 {{/code}}
721 )))
722
723 * AbstractWrappingObject, AbstractSafeObject and ScriptSafeProvider have been moved to xwiki-commons-script:(((
724 {{code language="none"}}
725 org.xwiki.extension.wrap.WrappingIterableResult: Removed org.xwiki.extension.internal.safe.AbstractSafeObject from the list of superclasses
726 org.xwiki.extension.wrap.WrappingIterableResult: Removed org.xwiki.extension.wrap.AbstractWrappingObject from the list of superclasses
727 org.xwiki.extension.wrap.WrappingIterableResult: Parameter 2 of 'public WrappingIterableResult(org.xwiki.extension.repository.result.IterableResult, org.xwiki.extension.internal.safe.ScriptSafeProvider)' has changed its type to org.xwiki.script.internal.safe.ScriptSafeProvider
728 org.xwiki.filter.script.AbstractFilterScriptService: Changed type of field scriptProvider from org.xwiki.extension.internal.safe.ScriptSafeProvider to org.xwiki.script.internal.safe.ScriptSafeProvider
729 org.xwiki.extension.script.AbstractExtensionScriptService: Changed type of field scriptProvider from org.xwiki.extension.internal.safe.ScriptSafeProvider to org.xwiki.script.internal.safe.ScriptSafeProvider
730 {{/code}}
731 )))
732
733 * com.xpn.xwiki.XWiki#localStringEntityReferenceSerializer now exists in oldcore, we do not need it in the aspect anymore:(((
734 {{code language="none"}}
735 com.xpn.xwiki.XWikiCompatibilityAspect: Method 'public org.xwiki.model.reference.EntityReferenceSerializer ajc$interFieldGetDispatch$com_xpn_xwiki_XWikiCompatibilityAspect$com_xpn_xwiki_XWiki$localStringEntityReferenceSerializer(com.xpn.xwiki.XWiki)' has been removed
736 com.xpn.xwiki.XWikiCompatibilityAspect: Method 'public void ajc$interFieldInit$com_xpn_xwiki_XWikiCompatibilityAspect$com_xpn_xwiki_XWiki$localStringEntityReferenceSerializer(com.xpn.xwiki.XWiki)' has been removed
737 com.xpn.xwiki.XWikiCompatibilityAspect: Method 'public void ajc$interFieldSetDispatch$com_xpn_xwiki_XWikiCompatibilityAspect$com_xpn_xwiki_XWiki$localStringEntityReferenceSerializer(com.xpn.xwiki.XWiki, org.xwiki.model.reference.EntityReferenceSerializer)' has been removed
738 {{/code}}
739 )))
740
741 * Not a breakage. The legacy method was not in the right place (which mean that it was not available so it actually fix a breakage):(((
742 {{code language="none"}}
743 com.xpn.xwiki.XWikiCompatibilityAspect: Method 'public java.lang.Object getRenderingEngine()' has been removed
744 {{/code}}
745 )))
746
747 * Young API. ExportURLFactoryContext been renamed to FilesystemExportContext and moved to the Filesystem URL scheme module
748 {{comment}}Eduard @ 7.2RC1:
749 I have found 3 differences in xwiki-platform that have not generated a clirr error, maybe they are leftovers or the clirr report did not catch them for some reason. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/pom.xml#L493:L510{{/comment}}

Get Connected