Wiki source code of Release Notes for XWiki 7.2

Version 23.1 by Guillaume Delhumeau on 2015/09/23

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 <insert description of release here>
8
9 = New and Noteworthy (since XWiki 7.1) =
10
11 [[Full list of issues fixed and Dashboard for 7.2>>http://jira.xwiki.org/secure/Dashboard.jspa?selectPageId=13499]].
12
13 == Nested Pages ==
14
15 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.
16
17 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.
18
19 Advantages of Nested Pages:
20
21 * The URL reflects the page hierarchy
22 * Finer-grained control: Ability to set permissions at each level
23 * Generally speaking, a nicer and simpler way to organize your content hierarchically
24 * Moving and Deleting pages updates the hierarchy
25
26 Terminology:
27
28 * **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).
29 * **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.
30 * **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.
31
32 For more information, see [[Content Organization>>platform:Features.ContentOrganization||anchor="HHistory"]].
33
34 == Script right ==
35
36 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.
37
38 {{image reference="ReleaseNotesXWiki72M1@scriptright.png"/}}
39
40 Example when the author of a script doesn't have the Script right:
41
42 {{image reference="ReleaseNotesXWiki72M1@scriptRightsErrorNotAllowed.png"/}}
43
44 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.
45
46 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.
47
48 {{image reference="ReleaseNotesXWiki72M2@scriptRightsExplicitlyAllowedInXWikiPreferences.png"/}}
49
50 == Hiding of the Parent-Child Relationship ==
51
52 Following our decision to drop the Parent-Child relationship (see above), it's now been turned off by default in favor of Nested Pages.
53
54 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.
55
56 === New Breadcrumb ===
57
58 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:
59
60 {{image reference="ReleaseNotesXWiki72M2@breadcrumb.png"/}}
61
62 === New Index Tree ===
63
64 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:
65
66 {{image reference="ReleaseNotesXWiki72M2@indextree.png"/}}
67
68 === Updated Edit Mode ===
69
70 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:
71
72 {{image reference="ReleaseNotesXWiki72M2@editmode.png"/}}
73
74 == Flamingo ==
75
76 Following the introduction of the Nested Documents feature, we have changed a lot our default Flamingo skin:
77
78 * The top menu has been removed and replaced by a drawer menu that you can expand by clicking on the top right icon
79 * The add menu has been relocated near the edit one
80 * The L&F of the Add, Edit, and "More Actions" menus has been changed
81 * A lot of actions have been moved to the "More Actions" menu
82 * The page breadcrumb has suffered some changes:
83 ** it is now also displayed on the wiki home page
84 ** 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.
85 ** the sub-wiki pretty name is included between the home icon and the local page path
86 * The actions menus (edit, create, more actions) are now available from the rename, copy and delete actions.
87 * The create, copy and rename page actions have been modified to support nested documents:
88 ** The source and target documents are displayed using the breadcrumb
89 ** The target document can be selected using a document tree picker
90 ** For advanced users there is also the option to specify the target document 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).
91 * The delete action proposes to delete the children of the document.
92
93 * The welcome message from the main wiki home page has been updated.
94 * The "Spaces" widget from the wiki dashboard has been replaced with "Pages" which shows the hierarchy of nested pages from that wiki.
95 * For non terminal documents, we have introduced a "Page Administration", where you will find settings that concern the document 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:
96 ** a section to set rights for the document only.
97 ** a section to set rights for the document and its children.
98 * For terminal documents, 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).
99 * The create action has been relooked (with the introduction of the "page type" field) and proposes to import an office document.
100 * A new "children" viewer is now accessible in the "more actions" menu, along with the other viewers.
101 * For Terminal Pages, a new "siblings" viewer is present, which replaces the old "space index" feature.
102
103 {{gallery}}
104 image:ReleaseNotesXWiki72RC1@flamingo.png
105 image:ReleaseNotesXWiki72M3@edit.png
106 image:ReleaseNotesXWiki72M3@more_actions.png
107 image:ReleaseNotesXWiki72M3@drawer.png
108 image:ReleaseNotesXWiki72M3@drawer-languages.png
109 image:ReleaseNotesXWiki72M3@flamingo-phone.png
110 image:ReleaseNotesXWiki72M3@homepageInBreadcrumbs-after.png
111 image:ReleaseNotesXWiki72M3@subWikiBreadcrumb.png
112 image:ReleaseNotesXWiki72M3@createPage-full.png
113 image:ReleaseNotesXWiki72M3@delete.png
114 image:ReleaseNotesXWiki72M3@deleting.png
115 image:ReleaseNotesXWiki72M3@deleted.png
116 image:ReleaseNotesXWiki72M3@delete-error.png
117 image:ReleaseNotesXWiki72M3@copyPage-full.png
118 image:ReleaseNotesXWiki72M3@copyPage-full-treePicker.png
119 image:ReleaseNotesXWiki72M3@copyPage-full-advanced.png
120 image:ReleaseNotesXWiki72M3@renamePage-full.png
121 image:ReleaseNotesXWiki72RC1@AdministerPageMenu.png
122 image:ReleaseNotesXWiki72RC1@AdminPageAndChildrenRights.png
123 image:ReleaseNotesXWiki72RC1@AdminPageRights.png
124 image:ReleaseNotesXWiki72RC1@AdministerParentMenu.png
125 image:ReleaseNotesXWiki72RC1@create.png
126 image:ReleaseNotesXWiki72RC1@CreatePopUp.png
127 image:ReleaseNotesXWiki72RC1@menu-children.png
128 image:ReleaseNotesXWiki72RC1@menu-siblings.png
129 {{/gallery}}
130
131 == LDAP improvements ==
132
133 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.
134
135 == Solr Search ==
136
137 You can now search for nested documents using the [[Solr Search Application>>extensions:Extension.Solr Search Application]]. The display of the search result location has been updated to support nested documents.
138
139 {{image reference="ReleaseNotesXWiki72RC1@searchResultLocation.png"/}}
140
141 The "Space" facet has been replaced with a "Location" facet that supports nested documents. This allows you to search in a specific location in the page hierarchy.
142
143 {{image reference="ReleaseNotesXWiki72RC1@searchLocationFacet.png"/}}
144
145 The "Page" facet has been removed by default because it doesn't bring value in the context of the nested documents: all non-terminal documents have the same name 'WebHome'. The "Wiki" facet is displayed by default only on the main wiki and only if you have multiple wikis.
146
147 == Miscellaneous ==
148
149 <insert misc user stuff and important bug fix descriptions here in a list, when they are too small to warrant a section by themselves - Change the version in the URL below!>
150
151 * 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'.
152 * 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.
153 * The list of available template providers is now sorted by document full name.
154 * 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).
155 * Import UI move to new standard tree(((
156 {{image reference="ReleaseNotesXWiki72M2@import.png"/}}
157 )))
158 * The size of the Job status cache is now configurable. See ##job.statusCacheSize## property in ##xwiki.properties## files.
159 * The Spaces macro (which lists all Spaces) is now working fine when there are Nested Spaces (some links were failing).
160 * The LiveTable macro is now working fine when there are Nested Spaces (some links were failing).
161 * 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.
162 * The Navigation panel displays nested pages:(((
163 {{image reference="ReleaseNotesXWiki72M3@navigationpanel.png"/}}
164 )))
165 * 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.
166 * Fixed various issues for several applications bundled in XE (such as WatchList and Annotations), which should now work well with Nested Spaces.
167 * The Administration mode for spaces and wikis now uses the standard reference-based breadcrumbs instead of the previously custom section-based breadcrumbs.(((
168 {{image reference="ReleaseNotesXWiki72M3@administrationUI-breadcrumbs-standard.png"/}}
169 )))
170 * 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.
171 * It's now possible to create Skins in Nested Spaces.
172 * 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.
173 * 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).
174 * The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] is now displaying a message when the tree is empty.(((
175 {{image reference="ReleaseNotesXWiki72RC1@emptyDocTree.png"/}}
176
177 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).
178 )))
179 * 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 Documents feature, have been fixed.
180 * It's now possible create new FAQs in Nested Spaces.
181 * When using the XWiki Jetty distribution, a memory dump is automatically created in XWiki's ##data/## folder when an ##Out Of Memory## error occurs.
182 * The Activity Stream now also displays activity for Nested Spaces.
183 * Skin editor now properly works for a nested skin document
184
185 See the [[full list of JIRA issues>>http://jira.xwiki.org/sr/jira.issueviews:searchrequest-printable/temp/SearchRequest.html?jqlQuery=project+in+%28XCOMMONS%2C+XRENDERING%2C+XWIKI%2C+XE%29+and+status+%3D+Closed+and+resolution+%3D+Fixed+and+fixVersion+%3D+%22<version>%22&tempMax=1000]] fixed in this release.
186
187 = For Developers =
188
189 == Nested Spaces ==
190
191 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.
192
193 === Space Reference instead of Space name ===
194
195 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:
196
197 * "##.##" (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}}}##.
198 * 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...
199 * Various APIs are also affected by this Space name to Space Reference input change:
200 ** ##XWiki#getSpaceDocsName## methods (both in the public and private XWiki API)
201 ** 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:(((
202 {{code language="java"}}
203 private EntityReferenceResolver<String> relativeEntityReferenceResolver =
204 Utils.getComponent(EntityReferenceResolver.TYPE_STRING, "relative");
205 ...
206 or
207 ...
208 @Inject
209 @Named("relative")
210 private EntityReferenceResolver<String> relativeEntityReferenceResolver;
211 ...
212 private List<String> extractSpaceNames(String spaces)
213 {
214 List<String> spaceNames = new ArrayList<>();
215 // Parse the spaces list into Space References
216 EntityReference spaceReference = this.relativeEntityReferenceResolver.resolve(spaces, EntityType.SPACE);
217 for (EntityReference reference : spaceReference.getReversedReferenceChain()) {
218 spaceNames.add(reference.getName());
219 }
220 return spaceNames;
221 }
222 {{/code}}
223 )))
224 ** Extensions/code implementing ##ExportURLFactoryActionHandler## will also need to be modified to handle nested Spaces passed in the ##space## parameter.
225 * 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]]).
226
227 === Space separator properly taken into account ===
228
229 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.
230
231 === New XAR format ===
232
233 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).
234
235 Two new attributes has been added to the ##<xwikidoc>## root XML element
236
237 * ##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).
238 * ##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 would be placed anywhere in the document.
239
240 === REST module ===
241
242 * 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##.
243
244 === URL modules ===
245
246 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]].
247
248 === New Rename/Delete Jobs ===
249
250 New code has been developed to support Nested Documents/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.
251
252 However you can start to test this by using the following Script Services APIs:
253
254 * Copy a Space(((
255 {{code language="none"}}
256 #set ($source = $services.model.resolveSpace('Path.To.Source'))
257 #set ($destination = $services.model.resolveSpace('Path.To.New.Parent'))
258 $services.refactoring.copy($source, $destination).join()
259 {{/code}}
260 )))
261 * Copy a Space As(((
262 {{code language="none"}}
263 #set ($source = $services.model.resolveSpace('Path.To.Source'))
264 #set ($destination = $services.model.resolveSpace('Path.To.New.Name'))
265 $services.refactoring.copyAs($source, $destination).join()
266 {{/code}}
267 )))
268 * Move a Space(((
269 {{code language="none"}}
270 #set ($source = $services.model.resolveSpace('Path.To.Source'))
271 #set ($destination = $services.model.resolveSpace('Path.To.New.Parent'))
272 $services.refactoring.move($source, $destination).join()
273 {{/code}}
274 )))
275 * Move a Document(((
276 {{code language="none"}}
277 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
278 #set ($destination = $services.model.resolveSpace('Path.To.New.Parent'))
279 $services.refactoring.move($source, $destination).join()
280 {{/code}}
281 )))
282 * Rename a Space(((
283 {{code language="none"}}
284 #set ($source = $services.model.resolveSpace('Path.To.Source'))
285 $services.refactoring.rename($source, 'NewName').join()
286 {{/code}}
287 )))
288 * Rename a Document(((
289 {{code language="none"}}
290 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
291 $services.refactoring.rename($source, 'NewName').join()
292 {{/code}}
293 )))
294 * Delete a Document(((
295 {{code language="none"}}
296 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
297 $services.refactoring.delete($source).join()
298 {{/code}}
299 )))
300 * Delete a Space(((
301 {{code language="none"}}
302 #set ($source = $services.model.resolveSpace('Path.To.Source'))
303 $services.refactoring.delete($source).join()
304 {{/code}}
305 )))
306 * Convert a Terminal Document to a Nested Document(((
307 {{code language="none"}}
308 #set ($source = $services.model.resolveDocument('Path.To.Page'))
309 $services.refactoring.convertToNestedDocument($source).join()
310 {{/code}}
311 )))
312 * Convert a Nested Document to a Terminal Document(((
313 {{code language="none"}}
314 #set ($source = $services.model.resolveDocument('Path.To.Source.WebHome'))
315 $services.refactoring.convertToTerminalDocument($source).join()
316 {{/code}}
317 )))
318
319 === New create action parameters and logic ===
320
321 The create action now accepts a ##spaceReference## parameter and a ##name## parameter, together with an optional ##tocreate=terminal## parameter (usable on non-terinal documents). 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"]].
322
323 These logic is now 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 document:
324 {{image reference="ReleaseNotesXWiki72M1@createUINestedDocuments.png"/}}
325
326 == New Reference-related APIs ==
327
328 Various new API around References has been introduced while adding support for nested spaces.
329
330 === Complete References Providers ===
331
332 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)
333
334 {{code language="java"}}
335 @Inject
336 Provider<DocumentReference> defaultDocumentReference;
337
338 @Inject
339 @Named("current")
340 Provider<DocumentReference> currentDocumentReference;
341 {{/code}}
342
343 === org.xwiki.model.reference.EntityReferenceProvider ===
344
345 ##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.
346
347 {{code language="java"}}
348 @Inject
349 EntityReferenceProvider provider;
350 {{/code}}
351
352 === Properly support any kind of References in getDocument and getURL ===
353
354 ##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).
355
356 Same for ##com.xpn.xwiki.XWiki#getURL(EntityReference)## and ##com.xpn.xwiki.api.XWiki#getURL(EntityReference)##.
357
358 === New helpers in EntityReference ===
359
360 * ##boolean equals(EntityReference otherReference, EntityType to)##: same as equals but only take into account Reference parts up to the passed entity type (included)
361 * ##boolean equals(EntityReference otherReference, EntityType from, EntityType to)##: same as equals but only take into account Reference parts between passed entity types (included)
362 * ##boolean equalsNonRecursive(EntityReference otherReference)##: same as equals but does not take into account the parent
363
364 === New helpers in LocalDocumentReference ===
365
366 * ##LocalDocumentReference(String pageName, EntityReference spaceReference)##: allowed created a LocalDocumentReference from a Space Reference instead of just the space name
367
368 === org.xwiki.model.reference.SpaceReferenceResolver ===
369
370 New default ##String## and ##EntityReference## based SpaceReferenceResolver has been added. It's the same behavior then ##DocumentReferenceBehavior## but for spaces.
371
372 {{code language="java"}}
373 @Inject
374 SpaceReferenceResolver<String> stringResolver;
375
376 @Inject
377 SpaceReferenceResolver<EntityReference> referenceResolver;
378 {{/code}}
379
380 === New model Script Service helpers ===
381
382 * new help to escape an entity name according to default Reference syntax as in:(((
383 {{code language="velocity"}}
384 $services.model.escape('some.space:with\specialchars', 'SPACE')
385 {{/code}}
386
387 will print
388
389 {{code language="nonde"}}
390 some\.space\:with\\specialchars
391 {{/code}}
392 )))
393 * you can retrieve a node from an ##EntityReferenceTree## using its reference:(((
394 {{code language="velocity"}}
395 #set ($alice = $services.model.resolveDocument('wiki:Users.Alice.WebHome'))
396 #set ($bob = $services.model.resolveDocument('wiki:Users.Directory'))
397 #set ($tree = $services.model.toTree($alice, $bob))
398 #set ($usersNode = $tree.get($bob.lastSpaceReference))
399 {{/code}}
400 )))
401
402 === New components to generate REST URLs ===
403
404 * The component ##RestURLGenerator## has been added. Its role, in the long terme, is to generate a REST URL for any kind of EntityReference. It currently handles ##DocumentReference## and ##SpaceReference##.
405 * The corresponding script service has been added: ##$services.rest## with the method ##$services.rest.url($entityReference)##.
406
407 === Resolve nested spaces in JavaScript ===
408
409 {{code language="js"}}
410 var spaceReference = XWiki.Model.resolve('A.B.C', XWiki.EntityType.SPACE);
411 spaceReference.getReversedReferenceChain().map(function(entityReference) {
412 return entityReference.name;
413 }).join(' > ');
414 // Produces: A > B > C
415 {{/code}}
416
417 See the [[JavaScript API documentation>>platform:DevGuide.JavaScriptAPI||anchor="HWorkwithEntityReferences"]] for more details.
418
419 == New readonly XWikiContext provider ==
420
421 You can inject a new "readonly" XWikiContext the following way:
422
423 {{code language="java"}}
424 @Inject
425 @Named("readonly")
426 Provider<XWikiContext> roXWikiContextProvider;
427 {{/code}}
428
429 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 introduce 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.
430
431 == New Space/XWikiSpace table ==
432
433 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).
434
435 == Queries improvement ==
436
437 === Allow executing complete SELECT queries ===
438
439 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:
440
441 * For the ##Document##/##XWikiDocument## table: ##fullName##, ##name##, ##space##, ##language##, ##defaultLanguage##, ##translation##, ##hidden##
442 * For the ##Space##/##XWikiSpace## table: ##reference##, ##name##, ##parent##, ##hidden##
443
444 This is also true for the Named Queries located in the ##queries.hbm.xml## file.
445
446 === New Secure Query ===
447
448 The right to execute or not some Query is now controlled by each ##org.xwiki.query.QueryExecutor##.
449
450 Anyone can ask the executor to check or ignore Right through the new ##org.xwiki.query.SecureQuery## extending ##org.xwiki.query.Query##:
451
452 * ##checkCurrentAuthor()##: indicate if the current author right should be checked
453 * ##checkCurrentUser()##: indicate if the result should be filtered based on current user Right (only implemented by SOLR right now)
454
455 == JS API Improvements ==
456
457 * It's now possible to create a Nested Spaces Reference using XWiki's Javascript API. For example:(((
458 {{code language="javascript"}}
459 // Construct a Nested Space reference
460 var reference = new XWiki.SpaceReference('wiki', ['space1', 'space2']);
461 expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2');
462 reference = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
463 expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2.page');
464 // Construct a non-Nested Space reference
465 reference = new XWiki.SpaceReference('wiki', 'space');
466 expect(XWiki.Model.serialize(reference)).toEqual('wiki:space');
467 // Try passing non-valid space parameters
468 expect(function() {new XWiki.SpaceReference('wiki', [])}).toThrow('Missing mandatory space name or invalid type for: []');
469 expect(function() {new XWiki.SpaceReference('wiki', 12)}).toThrow('Missing mandatory space name or invalid type for: [12]');
470 {{/code}}
471 )))
472 * A new ##XWiki.EntityReference.equals()## method has been added. For example:(((
473 {{code language="javascript"}}
474 var reference1 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
475 var reference2 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
476 var reference3 = new XWiki.DocumentReference('wiki2', ['space1', 'space2'], 'page');
477 expect(reference1.equals(reference2)).toBe(true);
478 expect(reference1.equals(reference3)).toBe(false);
479 {{/code}}
480 )))
481 * A new ##XWiki.EntityReference.fromJSONObject(obejct)## has been added to create a Javascript ##XWiki.EntityReference## from a Java ##EntityReference## directly serialized as JSON:(((
482 {{code language="javascript"}}
483 var reference = XWiki.EntityReference.fromJSONObject(jsonText.evalJSON());
484 {{/code}}
485 )))
486 * 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##.
487
488 == Updated Document Tree Macro ==
489
490 The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] now supports Nested Documents and Nested Spaces modes. Specifically, the following changes have been made:
491
492 * removed the ##showSpaceAsDocument## parameter (was introduced recently in 7.2M1)
493 * deprecated the ##showChildDocuments## parameter
494 * added the ##hierarchyMode## parameter with two supported values: ##reference## (default) and ##parentchild##
495
496 As a result, you can use the document tree macro like this:
497
498 * Nested Document Tree(((
499 {{code language="none"}}
500 {{documentTree/}}
501 {{/code}}
502 )))
503 * Nested Space + Page Tree(((
504 {{code language="none"}}
505 {{documentTree showSpaces="true" /}}
506 {{/code}}
507 )))
508 * Parent-Child Document Tree(((
509 {{code language="none"}}
510 {{documentTree hierarchyMode="parentchild" /}}
511 {{/code}}
512 )))
513 * Old Document Index Tree (i.e. Parent-Child mixed with space grouping)(((
514 {{code language="none"}}
515 {{documentTree hierarchyMode="parentchild" showSpaces="true" /}}
516 {{/code}}
517 )))
518
519 == Reference Scripting API for Nested Spaces ==
520
521 The Script API for Entity References has been updated with new APIs to support creating Nested Spaces references. For example:
522
523 {{code language="none"}}
524 {{velocity}}
525 $services.model.createDocumentReference("wiki", ["space1", "space2"], "page")
526 $services.model.createDocumentReference("wiki", ["space1", "space2"], "page", "default")
527 $services.model.createSpaceReference(["space1", "space2"], $services.model.createWikiReference("wiki"))
528 {{/velocity}}
529 {{/code}}
530
531
532 == Deprecated and Retired projects ==
533
534 * 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).
535
536 == Upgrades ==
537
538 The following dependencies have been upgraded:
539
540 * [[httpclient 4.5>>http://jira.xwiki.org/browse/XCOMMONS-815]]
541 * [[cssparser 0.9.16>>http://jira.xwiki.org/browse/XCOMMONS-817]]
542 * [[less4j 1.12.0>>http://jira.xwiki.org/browse/XWIKI-12161]]
543 * [[Joda-Time 2.8.1>>http://jira.xwiki.org/browse/XWIKI-12159]]
544 * [[Bootstrap 3.3.5>>http://jira.xwiki.org/browse/XWIKI-12211]]
545 * [[HSQLDB 2.3.3>>http://jira.xwiki.org/browse/XE-1491]]
546 * [[Groovy 2.4.4>>http://jira.xwiki.org/browse/XCOMMONS-831]]
547 * [[Tika 1.9>>http://jira.xwiki.org/browse/XWIKI-12274]]
548 * [[JRuby 1.7.21>>http://jira.xwiki.org/browse/XWIKI-12344]]
549 * [[Jackson 2.6.0>>http://jira.xwiki.org/browse/XCOMMONS-833]]
550 * [[Hibernate Validator 4.3.2>>http://jira.xwiki.org/browse/XWIKI-12365]]
551 * [[JGroups 3.6.6>>http://jira.xwiki.org/browse/XWIKI-12507]]
552 * [[httpcore 4.4.3>>http://jira.xwiki.org/browse/XCOMMONS-845]]
553 * [[Infinispan 7.2.5>>http://jira.xwiki.org/browse/XWIKI-12557]]
554
555 == XWiki Select Widget ==
556
557 A [[new widget has been introduced>>platform:DevGuide.XWikiSelect]], to have a rich select box:
558
559 {{image reference="ReleaseNotesXWiki72RC1@xwiki-select.png"/}}
560
561 == Document Picker ==
562
563 Two new Velocity macros has been added to allow selecting a document from a tree picker and to display the path (breadcrumbs) to the selected document.
564
565 {{image reference="ReleaseNotesXWiki72RC1@locationPicker.png"/}}
566
567 Check the [[Document Picker documentation>>extensions:Extension.Document Picker]] for more details.
568
569 == Miscellaneous ==
570
571 * 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.
572 * custom Maven properties which have a special meaning (like ##xwiki.extension.features##) are not ##duplicated## in Extension custom properties anymore
573 * standard fields names have been added to ##org.xwiki.extension.rating.RatingExtension##
574 * 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
575 * 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).
576 * 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.
577 * A new DocumentModelBridge.getContentAuthorReference() method has been added to allow accessing the content author of a document without depending on oldcore.
578 * 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]].
579 * 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.
580 * 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.
581 * 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:(((
582 {{code language="none"}}
583 {{include reference="ActiveInstalls.ExtensionCount"/}}
584
585 {{velocity}}
586 #set ($extensionIds = [
587 'org.xwiki.contrib:xwiki-totem-application',
588 'jsimard:event-reporter-application',
589 'mouhb:likeapplication'
590 ])
591 |=Extension Id|=Count
592 #foreach($extensionId in $extensionIds)
593 #countActiveInstallsUsingExtension($extensionId $count)
594 |$extensionId|$count
595 #end
596 {{/velocity}}
597 {{/code}}
598 )))
599 * Better support of non-DOCUMENT ##EntityReferences## in ##DocumentReferenceConverter##. It now behaves like ##XWiki#getDocument(EntityReference)##
600 * The Copy/Rename/Delete UI actions are now using the [[Refactoring Module's Script Services>>extensions:Extension.Refactoring Module]].
601 * The URL parameters ##?viewer=children## and ##?viewer=backlinks## have been added.
602 * A new "siblings" viewer has been added, accessible both with ##?viewer=siblings## and ##?xpage=siblings##.
603 * For ##?viewer=children##, ##?xpage=children##, ##?viewer=siblings## and ##?xpage=siblings## a new ##displayHidden## parameter has been added. By default, the hidden pages are not displayed unless the user's configuration overwrites this.
604
605 = Translations =
606
607 The following translations have been updated:
608
609 {{language codes="none, none"/}}
610
611 = Tested Browsers & Databases =
612
613 {{include reference="TestReports.ManualTestReportTemplateSummary"/}}
614
615 = Performances tests compared to 6.4.5 =
616
617 There hasn't really been much performance work on this version so we get mostly the same result than in [[7.1 release note>>ReleaseNotesXWiki71]]. The important point here was to check if nested spaces ha much impact on performances.
618
619 {{display reference="test:Performances.Jetty HSQLDB single wiki 645 to 72" section="HSummary"/}}
620
621 More details on [[performance comparison on single wiki between 7.2 and 6.4.5>>test:Performances.Jetty HSQLDB single wiki 645 to 72]].
622
623 = Known issues =
624
625 * [[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]]
626
627 = Backward Compatibility and Migration Notes =
628
629 == General Notes ==
630
631 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.
632
633 == Issues specific to XWiki 7.2 ==
634
635 === Nested spaces ===
636
637 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.
638
639 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":
640
641 * before 7.2: the Extension would create/display a Space named "my.space"
642 * after 7.2: the Extension will create/display a Space named "my\.space"
643
644 === URLs ===
645
646 In order to support Nested Documents 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[...]##.
647
648 === Templates ===
649
650 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.
651
652 == API Breakages ==
653
654 The following APIs were modified since XWiki 7.1:
655
656 {{code language="none"}}
657 <clirr output here>
658 {{/code}}

Get Connected