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

Get Connected