Is it possible to save one object at at time?
I have looked at the template code for the "edit object" action and found
that ALL objects of a particular document are loaded
and when the "Save Objects" action is initiated, ALL the objects are sent
back in an HTML Form.
I have also looked (succinctly) at the XWiki Java code (in the "web" folder
of the SVN) and in doing so, I am lead to believe that a *single* object can
not be saved independantly from the whole document and all its objects.
Is this true?
Is there a way to save changes to one object at a time?
Help!
Jean-Lou.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.9/458 - Release Date: 27/09/2006
Hi all..
I guess this would be mainly for the xwiki.com admins, but hopefully
there is another way around this.
Primarily what I have is a document clone feature using
$xwiki.copyDocument (created with some guidance from this mail group);
this naturally works on my local xwiki install, but not on the xwiki.com
hosted wiki.
Message received (I suspect this message comes from the
document.location.href change in script, however when I try to access
the document it appears to not be created):
_____________
Your request has been blocked. If you feel this is an error, please
contact us at webmaster at xwiki dot com. Thanks.
_____________
Code used (added as a menu option with prebuilt querystring):
_____________
#set($sOldWeb=$request.cloneweb)
#set($sOldDoc=$request.clonedoc)
#set($sOldParent=$request.cloneparent)
#set($sDoClone=$request.doclone)
#set($sCloneEditType=$request.editaction)
#set($sCloneSetTitle=$request.settitle)
1.1 Clone a document.
This will copy a document and all it's related content into a new
document.
#if("true" == $sDoClone)
<form action="$doc.getURL("view")" id="newdoc">
<input type="hidden" name="oldparent" value="${sOldParent}">
<input type="hidden" name="oldwebname" value="${sOldWeb}"
size="8">
<input type="hidden" name="olddocname" value="${sOldDoc}"
size="8">
<input type="hidden" name="edittype"
value="${sCloneEditType}" size="8">
<input type="hidden" name="name" value=""/>
New Document: <input type="text" name="title" value="" />
<input type="button" value="Create" onclick='if
(updateName(this.form.title,this.form.name)) {this.form.submit(); }'>
</form>
#elseif($request.getParameter("oldwebname"))
#set($sOldWeb=$request.getParameter("oldwebname"))
#set($sOldDoc=$request.getParameter("olddocname"))
#set($sNewDoc=$request.getParameter("name"))
#set($sDocTitle=$request.getParameter("title"))
#set($sCloneEditType=$request.getParameter("edittype"))
#set($sourceDocName="${sOldWeb}.${sOldDoc}")
#set($targetDocName="${sOldWeb}.${sNewDoc}")
$xwiki.copyDocument($sourceDocName, $targetDocName)
* *Clone Prepaired.*
<script language="javascript">
<!--
document.location.href='../../save/${sOldWeb}/${sNewDoc}?xredirect=../..
/${sCloneEditType}/${sOldWeb}/${sNewDoc}?isclone=true%26title=${sDocTitl
e}'
//-->
</script>
#else
* *No document information. Please try again, from the "More
Actions" menu while viewing the document you wish to Clone.*
#end
_____________
Frank,
I am login as admin, what do I have to do to allow admin to see the files? I remember I could get to them before.
Regards,
Wei-hsing
-------------- Original message ----------------------
From: Frank Häfemeier <frank(a)haefemeier.net>
> >I am trying to get skin and template files, from admin menu on my xwiki
> >site, but I am getting errors...
> >
> >HTTP Status 404 - /xwiki/templates/
> >
> >type Status report
> >
> >message /xwiki/templates/
> >
> >description The requested resource (/xwiki/templates/) is not available.
> >Apache Tomcat/5.5.17
>
> The files are there, but you have no access rights. You must configure
> a readable access in your apache configuration.
>
> Bye
>
> Frank
>
>I am trying to get skin and template files, from admin menu on my xwiki
>site, but I am getting errors...
>
>HTTP Status 404 - /xwiki/templates/
>
>type Status report
>
>message /xwiki/templates/
>
>description The requested resource (/xwiki/templates/) is not available.
>Apache Tomcat/5.5.17
The files are there, but you have no access rights. You must configure
a readable access in your apache configuration.
Bye
Frank
Hi,
I am trying to get skin and template files, from admin menu on my xwiki site, but I am getting errors...
HTTP Status 404 - /xwiki/templates/
type Status report
message /xwiki/templates/
description The requested resource (/xwiki/templates/) is not available.
Apache Tomcat/5.5.17
Any ideas?
Wei-hsing
Hello,
I've configured my xwiki to increase attachment size according to
these instructions:
http://www.xwiki.org/xwiki/bin/view/AdminGuide/Config+Larger+Attachments
I'm seeing this error/stack when trying to attach anything above 50mb
(below 50mb works fine):
===============================================================
A problem occured while trying to service your request. Please contact
the support if this happens again.
Detailed information:
Error number 11008 in 11: Exception while parsing uploaded file
Wrapped Exception: the request was rejected because it's size exceeds
allowed range
com.xpn.xwiki.XWikiException: Error number 11008 in 11: Exception
while parsing uploaded file
Wrapped Exception: the request was rejected because it's size exceeds
allowed range
at com.xpn.xwiki.XWikiService.actionUpload(XWikiService.java:135)
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:797)
Wrapped Exception:
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because it's size exceeds allowed range
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:317)
at com.xpn.xwiki.XWikiService.actionUpload(XWikiService.java:133)
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:797)
===============================================================
Does anyone have any idea what could be causing this or what I forgot to tweak?
Thanks!
-jeff
I have installed the exo stack bundled in tomcat 5.0 (linux FC5 env.)
and the wiki.war (xwiki-exo-0.9.1252)
I have the following exception when launching xwiki as stand alone:
javax.servlet.ServletException: L'ex�cution de la servlet a lanc� une exception
com.xpn.xwiki.user.impl.exo.ExoFilter.doFilter(ExoFilter.java:50)
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
Any idea ?
Hi,
In order to migrate a website to XWiki, I wanted to insert old news in XWiki
and then change the date to match the true date of the news (and not having
all news of the same day). This will allow to use XWiki for archives, etc.
I don't want to change the date by using direct access to the database, but
use velocity commands.
Then, I tried :
#set($mydoc = $xwiki.getDocument("MyPage"))
#set($xdoc = $mydoc.getDocument())
#set($date = $xdoc.getDate())
Current date : $date
Updating date :
#set($milli = $xwiki.parseLong("1155311178410"))
#set($tmpDate = $xwiki.getDate($milli))
$xdoc.setDate($tmpDate)
$xdoc.setCreationDate($tmpDate)
But it doesn't work (the news is still displayed with the wrong date) as it
should modify only the in-memory document.
By displaying the $xdoc.isFromCache() value, it is true.
Then, I tried $xwiki.xWiki.saveDocument($xdoc,$context.context)
But it didn't work neither.
What could I use to modify the date of a news (without modifying directly
the database).
Regards,
Florent
Dear All,
I use the latest version of xwiki/branches/XWIKI_STABLE_0_9_1300.
I've got an issue with the programming access right since I can't allow a
group of users to use such of methods: $doc.getDocument()...
In fact, I use a XWiki Farm configured with about 20 virtual wikis. On the
primary wiki, I've set the Programming access right to a group called Admin
(used to adminitrate all the wikis).
On a virtual wiki, when I set the programming right to a local group, it
doesn't work since the response of $doc.getDocument() is null. Moreover even
the owner of the wiki can't use that method.
Finally, I've noticed that if I set the programming right to
xwiki:XWiki.XWikiAllGroup, it'd work but that's not convenient since any
registered user can use programmatic function.
Have you noticed a such behaviour ? Does any better solution exist ?
Regards
--
Xavier MOGHRABI - Consortium ObjectWeb
Jabber: moghrabi(a)jabber.objectweb.org
Phone: +33 4 76 61 52 35
Hello,
We're currently working on integrating xwiki in an educational plattform. That means, we need to provide an xwiki-page for each course. We have retty much all methods laid out and most of it working, the only thing we are still not sure about handling is the automatic login, before a user gets to see a specific xwiki-page. Adding users, groups and setting the permissions (in the xwiki) is all dealt with already - the only thing that is missing is the automatic login.
Is this possible with the existing methods or do we have to write our own authentication-service? If so, is there sample code or anything you could point us to how to proceed?
An option we were contemplating was, posting the login data to the actual xwiki login form in the background (similar to what the curl-library provides in php), but this might just be unnecessary, if there is a certain existing method we can utilize for that.
Thanks a lot for your help in advance!
Florian
--
NEU: GMX DSL Sofort-Start-Set - blitzschnell ins Internet!
Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl