Version 49.10 by Eduard Moraru on 2015/07/16

Hide last authors
Thomas Mortagne 1.1 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
Eduard Moraru 49.8 11 [[Full list of issues fixed and Dashboard for 7.2>>http://jira.xwiki.org/secure/Dashboard.jspa?selectPageId=13390]].
Thomas Mortagne 1.1 12
Vincent Massol 38.1 13 == Nested Documents ==
Thomas Mortagne 1.1 14
Vincent Massol 38.1 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).
Thomas Mortagne 1.1 16
Vincent Massol 38.1 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:
Thomas Mortagne 40.1 20
Vincent Massol 38.1 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:
Vincent Massol 38.2 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).
Vincent Massol 38.1 24 ** TODO: Add more supported use cases here
25
Thomas Mortagne 1.1 26 == Miscellaneous ==
27
Eduard Moraru 49.6 28 * The list of available template providers is now sorted by document full name.
Thomas Mortagne 1.1 29
Eduard Moraru 49.8 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+%227.2-milestone-1%22&tempMax=1000]] fixed in this release.
Thomas Mortagne 1.1 31
32 = For Developers =
33
Vincent Massol 31.1 34 == Nested Spaces ==
Thomas Mortagne 15.1 35
Vincent Massol 31.1 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.
Thomas Mortagne 15.1 37
Vincent Massol 47.2 38 === Space Reference instead of Space name ===
Thomas Mortagne 15.1 39
Vincent Massol 47.2 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:
Thomas Mortagne 15.1 41
Vincent Massol 31.1 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}}}##.
Vincent Massol 47.2 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:
Thomas Mortagne 30.1 45 ** ##XWiki#getSpaceDocsName## methods (both in the public and private XWiki API)
Vincent Massol 47.2 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:(((
Vincent Massol 31.1 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.
Vincent Massol 31.2 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]]).
Thomas Mortagne 15.1 71
Guillaume Delhumeau 16.1 72 === Space separator properly taken into account ===
Thomas Mortagne 15.1 73
Vincent Massol 47.2 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.
Thomas Mortagne 15.1 75
Thomas Mortagne 26.1 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
Vincent Massol 47.2 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.
Thomas Mortagne 26.1 84
Guillaume Delhumeau 43.1 85 === REST module ===
Thomas Mortagne 44.1 86
Vincent Massol 48.1 87 * 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##.
Guillaume Delhumeau 43.1 88
Vincent Massol 48.1 89 === URL modules ===
90
91 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]].
92
Vincent Massol 47.2 93 == New Reference-related APIs ==
Thomas Mortagne 1.1 94
Vincent Massol 47.2 95 Various new API around References has been introduced while adding support for nested spaces.
Thomas Mortagne 1.1 96
Vincent Massol 47.2 97 === Complete References Providers ===
Thomas Mortagne 9.1 98
Vincent Massol 47.2 99 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)
Thomas Mortagne 9.1 100
Thomas Mortagne 6.1 101 {{code language="java"}}
102 @Inject
103 Provider<DocumentReference> defaultDocumentReference;
Thomas Mortagne 4.1 104
Thomas Mortagne 6.1 105 @Inject
106 @Named("current")
107 Provider<DocumentReference> currentDocumentReference;
108 {{/code}}
Thomas Mortagne 9.1 109
110 === org.xwiki.model.reference.EntityReferenceProvider ===
111
112 ##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.
113
Thomas Mortagne 6.1 114 {{code language="java"}}
115 @Inject
116 EntityReferenceProvider provider;
117 {{/code}}
118
Vincent Massol 47.2 119 === Properly support any kind of References in getDocument and getURL ===
Thomas Mortagne 9.1 120
Vincent Massol 47.2 121 ##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).
Thomas Mortagne 9.1 122
Guillaume Delhumeau 35.1 123 Same for ##com.xpn.xwiki.XWiki#getURL(EntityReference)## and ##com.xpn.xwiki.api.XWiki#getURL(EntityReference)##.
124
Thomas Mortagne 9.1 125 === New helpers in EntityReference ===
126
Vincent Massol 47.2 127 * ##boolean equals(EntityReference otherReference, EntityType to)##: same as equals but only take into account Reference parts up to the passed entity type (included)
128 * ##boolean equals(EntityReference otherReference, EntityType from, EntityType to)##: same as equals but only take into account Reference parts between passed entity types (included)
Thomas Mortagne 9.1 129 * ##boolean equalsNonRecursive(EntityReference otherReference)##: same as equals but does not take into account the parent
130
Thomas Mortagne 27.1 131 === New helpers in LocalDocumentReference ===
132
Vincent Massol 47.2 133 * ##LocalDocumentReference(String pageName, EntityReference spaceReference)##: allowed created a LocalDocumentReference from a Space Reference instead of just the space name
Thomas Mortagne 27.1 134
Thomas Mortagne 34.1 135 === org.xwiki.model.reference.SpaceReferenceResolver ===
136
137 New default ##String## and ##EntityReference## based SpaceReferenceResolver has been added. It's the same behavior then ##DocumentReferenceBehavior## but for spaces.
138
139 {{code language="java"}}
140 @Inject
141 SpaceReferenceResolver<String> stringResolver;
142
143 @Inject
144 SpaceReferenceResolver<EntityReference> referenceResolver;
145 {{/code}}
146
Thomas Mortagne 23.1 147 === New model Script Service helpers ===
Thomas Mortagne 22.1 148
Vincent Massol 47.2 149 * new help to escape an entity name according to default Reference syntax as in:(((
Thomas Mortagne 22.1 150 {{code language="velocity"}}
Thomas Mortagne 23.1 151 $services.model.escape('some.space:with\specialchars', 'SPACE')
Thomas Mortagne 22.1 152 {{/code}}
153
154 will print
155
156 {{code language="nonde"}}
157 some\.space\:with\\specialchars
158 {{/code}}
159 )))
160
Guillaume Delhumeau 41.1 161 === New components to generate REST URLs ===
162
163 * 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##.
164 * The corresponding script service has been added: ##$services.rest## with the method ##$services.rest.url($entityReference)##.
165
Thomas Mortagne 4.1 166 == New readonly XWikiContext provider ==
167
168 You can inject a new "readonly" XWikiContext the following way:
169
170 {{code language="java"}}
171 @Inject
172 @Named("readonly")
Guillaume Delhumeau 25.1 173 Provider<XWikiContext> roXWikiContextProvider;
Thomas Mortagne 4.1 174 {{/code}}
175
Vincent Massol 11.2 176 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.
Thomas Mortagne 4.1 177
Thomas Mortagne 1.1 178 == Upgrades ==
179
180 The following dependencies have been upgraded:
181
182 * [[httpclient 4.5>>http://jira.xwiki.org/browse/XCOMMONS-815]]
Thomas Mortagne 2.1 183 * [[cssparser 0.9.16>>http://jira.xwiki.org/browse/XCOMMONS-817]]
Guillaume Delhumeau 3.1 184 * [[less4j 1.12.0>>http://jira.xwiki.org/browse/XWIKI-12161]]
Thomas Mortagne 8.1 185 * [[Joda-Time 2.8.1>>http://jira.xwiki.org/browse/XWIKI-12159]]
Guillaume Delhumeau 16.1 186 * [[Bootstrap 3.3.5>>http://jira.xwiki.org/browse/XWIKI-12211]]
Thomas Mortagne 24.1 187 * [[Infinispan 7.2.3>>http://jira.xwiki.org/browse/XWIKI-12227]]
Thomas Mortagne 36.1 188 * [[HSQLDB 2.3.3>>http://jira.xwiki.org/browse/XE-1491]]
Thomas Mortagne 37.1 189 * [[JGroups 3.6.4>>http://jira.xwiki.org/browse/XWIKI-12215]]
Thomas Mortagne 40.1 190 * [[Jackson 2.5.4>>http://jira.xwiki.org/browse/XCOMMONS-828]]
Thomas Mortagne 1.1 191
192 == Miscellaneous ==
193
Eduard Moraru 25.2 194 * 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.
Thomas Mortagne 32.1 195 * custom Maven properties which have a special meaning (like ##xwiki.extension.features##) are not ##duplicated## in Extension custom properties anymore
Thomas Mortagne 33.1 196 * standard fields names have been added to ##org.xwiki.extension.rating.RatingExtension##
Thomas Mortagne 44.1 197 * 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
Vincent Massol 47.1 198 * 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).
Vincent Massol 46.2 199 * 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.
Eduard Moraru 49.3 200 * A new DocumentModelBridge.getContentAuthorReference() method has been added to allow accessing the content author of a document without depending on oldcore.
Eduard Moraru 49.5 201 * 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]].
Thomas Mortagne 1.1 202
203 = Translations =
204
205 The following translations have been updated:
206
Eduard Moraru 49.7 207 {{language codes="fr, sv, pt_BR"/}}
Thomas Mortagne 1.1 208
Eduard Moraru 49.9 209 {{comment}}
Thomas Mortagne 1.1 210 = Tested Browsers & Databases =
211
212 {{include reference="TestReports.ManualTestReportTemplateSummary"/}}
213
214 = Performances tests compared to <last super stable version> =
215
216 <a summary of the comparison with latest super stable version>
217
218 More details on <link to the test report>.
Eduard Moraru 49.9 219 {{/comment}}
Thomas Mortagne 1.1 220
221 = Known issues =
222
223 * [[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]]
224
225 = Backward Compatibility and Migration Notes =
226
227 == General Notes ==
228
229 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.
230
Thomas Mortagne 11.1 231 == Issues specific to XWiki 7.2M1 ==
Thomas Mortagne 1.1 232
Thomas Mortagne 15.1 233 === Nested spaces ===
Thomas Mortagne 12.1 234
Thomas Mortagne 45.1 235 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.
Thomas Mortagne 12.1 236
Vincent Massol 49.2 237 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":
Eduard Moraru 49.3 238
Vincent Massol 49.1 239 * before 7.2M1: the Extension would create/display a Space named "my.space"
240 * after 7.2M1: the Extension will create/display a Space named "my\.space"
241
Vincent Massol 39.1 242 === URLs ===
243
244 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[...]##.
245
Guillaume Delhumeau 14.1 246 === Templates ===
247
248 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.
249
Thomas Mortagne 1.1 250 == API Breakages ==
251
Eduard Moraru 49.9 252 The following APIs were modified since XWiki 7.1.1:
Thomas Mortagne 1.1 253
Eduard Moraru 49.10 254 * AbstractWrappingObject, AbstractSafeObject and ScriptSafeProvider have been moved to xwiki-commons-script(((
Thomas Mortagne 1.1 255 {{code language="none"}}
Eduard Moraru 49.10 256 org.xwiki.extension.wrap.WrappingIterableResult: Removed org.xwiki.extension.internal.safe.AbstractSafeObject from the list of superclasses
257 org.xwiki.extension.wrap.WrappingIterableResult: Removed org.xwiki.extension.wrap.AbstractWrappingObject from the list of superclasses
258 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
259
260 org.xwiki.filter.script.AbstractFilterScriptService: Changed type of field scriptProvider from org.xwiki.extension.internal.safe.ScriptSafeProvider to org.xwiki.script.internal.safe.ScriptSafeProvider
261 org.xwiki.extension.script.AbstractExtensionScriptService: Changed type of field scriptProvider from org.xwiki.extension.internal.safe.ScriptSafeProvider to org.xwiki.script.internal.safe.ScriptSafeProvider
262 {{/code}})))
263
264 * Added missing methods to the DocumentModelBridge which are already implemented by XWikiDocument.(((
265 {{code language="none"}}
266 org.xwiki.bridge.DocumentModelBridge: Method 'public org.xwiki.model.reference.DocumentReference getContentAuthorReference()' has been added to an interface
267 {{/code}})))
268
269 * com.xpn.xwiki.XWiki#localStringEntityReferenceSerializer now exists in oldcore, we do not need it in the aspect anymore.(((
270 {{code language="none"}}
271 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
272 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
273 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
274 {{/code}})))
275
276 * Young API. ExportURLFactoryContext been renamed to FilesystemExportContext and moved to the Filesystem URL scheme module.(((
277 {{code language="none"}}
278 com.xpn.xwiki.web.ExportURLFactory: Method 'public com.xpn.xwiki.web.ExportURLFactoryContext getExportURLFactoryContext()' has been removed
279 com.xpn.xwiki.web.ExportURLFactoryActionHandler: Parameter 7 of 'public java.net.URL createURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.xpn.xwiki.XWikiContext, com.xpn.xwiki.web.ExportURLFactoryContext)' has changed its type to org.xwiki.url.filesystem.FilesystemExportContext
280 com.xpn.xwiki.web.ExportURLFactory: class removed
281 {{/code}})))
282
283 * This API has been changed to support nested spaces.(((
284 {{code language="none"}}
285 org.xwiki.rest.resources.spaces.SpaceResource: Method argument count changed for method 'org.xwiki.rest.model.jaxb.Space getSpace(java.lang.String, java.lang.String)'
286 {{/code}})))

Get Connected