Hi,
Is it possible to create a new object of a custom class using the RESTful API?
The documentation page only lists the following POST method, which
doesn't accept a class name:
/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[?start=offset&number=n]
I have tried things like the following:
curl -u Admin:admin -X POST -H "Content-type: text/plain" -H "Accept:
application/xml" -d "@test.xml"
http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects/XWik…
Where test.xml contains some variation on:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<properties xmlns="http://www.xwiki.org">
<property type="com.xpn.xwiki.objects.classes.TextAreaClass" name="Text">
<attribute value="Text" name="name"/>
<attribute value="Test" name="prettyName"/>
<attribute value="0" name="unmodifiable"/>
<attribute value="0" name="disabled"/>
<attribute value="100" name="size"/>
<attribute value="10" name="rows"/>
<attribute value="" name="customDisplay"/>
<attribute value="Text" name="editor"/>
<attribute value="6" name="number"/>
<attribute value="0" name="picker"/>
<attribute value="" name="validationMessage"/>
<attribute value="" name="validationRegExp"/>
<value>
This is some text.
</value>
</properties>
Curl returns this:
<html>
<head>
<title>Status page</title>
</head>
<body>
<h3>The method specified in the request is not allowed for the resource identifi
ed by the request URI</h3><p>You can get technical details <a href="http://www.w
3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
Simpler syntax without the XML file still fails for me. In fact, I
can't seem to even get the basic "create object" method to work, even
without the class. For example:
curl -u Admin:admin -X POST
http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects
Just comes back with a "malformed syntax" error.
Is there an example anywhere of how to do this?
Thank you,
Aaron
Hello all,
I have trouble to use this new extension module
when I search on multi-page export page, it always give me back
$cplugin.escapeForXML($wptext)
I tried the page on xwki.org and it is the same results
I have trouble with installation for templates.
what should I exactly do in order to add printmulti.vm and pdfmulti.vm to
my wiki
thank you for your help
yann
Hi,
I'm trying to use XWQL query language to select count of authors and would
like to order this by descending order of this count.
I ended up having this work fine :
"select count(myobject.author), myobject.author from Document as doc,
doc.object(Space.MyClass) as myobject group by myobject.author"
But adding " order by count(myobject.author) desc" leads to an error for
translating the query ...
Adding "AS" in the select expression does not seem to work either.
Is this possible in XWQL and how ?
Thanks,
Jeremie
--
View this message in context: http://xwiki.475771.n2.nabble.com/XWQL-order-by-count-tp6904819p6904819.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi,
I am trying to include a FavIcon in my wiki and I've found this
information, but it doesn't help me...
Regards
Yannick
Sylvain Desbureaux wrote:
>* Hi,*>* I don't manage to put a favicon for xwiki. Any clues ?*>* *
Well, a favicon is usually placed in the root of the URL, like
www.myserver.com/favicon.ico
Doing that in a java webapp container usually involves adding that file
not to the xwiki webapp, but to the ROOT webapp. In tomcat, there is a
ROOT directory inside webapps.
Another solution is to put something like this in
webapps/xwiki/skins/albatross/htmlheader.vm:
<link rel="icon" href="$xwiki.getSkinFile("favicon.png")" type="image/png"/>
<link rel="shortcut icon" href="$xwiki.getSkinFile("favicon.png")"
type="image/png"/>
and put a favicon.png (you can change the name, if you want) in
webapps/xwiki/skins/albatross
If you're not using the albatross skin, change the path accordingly.
Sergiu
Hello,
For the mail archiver app, I need to output mail content in a page. I
used to use it with html content, and display is directly done with
{{html}} macro.
But most messages from mailing-lists are plain-text. My first idea was
to use {{code}}, and this is fine.
But I think display could be greatly improved using specific xwiki
syntax rendering (2.1), but for some elements only.
To do so, I would like to render some text string, not applying all
syntax elements.
Let me explain : what is interesting to render is :
- quotes (lines starting with angle brackets '>'),
- urls (replaced by links automatically),
- emoticons
Everything else (wiki macros, ...) should NOT be rendered.
Is this possible ?
Of course I don't want to impact the way xwiki renders pages.
Thanks for help,
Jeremie
Hi,
I have trouble with the tagcloud and the spaces macro:
Unknown macro: spaces
The "spaces" macro is not in the list of registered macros ...
Same for tagcloud.
I have seen some similar issue in JIRA, but that was about the macros not working after an import. For me, these macros did work originally. At some point they stopped working. Unfortunately I can't remember having done anything suspiciuos. I have a XEM environment running, this is only happening in one wiki. (In the important one of course!) It originally occurred in 3.1, updating to 3.4 didn't make any difference.
Any hints greatly appreciated!
Cheers,
Olaf