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
Can one copy/paste images directly into the page editor? I am testing with
the xwiki.org sandbox.
It seemed to work, ie the image appeared in the wysiwyg editor. But when I
try to view it it loses all content and reports an html parse error.
Hmmm...even when I try to upload from my local disk, as an attached image,
it reports "An error occurred while uploading your file" even though the
path is valid.
Are images useable in xwiki, or is it just that the xwiki sandbox does not
work right?
--
View this message in context: http://xwiki.475771.n2.nabble.com/Can-one-copy-paste-images-directly-into-t…
Sent from the XWiki- Users mailing list archive at Nabble.com.
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
Hi XWiki Devs/Community,
We're planning a deploy of XE on our Enterprise (a brazilian government
agency) as the main intranet tool, for about 400 heavy users (in thesis,
they'll generate a lot of content). We're sure that XE can handle it
smoothly and it will bring a LOT of help on the day-to-day work of our
office.
We're doing some optimizations and fine tunning for the deploy in
production. Meanwhile, we're facing some troubles with our
workstations's antivirus tools, which brings me some concerns about the
attachment files on the filesystems. Trying to address a potential
problem (users using attached files to spread infected files to other
users and, worst, other government agencies, which have also critical
mission like ours), I would like to use the same approach we use on our
other systems we've built at home: calling an AV engine (such as our
cluster of ClamAV servers) from the webapp (we already use some java API
for this, on our web apps) to scan every file being uploaded and before
being attached to the wiki, and show some message to the user, in case
of some trouble.
I've searched for some plugin or initiative about this, but couldn't
find any. Is there any going on? If not, from where can I start and what
should I put under consideration, in order to
guide our dev staff to plug it in xwiki's core as a plugin/extension?
Forgive myself in advance if this information is located somewhere on
the documentation and I couldn't find it.
Best Regards,
--
Ramon Gomes Brandão
**
**
*RAMON GOMES BRANDÃO*