Hi!
Caleb and I have been chatting this afternoon about a solution to pass
the value of a variable to a query string. Thanks Caleb!
Something like this...
##$species is defined simply by...
#set($species = '%babo%')
##and the query string is constructed by using + to concatenate stubs
including the value of that variable...
#set($query = ", BaseObject as obj, StringProperty as prop where
doc.fullName = obj.name and obj.className='Users.PdrUserClass' and
obj.id=prop.id.id and prop.id.name='Species' and prop.value like '" +
$species + "' order by doc.fullName asc")
This works great with com.xpn.xwiki.objects.StringProperty properties,
but not with com.xpn.xwiki.objects.StringProperty ones.
Please, do you know why and what is required to filter by properties of
that type? Thanks!
Ricardo
--
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems
The XWiki development team is pleased to announce the release of XWiki
Enterprise and XWiki Enterprise Manager 2.4.1.
This is a bug fix release for the 2.4 branch.
Important Bugs fixed:
* XWIKI-5511 - In some conditions a newly created wiki does not
have the standard classes
* XWIKI-5492 - Can't move the focus outside of the rich text area in Opera
* XWIKI-5440 - user.isUserInGroup return false if User in Master
and group in virtual
* XWIKI-5452 - "cache.path" configuration is not taken into
account by JBossCache module
* XWIKI-5414 - Keyboard shortcuts are not ignored when trying to
navigate with keys in a select input
* XWIKI-5391 - MediaWikiScanner#docElements() raises unexpected
ParseException when encountering <D_TABLE_CAPTION> tokens
* XWIKI-5515 - NPE when accessing an not existing wiki and autowww = 0
* XWIKI-5363 - PeriodFactory#createSinceMonthsPeriod creates a
"since weeks" period instead
* XWIKI-5476 - Problem with non-px image dimensions in wysiwyg
mode only with IE7
* XWIKI-5457 - Propeditor cannot work anymore with recent livetable code
* XWIKI-5243 - Reflected XSS in edit(wiki|wysiwyg|wysiwygnew).vm
* XWIKI-5450 - SQL injection in suggest.vm
* XWIKI-5428 - Save and Continue doesn't validate the mandatory
document title
* XWIKI-5434 - Saved request parameters are not restored on relogin
* XWIKI-5244 - Stored XSS via user/group name
* XWIKI-5510 - Text and background color don't match the color themev
* XWIKI-5417 - xwiki/2.0 renderer should escape any (% it can find
* XWIKI-5453 - includeMacro() no longer works in XE 2.4
* XASEARCH-10 - Escaping issue in Main.DatabaseSearch
* XAADMINISTRATION-156 - Cannot add "global" user in groups
* XAADMINISTRATION-155 - Improper search icon position in
Administration Application
* XAADMINISTRATION-168 - Small inconsistency in DOM of some
elements that use ConfigurationClass Class
For more information see the Releases notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise241
and http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXEM241
Thanks
-The XWiki dev team
Hi devs,
Currently the image plugin [1] allows us to create image thumbnails by
specifying the image width and/or height in the query string of the
image attachment download URL:
/xwiki/bin/download/Spage/Page/image.jpg?width=100
I propose that we:
(A) Use the image width and/or height (when they are specified in the
image syntax using pixel unit) to resize the image on the server side.
For instance:
[[image:logo.jpg||width="100px"]]
will be linked to
/xwiki/bin/download/Spage/Page/logo.jpg?width=100
and
[[image:logo.jpg||style="height: 50px; width: 70px"]]
will be linked to
/xwiki/bin/download/Spage/Page/logo.jpg?width=70&height=50
The image plugin also accepts a quality parameter that controls the
compression quality when encoding jpeg images. The default value of this
parameter (i.e. when not specified in the URL) is configurable. I
propose we use 0.3 by default, 1 representing the best quality.
(B) Add the ability to limit the image dimensions (preserving aspect
ratio) when the image width and/or height are not specified in the image
syntax (or when they are not using pixel unit). The width and height
limit will be configurable and -1 by default (i.e. no limitation). For
instance:
image:logo.jpg
will be linked to
/xwiki/bin/download/Spage/Page/logo.jpg?width=1024
when width limit is 1024, and to
/xwiki/bin/download/Spage/Page/logo.jpg?width=1024&height=768&keepAspectRatio=true
when width limit is 1024 and height limit is 768. Note that in this case
the image aspect ratio is preserved. The image is resized to best fit
the limits. If the user want to bypass the limit he has to specify the
image width/height in the image syntax.
I'm +1 for both (A) and (B). WDYT?
Thanks,
Marius
[1]
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/…
Hi,
I have started creating the classes for representing forms, form fields and form field validation
constraints. I now have:
FormTextAreaFieldClass
FormSelectFieldClass
FormTextFieldClass
FormFieldConstraintClass
and I plan to add:
FormClass
and
FormGenerator
Since there seem to be a lot of documents associated with this project, I am proposing to make it a
top level application and put the documents in a new space called Forms.
WDYT?
As planned by the XE 2.5 roadmap
(http://enterprise.xwiki.org/xwiki/bin/view/Main/Roadmap) i would like
to move extension manager to the platform. It's one application for
the UI and one jar for the framework (plus several MB of
maven/classloading dependencies).
The rationale is that it makes it easier to try and play with it to
have as much comments as possible.
It would be "taged" as experimental which means anything in it can be
changed anytime and nobody can expect a code that use this component's
API to not be broken.
The current state of Extension Manager is summarized in
http://dev.xwiki.org/xwiki/bin/view/Design/ExtensionManagerProposal#HPlanni…
and detailed in the rest of the document.
I'm pretty confident it's not dangerous for the rest of XE when you
don't use it and it can't slow down it or something.
So WDYT ?
Here is my +1.
Thanks,
--
Thomas Mortagne
Hello there,
I have been asked to develop something on top of the pdf export facilities
on the xwiki. But I run into a small problem:
When *generating a pdf with multiple pages*, say all the pages from one
space, the ids of elements within the pages get duplicated and the *pdf
exportation fails*.
i.e.:
*Page A* with a title *TheQuickBrownFox...* some text under it and then *page
B* with the same title: *TheQuickBrownFox...* with some other text under
this. Both will get an auto ID of *TheQuickBrownFox...
*Now this doesn't happen for items on the same page since the ID generation
mechanism counts all items of the same name and increments it if necessary.
But this mechanism does not contemplate cross page duplicated items.
To avoid the following error:
Property ID "lipsum" (found on "fo:block") previously used; ID values
must be unique within a document! (See position 12:39)
We thought some changes to the ID generation mechanism could be made:
We could* prefix the ID* with the space and page name and this would
be a simple elegant solution.
Now:
Is this the best solution?
Will someone point out the best place to do this?
If I post a patch with this fix will it be included on the trunk?
Thank you in advance,
» Ricardo Espírito Santo
» Linkare TI - Tecnologias de Informação, Lda
Hi devs,
wdyt about committing the section & macro columns from the contrib
(https://svn.xwiki.org/svnroot/xwiki/contrib/projects/xwiki-macro-column/)
in the platform macros, along with a first, very simple implementation
of the dashboard macro (which for the moment only delegates to the
section macro)?
This would be the first step towards the implementation of the
dashboard, and the plan is to be done before 2.5M2.
Here's my +1.
WDYT?
Anca
Hi devs,
I'd like to add a preview link next to office attachments in the
attachments tab (See http://jira.xwiki.org/jira/browse/XAOFFICE-11 ). I
was thinking to create a new velocity template, officepreview.vm, and
use it like this:
$doc.getURL("view",
"xpage=officepreview&attachment=$escapetool.url($attachment.filename)")
Another option is to add a new action (i.e.
/xwiki/bin/officepreview/Space/Page/presentation.ppt ) or reuse an
existing one (i.e. /xwiki/bin/preview/Space/Page/presentation.ppt ).
WDYT?
Thanks,
Marius
Hi devs,
Since this is an important public change, we need to vote on it. This is the vote for the mail thread:
http://markmail.org/message/drm6jq4mosjbryew
First some terminology:
[[label>>target||params]]
The vote is on moving query string and anchor information from the link target to link parameters.
Rules:
* This is for XWiki Syntax 2.1 only
* The target part is there to specify what the link is targeting. QueryString and Anchors do not serve to specify the target. They're just used at render time to control the display. Hence the rationale why they are specified as link params and not as part of the target. Note that for an interwiki link, the interwiki alias is part of the target since it serves to specify the target.
* We name the param "queryString" so that it's clear what it is. We can always change it later on with no backward compat issues if we want something more isolated from URLs but we don't see the need now. The user has to write a valid query string including any URL-encoding required.
* Example: [[label>>doc:docReference||queryString="a=b&c=d" anchor="anchor"]]
Here's my +1
Thanks
-Vincent
Hi devs,
I was playing with the office preview script service when I discovered
that $services throws ScriptServiceNotFoundException when there's no
script service registered for the specified hint, e.g. $services.foo . I
was expecting $services to return null when it fails to locate a
service. I even wrote:
#if($services.officepreview)
{{html}}
$services.officepreview.preview(...)
{{/html}}
#else
{{error}}The office preview component has not been installed.{{/error}}
#end
What do you think it's best: to throw ScriptServiceNotFoundException or
to return null?
Anyway, I think there should be a method to check if a script service is
available (
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-script/src/mai…
).
WDYT?
Thanks,
Marius
Hi devs,
If I write:
{{groovy}}
print
com.xpn.xwiki.web.Utils.getComponent(org.xwiki.model.ModelContext.class).getCurrentEntityReference();
{{/groovy}}
in a wiki page I get:
name = [xwiki], type = [WIKI], parent = [null]
I was expecting to get a reference to the current page (i.e. the page
that executes the groovy script). The javadoc of ModelContext interface
says:
"Allows accessing Model Objects for current objects (current document,
current wiki, current space, etc) placed in the Execution Context."
Looks like DefaultModelContext (
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-model/src/main…
) always returns a WikiReference. What was the rationale behind this?
Thanks,
Marius
Hi devs,
I'm going to continue Asiri's work on integrating officepreview module (
http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-officepreview/
) into the main source tree. Following the discussion at
http://xwiki.475771.n2.nabble.com/Discussion-Integrating-officepreview-modu…
here are the steps that need to be taken:
* Extend DocumentAccessBridge with a method to get the current version
of an attachment in order to drop the dependency on xwiki-core:
String getAttachmentVersion(AttachmentReference attachmentReference)
* Convert OfficePreviewVelocityBridge to a ScriptService:
$services.officepreview.preview($attachmentReference, $filterStyles)
* Move /contrib/sandbox/xwiki-officepreview/ to
/platform/core/xwiki-officepreview
* Publish the office preview wiki macro on code.xwiki.org
* Integrate office preview in the UI (e.g. button/link to preview, next
to download links in the attachments tab)
Let me know if you don't agree with some of these steps. The goal is to
have the office preview module in platform ready to use before the 2.5M2
release.
Thanks,
Marius
Hi,
The discussion started in http://xwiki.markmail.org/thread/hqvmy34jfknb2waa but since it's an important decision I'm making it a full thread here.
The idea is to know how we want to represent query string and anchors in links to documents in XWiki Syntax 2.1.
In 2.0 we were using: [[label>>whatever?queryString#anchor]]
The proposal is to move query string and anchor to a link parameter.
It be done like this:
[[label>>doc:mypage||parameters="a=b&c=d" anchor="..."]]
We could decide to use another syntax for parameters (ie query string) such as:
[[label>>doc:mypage||parameters="a=b,c=d" anchor="..."]]
This would make it a little bit less URL-specific.
The pros of this approach are:
- no need for the user to escape the ? and # characters in document names
- makes the syntax a little bit less "magic" and more formal
The cons:
- Takes a bit longer to write
- A new syntax to learn
WDYT?
Thanks
-Vincent
Hello all.
First of all, I'd like to say that I'm kind new in the XWiki project
and in this mailing list so, I apologize if this is an already
reported issue I'm not aware of (I looked for open issues related to
the customization of the PDF pages when exporting from XWiki but I
found nothing related to what I'm about to share with you):
I'm using XWiki 2.4 and I cannot make the example in
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomiz…
related to the configuration of the field style work. After some
debugging, I found out why: basically, the example states that we
should use a field of type TextArea for the style property of the
PDFClass class. However, when doing so, at runtime, when getting the
value of my "style" field, I don't get what I actually wrote there,
because a new paragraph is inserted around my content, resulting in
something like:
<p>
h2 {
margin-left: 2cm;
margin-bottom: 1cm;
color: red;
}
h3 {
margin: 3cm;
color: yellow;
}
</p>
I thought the problem might be with the editor that was used for
editing the field or something, so I forced using the Text editor but
still had no results. This example only worked when I used a String
property instead of a TextArea (which is a real "pita" right?).
I'd like to know:
1 - Am I doing something wrong?
2 - Is this a known bug and I couldn't find information about it?
3 - If this is really a bug, can I help fixing it or something similar?
Regards,
Paulo Zenida
Hi,
I thought it would be good to summarize the rules I'm implementing/fixing relative to escaping in link references for both XWiki Syntax 2.0 and the new XWiki Syntax 2.1 I have started. This will later go in the XWiki Syntax page on xwiki.org.
There are 2 set of rules:
- For entity references
- For link references
Entity References
==============
The rules are (independent of the XWiki Syntax):
- if you need a \ in any part of the reference then you need to double it with \\
- For a : in a space name it's \:
- For a . in a page name it's \.
- For a @ in an attachment name it's \@
- For a ^ in an object name it's \^
- For a . in an object property name it's \.
Link References
=============
For XWiki Syntax 2.0
----------------------------
The rules are:
- if the link reference points to a document and you want a ?, #, @ or \ in any part of the reference you need to escape them with \?, \#, \@ or \\.
Note that when resolving a link reference to a document the link reference escapes are first unescaped and then the entity reference is unescaped. For ex for: [[label>>my\.page]] will result in a link to a page named "my.page" and [[label>>my\?page]] to "my?page".
- if link reference points to a mailto then no escaping is performed at all. Thus [[label>>mailto:john\@whatever.org]] will generate in HTML <a href="mailto:john\@whatever.org">john\(a)whatever.org</a>
- same for link refs to URLs
- For link to attachments, only the entity reference escape is performed, no additional escape is done for the link reference.
- For link to interwiki, if the interwiki path needs a @ then it must be escaped with \@. Same for the interwiki alias. Example: [[label>>what\@ever@wiki\@pedia]]
For XWiki Syntax 2.1
----------------------------
The rules are:
- if the link reference points to a document and you want a ?, # or \ in any part of the reference you need to escape them with \?, \#, or \\.
- if link reference points to a mailto then no escaping is performed at all.
- same for link refs to URLs
- For link to attachments, only the entity reference escape is performed, no additional escape is done for the link reference.
- For link to interwiki, no escaping is performed at all (and ":" is not allowed in the interwiki alias). Example: [[label>>interwiki:wikipedia:what\\ever]] will generate an interwiki path of what\\ever
Open Questions
=============
Do we want to allow \\ in any link references (mailto, attach, interwiki, url, etc) and unescape it to \ or should we keep the rules defined above?
Thanks
-Vincent
Hi devs,
knowing that gadgets will be xwiki macros instances (in any of the
approaches) we need a way to add all these in a dashboard. Proposed
options are at
http://dev.xwiki.org/xwiki/bin/view/Design/GadgetIntegration#HDashboardMacr…
. Currently implemented solution is 1/ which has a few drawbacks: it
defines a meta syntax for its content and this syntax doesn't allow more
complex layouts than a number of columns.
The new proposal is 4)
http://dev.xwiki.org/xwiki/bin/view/Design/GadgetIntegration#HOption429Colu…
, which basically proposes to use nested column macros (
http://svn.xwiki.org/svnroot/xwiki/contrib/projects/xwiki-macro-column/
) to do layouting and extend the section macro with a dashboard macro
which would be used on the first level to mark that the columned content
is a dashboard and not just regular wiki content. For more details about
the approach see the description in the design page, as well as for the
advantages of this proposal.
my +1, I like this approach, I will try to prove the concept in the next
days.
WDYT?
Thanks,
Anca