Version 39.1 by Vincent Massol on 2015/07/08

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 <version>>>http://jira.xwiki.org/secure/Dashboard.jspa?selectPageId=<fill id here>]].
12
13 == Nested Documents ==
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 Documents (a.k.a. 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 could inherit page permissions for example. Thus the idea is to have a single hierarchy based on Nested Documents.
18
19 Current status:
20 * In this milestone the UI has not been updated yet but a lot of the required changes have been done in the backend code to support Nested Documents.
21 * What you can try today:
22 ** Typing URLs with Nested Documents. For example typing {{{http://localhost:8080/xwiki/bin/view/A/B/C}}} and then clicking Edit will allow you to create a Page C inside pages A and B (which don't need to exist).
23 ** TODO: Add more supported use cases here
24
25 == Miscellaneous ==
26
27 <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!>
28
29 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.
30
31 = For Developers =
32
33 == Nested Spaces ==
34
35 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.
36
37 === Space reference instead of Space name ===
38
39 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:
40
41 * "##.##" (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}}}##.
42 * 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...
43 * Various APIs are also affected by this Space name to Space reference input change:
44 ** ##XWiki#getSpaceDocsName## methods (both in the public and private XWiki API)
45 ** 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:(((
46 {{code language="java"}}
47 private EntityReferenceResolver<String> relativeEntityReferenceResolver =
48 Utils.getComponent(EntityReferenceResolver.TYPE_STRING, "relative");
49 ...
50 or
51 ...
52 @Inject
53 @Named("relative")
54 private EntityReferenceResolver<String> relativeEntityReferenceResolver;
55 ...
56 private List<String> extractSpaceNames(String spaces)
57 {
58 List<String> spaceNames = new ArrayList<>();
59 // Parse the spaces list into Space References
60 EntityReference spaceReference = this.relativeEntityReferenceResolver.resolve(spaces, EntityType.SPACE);
61 for (EntityReference reference : spaceReference.getReversedReferenceChain()) {
62 spaceNames.add(reference.getName());
63 }
64 return spaceNames;
65 }
66 {{/code}}
67 )))
68 ** Extensions/code implementing ##ExportURLFactoryActionHandler## will also need to be modified to handle nested Spaces passed in the ##space## parameter.
69 * 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]]).
70
71 === Space separator properly taken into account ===
72
73 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.
74
75 === New XAR format ===
76
77 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).
78
79 Two new attributes has been added to the ##<xwikidoc>## root XML element
80
81 * ##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).
82 * ##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.
83
84 == New reference related APIs ==
85
86 Various new API around references has been introduced while adding support for nested spaces.
87
88 === Complete references Providers ===
89
90 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)
91
92 {{code language="java"}}
93 @Inject
94 Provider<DocumentReference> defaultDocumentReference;
95
96 @Inject
97 @Named("current")
98 Provider<DocumentReference> currentDocumentReference;
99 {{/code}}
100
101 === org.xwiki.model.reference.EntityReferenceProvider ===
102
103 ##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.
104
105 {{code language="java"}}
106 @Inject
107 EntityReferenceProvider provider;
108 {{/code}}
109
110 === Properly support any kind of reference in getDocument and getURL ===
111
112 ##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).
113
114 Same for ##com.xpn.xwiki.XWiki#getURL(EntityReference)## and ##com.xpn.xwiki.api.XWiki#getURL(EntityReference)##.
115
116 === New helpers in EntityReference ===
117
118 * ##boolean equals(EntityReference otherReference, EntityType to)##: same as equals but only take into account reference parts up to the passed entity type (included)
119 * ##boolean equals(EntityReference otherReference, EntityType from, EntityType to)##: same as equals but only take into account reference parts between passed entity types (included)
120 * ##boolean equalsNonRecursive(EntityReference otherReference)##: same as equals but does not take into account the parent
121
122 === New helpers in LocalDocumentReference ===
123
124 * ##LocalDocumentReference(String pageName, EntityReference spaceReference)##: allowed created a LocalDocumentReference from a space reference instead of just the space name
125
126 === org.xwiki.model.reference.SpaceReferenceResolver ===
127
128 New default ##String## and ##EntityReference## based SpaceReferenceResolver has been added. It's the same behavior then ##DocumentReferenceBehavior## but for spaces.
129
130 {{code language="java"}}
131 @Inject
132 SpaceReferenceResolver<String> stringResolver;
133
134 @Inject
135 SpaceReferenceResolver<EntityReference> referenceResolver;
136 {{/code}}
137
138 === New model Script Service helpers ===
139
140 * new help to escape an entity name according to default reference syntax as in:(((
141 {{code language="velocity"}}
142 $services.model.escape('some.space:with\specialchars', 'SPACE')
143 {{/code}}
144
145 will print
146
147 {{code language="nonde"}}
148 some\.space\:with\\specialchars
149 {{/code}}
150 )))
151
152 == New readonly XWikiContext provider ==
153
154 You can inject a new "readonly" XWikiContext the following way:
155
156 {{code language="java"}}
157 @Inject
158 @Named("readonly")
159 Provider<XWikiContext> roXWikiContextProvider;
160 {{/code}}
161
162 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.
163
164 == Deprecated and Retired projects ==
165
166 <description of deprecated and retired projects>
167
168 == Upgrades ==
169
170 The following dependencies have been upgraded:
171
172 * [[httpclient 4.5>>http://jira.xwiki.org/browse/XCOMMONS-815]]
173 * [[cssparser 0.9.16>>http://jira.xwiki.org/browse/XCOMMONS-817]]
174 * [[less4j 1.12.0>>http://jira.xwiki.org/browse/XWIKI-12161]]
175 * [[Joda-Time 2.8.1>>http://jira.xwiki.org/browse/XWIKI-12159]]
176 * [[Bootstrap 3.3.5>>http://jira.xwiki.org/browse/XWIKI-12211]]
177 * [[Infinispan 7.2.3>>http://jira.xwiki.org/browse/XWIKI-12227]]
178 * [[HSQLDB 2.3.3>>http://jira.xwiki.org/browse/XE-1491]]
179 * [[JGroups 3.6.4>>http://jira.xwiki.org/browse/XWIKI-12215]]
180
181 == Miscellaneous ==
182
183 * 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.
184 * custom Maven properties which have a special meaning (like ##xwiki.extension.features##) are not ##duplicated## in Extension custom properties anymore
185 * standard fields names have been added to ##org.xwiki.extension.rating.RatingExtension##
186
187 = Translations =
188
189 The following translations have been updated:
190
191 {{language codes="none, none"/}}
192
193 = Tested Browsers & Databases =
194
195 {{include reference="TestReports.ManualTestReportTemplateSummary"/}}
196
197 = Performances tests compared to <last super stable version> =
198
199 <a summary of the comparison with latest super stable version>
200
201 More details on <link to the test report>.
202
203 = Known issues =
204
205 * [[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]]
206
207 = Backward Compatibility and Migration Notes =
208
209 == General Notes ==
210
211 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.
212
213 == Issues specific to XWiki 7.2M1 ==
214
215 === Nested spaces ===
216
217 See [[previous Nested spaces section>>||anchor="HNestedSpaces-1"]] for details on what changes in the way some API and the database are dealing with the Document Space.
218
219 === URLs ===
220
221 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[...]##.
222
223 === Templates ===
224
225 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.
226
227 == API Breakages ==
228
229 The following APIs were modified since <project> <version - 1>:
230
231 {{code language="none"}}
232 <clirr output here>
233 {{/code}}

Get Connected