Last modified by Vincent Massol on 2010/12/13

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
5 Second milestone of the XWiki Enterprise 2.5 version ([[Roadmap>>enterprise:Main.Roadmap]]).
7 The highlights of this release are: support for [[viewing attached office documents>>extensions:Extension.Office Macro]] in the wiki, an experimental Extension Manager, experimental [[CSRF>>]] protection, a new User Directory, further improvements to the edit UI, more consistent [[use of user avatars>>]], support for activating a special accessibility stylesheet, and an experimental ##xwiki/2.1## wiki syntax.
9 = New and Noteworthy (since XWiki Enterprise 2.4) =
11 == Support for viewing attached office documents in the wiki ==
13 XWiki now supports viewing attached office documents without saving them on the client side.
15 image:OfficePreview.png
17 We also included a new Macro for the WYSIWYG Editor. It allows to embed a office file into a page.
19 [[image:MacroOfficeViewer||style="border:1px solid black;"]]
21 == Experimental Extension Manager ==
23 The new Extension Manager will allow you to install new extensions to your XWiki XE. Please note that this is an experimental feature. Use it at your own risk.
25 [[image:ExtensionManager.png||style="border:1px solid black;"]]
27 == New User Directory ==
29 Added User Directory section on the Quick Links tab on the left of the page. This will show you the users that the XWiki instance has, along with their avatar image. This page also allows to filter users by username.
30 image:userdir.png
32 == Further improvements to the edit UI ==
34 After the improvements to the object and class editors introduced in 1.8 and 2.4, the wiki and WYSIWYG editors also see some enhancements in this release, bringing in some of the proposed changes from [[an older proposal>>]], with some additional improvements. Specifically:
36 * A new label for the content area in the wiki editor:(((
37 image:edit-header.png
38 )))
39 * A more descriptive label for the version summary field
40 * Better positioning of the "minor edit" option
41 * Better positioning and display of the "autosave" option(((
42 image:edit-footer.png
43 )))
45 == More consistent use of user avatars ==
47 As proposed on [[the design page>>]], avatars come in three default sizes:
49 * small avatars, 30px wide, used in secondary actions and where there's very little space available
50 * medium avatars, 50px wide, the preferred and most frequent display option for avatars
51 * large avatars,120px wide, to be used where a large version of the avatar must be displayed (for example in the user profile)
53 Accordingly, the wiki dashboard has been changed to use the medium avatars, and as a new feature user avatars are displayed in the comments area.
55 image:comment-avatars.png
57 Four new velocity macros have been added for making it easier to display avatars:
59 * ###smallUserAvatar('XWiki.username')##
60 * ###mediumUserAvatar('XWiki.username')##
61 * ###largeUserAvatar('XWiki.username')##
62 * ###resizedUserAvatar('XWiki.username', 100)## which allows resizing an avatar to a custom size
64 == More image manipulation settings ==
66 For a long time it was possible to scale attached images on the server, thus reducing the download time and ensuring consistent scaling of images across browsers. This is achieved by appending ##width## and/or ##height## query string parameters to the URL of the image. This feature has been further enhanced:
68 * It is now possible to force the same aspect ratio of the original picture even when both width/height parameters were used (the ##keepAspectRatio## parameter). In case the requested width and height don't match the original aspect ratio, the image is resized to fit inside the rectangle defined by the two parameters, i.e. the resized image will not exceed the requested dimensions.
69 * The size of the generated JPGs can be further tweaked by specifying an encoding ##quality## (the configurable default is at 30%, but will be changed to 50% before the final release). This does not affect lossless image formats such as PNG.
70 * The WYSIWYG editor also supports the width and height parameters, setting them as needed when manually resizing the image in the editor.
72 {{code language="none"}}
73 /xwiki/bin/download/Spage/Page/logo.jpg?width=1024&height=768&keepAspectRatio=true&quality=0.8
74 {{/code}}
76 Note that this does not affect images from the filesystem, which are served directly by the servlet conainer and do not pass through XWiki's image handling code. Also note that in case the image processing triggers any errors, the original image will be sent unchanged, so the requested image dimensions are not guaranteed.
78 Example:
80 {{code language="html"}}
81 {{velocity}}{{html wiki=false}}
82 <img src="$doc.getAttachmentURL('mw.jpg', 'download', 'width=150&quality=1')"/>
83 <img src="$doc.getAttachmentURL('mw.jpg', 'download', 'width=150')"/>
84 <img src="$doc.getAttachmentURL('mw.jpg', 'download', 'width=150&quality=0')"/>
85 <img src="$doc.getAttachmentURL('mw.jpg', 'download', 'width=150&height=100&quality=0.7')"/>
86 <img src="$doc.getAttachmentURL('mw.jpg', 'download', 'width=150&height=100&quality=0.7&keepAspectRatio=true')"/>
87 {{/html}}{{/velocity}}
88 {{/code}}
90 Gives:
92 image:img.png
94 == Better handling of attachment versions when rolling back documents ==
96 Rolling back a document will also roll back the correct attachment version, including restoring a deleted attachment from the trash (if not manually deleted from there). Even if an attachment was deleted and re-uploaded several times, the platform will try to find the right version for the attachment, if it still exists in the attachment trash. As an improvement, if the attachment did not change, then a new version is not created.
98 == Preliminary optional accessibility stylesheet ==
100 Moving further on the quest for better accessibility in the XWiki platform, we introduced a preliminary stylesheet which makes the skin slightly more accessible to people with visual disabilities: bigger fonts by default, and underlined links to make them more easily distinguished by colorblind people. This stylesheet can either be activated globally in a wiki, or individually from each user's preferences.
102 Enabling the special stylesheet:
104 image:a11y-enable.png
106 Bigger fonts and underlined links:
108 image:a11y.png
110 == Experimental xwiki/2.1 wiki syntax ==
112 The xwiki wiki syntax sees further improvements as xwiki/2.1, still in an experimental stage. A new feature is an enhanced syntax for links, which is more generic and allows easier extensions with new link types, demonstrated in this release with support for path and [[interwiki links>>]].
114 Basic syntax:
116 {{code language="none"}}
117 [[label>>referenceType:referenceData]]
118 {{/code}}
120 Special ##queryString## and ##anchor## parameters which will be used as the query string, respectively anchor when forming URLs.
122 {{code language="none"}}
123 [[label>>doc:My.Page||queryString="a=b&c=d" anchor="HSection1"]]
124 {{/code}}
126 Document references are still the implicit default, with the explicit ##doc:## reference type. The other standard reference types are ##url##, ##path##, ##mailto##, ##attach##, ##image##, ##interwiki##.
128 Path links allow to link to a relative path on the server, which makes it easier to combine wiki syntax and velocity code, using ##$doc.getURL##, in order to link to non-view actions on documents.
130 {{code language="none"}}
131 {{velocity}}[[reset the history>>path:$doc.getURL('reset')||queryString="confirm=1"]]{{/velocity}}
132 {{/code}}
134 === [[Interwiki links>>]] ===
136 Basic syntax:
138 {{code language="none"}}
139 [[label>>interwiki:wikiAlias:path/data]]
140 [[Interwiki links>>interwiki:wikipedia:Interwiki_links]]
141 {{/code}}
143 By default no sister wikis are defined. You can define some in by adding ##rendering.interWikiDefinitions## values:
145 {{code language="none"}}
146 rendering.interWikiDefinitions = wikipedia =
147 rendering.interWikiDefinitions = udic =
148 {{/code}}
150 == Various Security improvements ==
152 Continuing a push for better security started this summer, 2.5M2 fixes some of the few remaining cross-site scripting and SQL injections holes, and tightens the scope of programming rights. Of particular concern:
154 * With a default skin, programming rights are no longer available after the main content of the page; this means that the panels and the bottom tabs can't use restricted APIs anymore.
155 * To explicitly drop programming rights, a new API method was introduced: ##$xcontext.dropPermissions()##
156 * An experimental Cross-Site Request Forgery prevention mechanism is included, though not enabled by default. To enable it and test/upgrade your custom applications for compatibility, edit and flip on the ##core.csrf.enabled## setting.
158 = Backward Compatibility and Migration Notes =
160 == General Notes ==
162 {{warning}}
163 If you're running in a multiwiki setup you'll also need to define the property // to your //xwiki.cfg// file or explicitly name all databases to be migrated as in //,db2,...//.
164 {{/warning}}
166 You may also want to [[import the default wiki XAR>>Main.Download]] in order to benefit from the improvements listed above.
168 {{warning}}
169 Always make sure you compare your //xwiki.cfg// file with the newest version since some configuration parameters were added. Note you should add // so that XWiki will attempt to automatically migrate your current database to the new schema. Make sure you backup your Database before doing anything.
170 {{/warning}}
172 {{warning}}
173 Experimental support for CSRF protection is included in this release, although not enabled by default. This mechanism changes the way data is supposed to be saved, a change which will not completely break custom applications in most cases, but which might insert an extra validation step needed for actually saving the data.
174 {{/warning}}
176 It is **strongly recommended** to set up a testing/development environment, enable this feature and fully test all the code. In most cases things should work with no additional changes. If the default edit mode is not used, or if the default velocity templates are not used, it should be enough to add the following line:
178 {{code language="html"}}
179 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" />
180 {{/code}}
182 == API Breakages ==
184 The following APIs were modified since XWiki Enterprise 2.4:
186 {{code language="none"}}
187 [ERROR] org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro: Method 'protected boolean canExecuteScript()' has been removed
188 [ERROR] org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro: Method 'public java.util.List execute(org.xwiki.rendering.macro.script.JSR223ScriptMacroParameters, java.lang.String, org.xwiki.rendering.transformation.MacroTransformationContext)' has been removed
189 [ERROR] org.xwiki.rendering.macro.script.AbstractScriptMacro: Method 'protected boolean canHaveJarsParameters()' has been removed
190 [ERROR] org.xwiki.rendering.macro.script.AbstractScriptMacro: Method 'protected java.lang.ClassLoader getClassLoader(java.lang.String, java.lang.ClassLoader)' has been removed
191 [ERROR] org.xwiki.rendering.block.PlainTextBlockFilter: Parameter 2 of 'public PlainTextBlockFilter(org.xwiki.rendering.parser.Parser, org.xwiki.rendering.renderer.LinkLabelGenerator)' has changed its type to
192 [ERROR] org.xwiki.rendering.configuration.RenderingConfiguration: Method 'public java.util.Properties getInterWikiDefinitions()' has been added to an interface
193 [ERROR] org.xwiki.rendering.listener.Link: Method 'public java.lang.String getAnchor()' has been removed
194 [ERROR] org.xwiki.rendering.listener.Link: Method 'public java.lang.String getInterWikiAlias()' has been removed
195 [ERROR] org.xwiki.rendering.listener.Link: Method 'public java.lang.String getQueryString()' has been removed
196 [ERROR] org.xwiki.rendering.listener.Link: Method 'public boolean isExternalLink()' has been removed
197 [ERROR] org.xwiki.rendering.listener.Link: Method 'public void setAnchor(java.lang.String)' has been removed
198 [ERROR] org.xwiki.rendering.listener.Link: Method 'public void setInterWikiAlias(java.lang.String)' has been removed
199 [ERROR] org.xwiki.rendering.listener.Link: Method 'public void setQueryString(java.lang.String)' has been removed
200 [ERROR] org.xwiki.rendering.listener.LinkType: Removed from the set of implemented interfaces
201 [ERROR] org.xwiki.rendering.listener.LinkType: Removed java.lang.Comparable from the set of implemented interfaces
202 [ERROR] org.xwiki.rendering.listener.LinkType: Removed java.lang.Enum from the list of superclasses
203 [ERROR] org.xwiki.rendering.listener.LinkType: Removed field URI
204 [ERROR] org.xwiki.rendering.listener.LinkType: Method 'public org.xwiki.rendering.listener.LinkType valueOf(java.lang.String)' has been removed
205 [ERROR] org.xwiki.rendering.listener.LinkType: Method 'public org.xwiki.rendering.listener.LinkType[] values()' has been removed
206 [ERROR] org.xwiki.rendering.parser.LinkParser: Field SEPARATOR_INTERWIKI has been removed, but it was previously a constant
207 [ERROR] org.xwiki.rendering.renderer.LinkLabelGenerator: Class org.xwiki.rendering.renderer.LinkLabelGenerator removed
208 [ERROR] org.xwiki.rendering.renderer.LinkReferenceSerializer: Class org.xwiki.rendering.renderer.LinkReferenceSerializer removed
209 [ERROR] org.xwiki.rendering.renderer.URILabelGenerator: Class org.xwiki.rendering.renderer.URILabelGenerator removed
210 [ERROR] org.xwiki.rendering.renderer.XWikiSyntaxListenerChain: Class org.xwiki.rendering.renderer.XWikiSyntaxListenerChain removed
211 [ERROR] org.xwiki.rendering.renderer.xhtml.XHTMLImageRenderer: Class org.xwiki.rendering.renderer.xhtml.XHTMLImageRenderer removed
212 [ERROR] org.xwiki.rendering.renderer.xhtml.XHTMLLinkRenderer: Class org.xwiki.rendering.renderer.xhtml.XHTMLLinkRenderer removed
213 [ERROR] Method 'public java.lang.String getImageURL(java.lang.String, java.lang.String, java.util.Map)' has been added to an interface
214 [ERROR] org.xwiki.bridge.DocumentAccessBridge: Method 'public java.lang.String getAttachmentVersion(org.xwiki.model.reference.AttachmentReference)' has been added to an interface
215 [ERROR] org.xwiki.bridge.DocumentAccessBridge: Method 'public java.lang.String getDocumentURL(org.xwiki.model.reference.DocumentReference, java.lang.String, java.lang.String, java.lang.String, boolean)' has been added to an interface
216 [ERROR] org.xwiki.annotation.renderer.AbstractAnnotationRenderer: Return type of method 'public org.xwiki.rendering.renderer.LinkLabelGenerator getLinkLabelGenerator()' has been changed to
217 [ERROR] org.xwiki.annotation.renderer.LinkLabelGeneratorChainingListener: Changed type of field linkLabelGenerator from org.xwiki.rendering.renderer.LinkLabelGenerator to
218 [ERROR] org.xwiki.annotation.renderer.LinkLabelGeneratorChainingListener: Parameter 1 of 'public LinkLabelGeneratorChainingListener(org.xwiki.rendering.renderer.LinkLabelGenerator, org.xwiki.rendering.parser.StreamParser, org.xwiki.rendering.listener.chaining.ListenerChain)' has changed its type to
219 {{/code}}

Get Connected