Hi,
Previously we were checking for includeForm in the page's content to
decide to use inline mode automatically. Since this have been replaced
by the {{include}} macro we have 2 choices I think:
1a) Add a new {{includeForm}} macro that does the same as include but
that'll be able to check to decide if we use automatic inline mode
1b) Create a new {{editMode default="view|inline|..."/}} macro used as
a marker only to decide what mode to use by default.
2) Add some metadata to the page, like a default edit mode that can
set to "wiki", "inline", "wysiwyg", "objects", "class", etc. This mode
would be a combo box that you can change in edit mode.
3) Do something more complex like define a page type. One type could
be "Form".
It's possible 3) is related to the "Easy creation of structured pages"
but I don't know enough to see how closely related they are.
My take is that in 1) (a or b) is best in the short term while we
think more about how we want to do this cleanly.
WDYT?
Thanks
-Vincent
Hi,
I need to call xwiki from a simple java client (sitting outside the xwiki server). For this, the java client needs a jar file which can help to connect server using some specific parameters like URL, username, password etc. This is required to test my university project for persisting some user data into xwiki so that no registration is required via xwiki admin.
Please help.
Thanks & Regards
ac
Hi,
to finish my OpenID authentication project I have to little questions :-)
I created an action AttachOpenIdAction which is used to attach an OpenID to
an already existing user account (see
http://jira.xwiki.org/jira/browse/XWIKI-2588). Now I have two questions:
1. How can I add a button to the users profile page where "Change your
password", "Modify your profile", .. is. I found no template or action.
2. How can I set the permissions for that action. Currently it requires
Admin rights to be executed.
Thank you very much
Have a nice weekend,
Markus
Hi,
I use the xe made from svnroot/xwiki/enterprise/, and create a page
using "xwiki 2.0". put only one line in the content "abc", then save
and review. Got error as following:
org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'getRenderedContent' in class com.xpn.xwiki.api.Document threw
exception java.lang.NoSuchMethodError:
org.xwiki.rendering.renderer.xhtml.XHTMLRenderer.<init>(Ljava/io/Writer;Lorg/xwiki/rendering/DocumentManager;)V
@ /templates/contentview.vm[7,7]
Any suggestion?
Thanks
Wang Ning
Hi all,
I am working with a XE 1.3.8295 installation where RTF export works
fine. But it will be great programmatically control the output layout
(namely, pictures printed size, space before and after paragraphs or
headings, space before and after pictures, footnotes,...
Please, could you point me in the right direction to face this requirement?
Thanks indeed for your help.
Ricardo
--
Ricardo Rodríguez
Your EPEC Network ICT Team
Hi Vincent,
I read this in htmlcleaner's forum,
http://sourceforge.net/forum/forum.php?thread_id=1935192&forum_id=637245.
It seams that htmlcleaner can't handle the deprecated tags. So I think
I can't use htmlcleaner to to transform deprecated tags in the "html
clean" step, unless I use jdom.
PS. I don't think jdom is a so bad way for now.
Thanks
Wang Ning
Hi,
I'd like to create a new core module called xwiki-xml which contains
xwiki utility classes to help parse XML.
The first need I have is to put inside an Entity resolver so that DTDs
can be resolved locally.
The idea is to move the following files currently located in xwiki-core:
* XWikiURIResolver
* xhtml1-*.dtd (2 files)
* xhtml-*.ent (3 files)
I need this in the new rendering XHTML macro to support entities.
In the future we could put there any generic code useful for handling
XML (and for which we don't have any external framework to use of
course).
Here's my +1
Thanks
-Vincent
Hi Vincent,
I run a test case for <del> and it does not work.
In XDOMGeneratorListener#endFormat(WikiFormat format) you use
(format.hasStyle(IWemConstants.STRIKE)) to handle the strickout, but
both <s> and <strike> are deprecated in xhtml. Why not use
(format.hasStyle(IWemConstants.DEL))?
WDYT?
Thanks
Wang Ning
Hi,
I've reviewed SyndEntryDocumentSourceTest and I've found some
problems:
1) In testSourceAccessRights()
253 1 try {
254 1 source.source(new SyndEntryImpl(), doc,
Collections.EMPTY_MAP, getContext());
255 0 assertTrue(ACCESS_RIGHTS_VIOLATED, false);
256 } catch (XWikiException e) {
257 // we should get an exception
258 }
This is not the correct way:
* the assertTrue is never executed since the test expects an exception
to be thrown
* instead the assertTrue should be replaced by a fail("Should have
thrown an exception here")
* the catch should have an exception name of "expected" instead of "e"
to signify that this is expected
* the exception should be checked in the catch to verify it's the
correct one we get
259 // even user name length implies all access rights
260 1 getContext().setUser("Condor");
261 1 try {
262 1 source.source(new SyndEntryImpl(), doc,
Collections.EMPTY_MAP, getContext());
263 // we shouldn't get an exception
264 } catch (XWikiException e) {
265 0 assertTrue(ACCESS_RIGHTS_VIOLATED, false);
266 }
Same here
2) In initArticleClass()
167 7 XWikiDocument doc;
168 7 boolean needsUpdate = false;
169
170 7 try {
171 7 doc = getContext().getWiki().getDocument(ARTICLE_CLASS_NAME,
getContext());
172 } catch (Exception e) {
173 0 doc = new XWikiDocument();
174 0 doc.setFullName(ARTICLE_CLASS_NAME);
175 0 needsUpdate = true;
176 }
177
178 7 BaseClass bclass = doc.getxWikiClass();
179 7 bclass.setName(ARTICLE_CLASS_NAME);
180
181 7 needsUpdate |= bclass.addTextField("title", "Title", 64);
182 7 needsUpdate |= bclass.addTextAreaField("content", "Content",
45, 4);
183 7 needsUpdate |= bclass.addTextField("category", "Category", 64);
184
185 7 String content = doc.getContent();
186 7 if ((content == null) || (content.equals(""))) {
187 0 needsUpdate = true;
188 0 doc.setContent("1 XWiki.ArticleClass");
189 }
190
191 7 if (needsUpdate) {
192 7 getContext().getWiki().saveDocument(doc, getContext());
193 }
194 7 return bclass;
195 }
* Lines 173-175 are never called.
* Lines 187-188 are never called too.
Could the writer of this test please fix this?
Thanks
-Vincent
Hi,
There are some pb with PeriodFactoryTest. For example:
public void testDayPeriodStartEndCode()...
40 {
41 1 Period day =
PeriodFactory.createDayPeriod(System.currentTimeMillis());
42 1 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
43 1 try {
44 1 long start =
sdf.parse(String.valueOf(day.getStartCode())).getTime();
45 1 long end =
sdf.parse(String.valueOf(day.getEndCode())).getTime();
46 1 assertTrue("Start code must be less than end code", start <
end);
47 } catch (ParseException e) {
48 0 assertTrue(e.getMessage(), false);
49 }
50 }
51
This test isn't expecting an exception to be raised and thus it should:
* throw an Exception in its signature
* remove the try/catch block
The other test methods should also be fixed similarly.
Could the writer of this test please fix this?
Thanks
-Vincent
Hi devs,
I'm trying to integrate the new WYSIWYG editor into XWiki's page editing
mechanism and I'm having an issue regarding how the edited content is
being submitted.
Right now (correct me if I'm wrong) when the user clicks "Save & View" the
edit form is submitted having a "content" field filled with the result of
converting editor's HTML output to XWiki syntax. Two things should be
noted:
* the conversion takes place on the client side, in JavaScript code;
* the save action, on the server side, expects XWiki code, not (X)HTML.
In the case of the new WYSIWYG editor, converting the (X)HTML to XWiki on
the client side is out of discussion. I must use the new rendering module,
which is written in Java. In order to smoothly integrate the new editor I
have to make sure the save action gets the XWiki code it expects.
Asynchronously retrieving the result of the conversion before submitting
the edit form is tricky due to the fact that the user can click "Save &
View" before the response arrives.
In light of this, Sergiu suggested me the following 2 solutions:
A) Retrieve the conversion synchronously
This would be easy if GWT would allow it. Instead I'd have to write
error-prone code using timeout to wait for the response and then release
the form submit.
B) Use a servlet filter
I'd have to write a servlet filter that detects the save action,
determines the editor (wysiwyg, new_wysiwyg, wiki etc.) and the syntax of
the submitted content (XWiki by default, XHTML for the new editor) and
makes the conversion, if needed.
I prefer the second solution. WDYT?
Regards,
Marius
Hi, Vincent
I test the xhtml parser. There is the focus:
1. base text format
underline. I think you can fix it.
2. List
both number and bulleted.
The problem is in wikimodel xhtmlparser. It don't parser nested list
correctly. I think it hard to fix but I will try my best.
3. Link
For input <html><body><a
href=\"http://xwiki.org\">xwiki</a></body></html>, the xhtmlparser
generate
beginDocument()
beginParagraph([])
beginFormat([])
xwiki<http://xwiki.org> endFormat([])
endParagraph([])
endDocument()
I use XhtmlParser and EventDumpListener.
But the WikiModelXHTMLParser don't handle the event. Maybe
XDOMGeneratorListener have some problem to generate link block. Any
suggestion about this? Thanks.
4. table
Xhtmlparser can generate table event, but XDOMGeneratorListener don't
handle the event correctly. Is it not finished?
5. img
Xhtmlparser just ignore the <img> tag. But it's OK since I use
imagetagfilter to handle the <img>
6. param of text
like <p align="center">text</p>. how to handle the algin parameter?
I think, if the problem above can be fixed, xhtmlparser will work for
conversion from xhtml to xwiki syntax.
Thanks.
Wang Ning
Hi,
I'm currently adding some stylesheets to Albatross to style the new OpenID
login and registration form
(http://jira.xwiki.org/jira/browse/XSALBATROSS-34). Since those OpenID
styles are used only there I wanted to ask how it is possible to include the
stylesheet just on the login and registration page!? Is there some special
mechanisms?
Thanks,
Markus
Hi Vincent,
1. I found the rendering of boldblock is **bold**, which should be
*bold*, right? The related class is XWikiSyntaxRenderer.
2. I can't find a underline block. Is it missing or just no needed.
How to rendering <u>underline</u> or __underline__
Thanks.
Wang Ning
I have downloded the war distribution of xwiki-workspaces-web-1.0.war. Can you tell me what version of repository corresponds to this war distribution version? I need to modify some files in xwiki core.
Currently, i have repository downloaded from trunk url, and when i try to modify some files xwiki core and update in war distribution, i get version mismatch errors.
TIA
ac
Hello,
I try to compile XWiki platform trunk and when compiling
xwiki-xmldoc-update-plugin, the tests fail:
-------------------------------------------------------------------------------
Test set: com.xpn.xwiki.tool.doc.AbstractDocumentMojoTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.086 sec
<<< FAILURE!
testXMLDocumentLoading(com.xpn.xwiki.tool.doc.AbstractDocumentMojoTest)
Time elapsed: 0.019 sec <<< ERROR!
java.lang.NoClassDefFoundError: com/xpn/xwiki/XWikiContext
at
com.xpn.xwiki.tool.doc.AbstractDocumentMojo.<init>(AbstractDocumentMojo.java:79)
at com.xpn.xwiki.tool.doc.AttachMojo.<init>(AttachMojo.java:38)
at
com.xpn.xwiki.tool.doc.AbstractDocumentMojoTest.testXMLDocumentLoading(AbstractDocumentMojoTest.java:43)
Caused by: java.lang.ClassNotFoundException: com.xpn.xwiki.XWikiContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 29 more
which is quite strange... seems Maven is not able to resolve dependencies!
Do you have the same problems?
regards
Pascal
Hi,
I just finish start up a openoffice server in java code using
Process oooProcess = Runtime.getRuntime().exec(oooCommand);
The process's name is "soffice". But later the process change its name
to "soffice.bin"(or the old "soffice" process end and start a new
process named "soffice.bin". I'
m not sure). I found that I can't use oooProcess.destroy() to close
the "soffice.bin" process.
How to close it by java programming?
Thanks.
Wang Ning
Something to look at: http://jsecurity.org/
I've heard good feedback from Jason Van Zyl (Maven). They've used it
in Nexus.
Might be a good move from us to use it for XWiki's security in general.
Anyone interested in this?
Thanks
-Vincent
Hi devs!
I would like access to the svn sandbox please in order to commit some of my
work.
User: Enygma
P.S.: I suppose it's the same user/pass as on www.xwiki.org.
Thanks!