Hi,
Im trying to fix http://jira.xwiki.org/jira/browse/XWIKI-4274
Basically if you do $xwiki.getDocument("someDoc").getRenderedContent()
it'll get executed in the context of the current doc which I believe
is wrong especially since other signatures of getRenderedContent()
execute in the target document's context.
I have fixed this locally but found that admin.vm for example is
assuming that getRenderedContent() will get executed in the context of
the calling doc (i.e. XWiki.Import when doing an import for example).
FYI the chain flow is admin.vm -- getRenderedContent() -->
XWiki.AdminSheet --> XWiki.AdminImportSheet --> importinline.vm, which
requires the current doc to be XWiki.Import (to get/put attachments
from/to it).
I can fix this easily using a new getRenderedContent signature I've
introduced.
However I'm wondering if we have other places that incorrectly use
getRenderedContent() and assume it won't be rendered in the context of
the target document.
Is this change too dangerous to make? If not know, we'll need to it
quickly (2.1M1?) since it's an important bug IMO.
WDYT?
Thanks
-Vincent
Could be useful:
http://ocpsoft.com/prettytime/
Idea of usage: For ex we could use that to show the last modified
document dates for dates in the past week (for ex):
"Document created 2 days ago"
It's in the maven central repo and it's under LGPL
-Vincent
Hi Everyone!
I have read this document "Writing GWT applications in XWiki" (
http://dev.xwiki.org/xwiki/bin/view/Drafts/WritingGWTApplicationsInXWiki)
And I know how to develop GWT module for xwiki now. I also have read the
document "WYSIWYG Editor Module" (
http://code.xwiki.org/xwiki/bin/view/Modules/WysiwygEditorModule). I
followed the instruction which tried to integrate the WYSIWYG editor(GWT
application) in wiki pages, and I put the following code in my wiki editor:
"{{html}}
<script type="text/javascript" src="XWikiWysiwyg.js"> alert('WYSIWYG code is
loaded!'); </script> <textarea id="demo"></textarea> <script
type="text/javascript"> Wysiwyg.onModuleLoad(function() { new
WysiwygEditor({hookId:'demo'}); alert('WYSIWYG code is loaded!'); });
Wysiwyg.onModuleLoad(function() { editor = new WysiwygEditor({hookId:
'demo'}); }); }); </script> {{/html}}"
After saved, it only display a blank text area without any sign of WYSIWYG
editor, also there is no alart 'WYSIWYG code is loaded!' popup. Can you help
me figure it out what is wrong with it?
I am planing to develop a tree view using GWT to display Design Rationale
Element. Could you give me some ideas of after my development, how can I
embeded the GWT application into Xwiki pages and interact with the GWT
application?
Thank you very much!
Leon
Hi devs,
We've been working on improving the editors (content, class, object),
and now I have some pretty important UI changes to commit, but not
everybody seems to agree with them, so I bring up a vote.
The whole improvements can be seen on
http://incubator.myxwiki.org/xwiki/bin/Improvements/ImprovedEdit
Here are the individual voted points:
0 Remove all panels in edit mode
1a Parent and title above the content in wiki/wysiwyg mode
1b The same style in edit mode as in view mode for the parent/title fields
1c AJAX Suggest for the parent field
2a New label for the content textarea ("Content")
2b List of included documents after the Content label
3a Syntax switcher in the top right corner of the content
3b Syntax help in the top right corner of the content
3c Syntax help and switcher only in the wiki editor
4 Better label for the version comment
5a Right float the Minor edit field
5b Put the Minor edit label after the checkbox
6 Move autosave in line with the submit buttons
7 Introduce new AJAX-powered Add Object
i) above the objects
ii) bellow the objects
8 Introduce new AJAX-powered Add Object from this class
i) at the top of the list of existing objects
ii) at the end of the list
9 Move the class switcher in the top right corner
9b Remove the class switcher
10 Introduce new AJAX-powered Add Property
i) at the top of the list of properties
ii) at the end of the list
I vote +1 for all of the above, except 9b (-0), and with options 7i),
8ii), and 10ii)
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi,
Our goal is to develop a wysisyg macro allowing to :
- Insert an Image stored on Alfresco
- Insert a link to a document stored on Alfresco
To do this; we have develop a small browser on Alfresco in order to choose
the image to insert (img src) or the file to link (a href).
After selecting the Alfresco file; we need to generate a macro like :
[[Lien vers le doc
toto>>http://alfresco.airfrance.fr/alfresco/.../toto.doc||rel="__blank"
title="Ouvrir le doc toto..."]]
or
[[image:http://alfresco.airfrance.fr/alfresco/..../image.jpg]]
Using the wiki editor and the old Wysiwyg editor; we had no problem to do
this. (Openning popup and populate les link field with alfresco file path.)
With the new editor; I can't find the way to do this.
In fact my problem could be resume to add a picto in the 'link' and 'image'
macro GUI allowing to open my alfresco browser in order to populate the path
!
Any idea to do this ?
Thanks,
Julien
--
View this message in context: http://xwiki.475771.n2.nabble.com/Wysiwyg-editor-and-macro-accessing-to-Alf…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hello devs,
I'd like to add a new test framework aimed on catching XML escaping bugs
that we currently have almost everywhere. Escaping bugs cause broken,
unusable pages when special characters are used in
space/page/category/user/whatever names and often present serious
security issues. This test framework will run automatic tests and also
allow for writing manual tests.
Currently, escaping tests are usually written using selenium2, see e.g.:
http://svn.xwiki.org/svnroot/xwiki/enterprise/trunk/distribution-test/ui-te…
This is a bad solution, slow and tricky to write.
Writing unit tests for such bugs is also not a good solution, because
most of the time they originate in velocity templates. It is hard to
test a single template in isolation, they usually require access to many
API functions.
The solution I propose works similar to webstandards tests. The
framework searches for all templates and documents in XWiki Enterprise
*.xar and *.war and generates automatic escaping tests for each of them.
Each test then requests URLs from XWiki server with different
parameters and runs a custom validator that searches for not escaped
data in the response. Manual tests can also be added easily.
The implementation can be found in the sandbox:
https://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-enterprise-test-e…
It currently implements some simple automated escaping tests on all
templates and applications from the XAR. The parameters to use are
chosen based on the source, using matching with regular expressions
(searches for things like $request.get("something")).
Full test run takes 8 minutes on my laptop. Current results: Tests run:
499, Failures: 166, Errors: 3, Skipped: 0 (there are still some false
positives that I need to track down though).
Files and test classes can be excluded from the tests using various
properties set in maven (see pom.xml). Usual -Dtest and -Dpattern are
also supported, e.g. to test all pages from "Blog" space, run:
mvn -Dtest=ApplicationTest -Dpattern='^Blog/' install
Some implementation details:
org.xwiki.escaping.suite
It is a custom JUnit4 test suite. It reads given zip file, then creates
and initializes instances of the test class for each found file. The
test class must implement FileTest (defines initialize()) and annotated
with @RunWith(ArchiveSuite.class). Test classes can decide based on
file name and content whether they can test the given file or not.
ApplicationTest and TemplateTest use this suite.
org.xwiki.escaping.framework
Contains base classes for the escaping tests (implement downloading data
from server, regex-based "parsing" etc.), escaping validator etc.
org.xwiki.escaping
Contains the tests (2 automatic and 1 manual).
Instances of the test classes (built by ArchiveSuite or manual ones) a
run using the default JUnit4 test runner, so all fancy test method
annotations are supported.
I propose to add this test framework to the main repository starting
with 2.5 branch. This will give us more time to fix current issues
(problematic files can be easily excluded to generate less noise).
WDYT?
Regards,
Alex
Hi Devs,
I have almost completed my work on officepreview module and I would like to
discuss about integrating it into main source tree (and release it with
2.4M1). There are a couple of things to discuss:
1. officepreview module have to depend on xwiki-core for the time being
because with current component approach there is no way of determining the
version of an attachment (officepreview module needs to know attachment
version).
2. Need a couple of tests - I'm working on this.
3. Where to place the officepreview module in main source tree.
My initial idea for (3) was to create a
/platform/core/trunk/xwiki-officepreview submodule. However, since
officepreview module depends on officeimporter module, I'm not sure if we
should create a parent module that would host both of these projects.
Another problem lingering in my mind is that with recent changes
xwiki-officeimporter module encapsulates two sub modules - a module capable
of converting documents from one format to another (this is a generic
converter api kind of thing) and another module which is importing office
documents into xwiki specific formats (XDOMOfficeDocumentBuilder,
PresentationBuilder etc.). I'm not sure if these two modules should be
seperated out, but may be that's a separate discussion.
Please let me know your comments about above points.
Thanks.
- Asiri
http://www.xwiki.org/xwiki/bin/view/FAQ/#Attachments
Three Questions.
1) how can I sort my FAQ into these two columns ?
2) Can I see the wiki code for this page?
3) How can I get the Author and Modifier at the bottom of the page like
that?
Grant Sales
Security Operations Analyst
ING
20 Washington Ave South
Minneapolis, MN 55401
Tel: 612.342.7889
Fax: 612.342.3428
Cell: 320.761.0966
Email: grant.sales(a)us.ing.com
www.ing-usa.com
ING. Your future. Made easier. (r)
---------------------------------------------------------
NOTICE: The information contained in this electronic mail message is confidential and intended only for certain recipients. If you are not an intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication and any attachments is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it.
============================================================================================
The XWiki development team is pleased to announce the release of XWiki
Enterprise 2.4 Milestone 2.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
This is second and last milestone of the XWiki Enterprise 2.4 version.
Main changes from XWiki Enterprise 2.4 Milestone 2:
* Objects and classes editor improvements
* New Template-based page creation
* New Invitation Manager application
* New search application improvements
* WYSIWYG Improvements
* JMX Administration Console
* Watchlist improvements
* Script improvements
* Javascript improvements
* Lots of bugs fixes
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise24M2
Thanks
- The XWiki dev team