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
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
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
Hi all,
When I create a page in a Space called "MySpace" using Title "a.b.c" , it
created a page call "c" under the space "a.b". (a.b: c)
Is there anyway I can allow users create document with dot on the Title
please? I would expect the document to be called "MySpace: a.b.c"
Many Thanks
Art
--
View this message in context: http://n2.nabble.com/Creating-a-page-with-dot-on-the-Title-tp1112070p111207…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi,
I want to change the default xwiki logo with my custom logo say
MyProjectLogo.png. Is this configurable somewhere?
What i tried :-inside my tomcat directory i.e tomcat\myxwiki\skins\colibri
, i replaced default log.png with my custom logo(with same name). But it
still picks old logo.
Thanks in advance.