Hi,
THOMAS, BRIAN M (SBCSI) a écrit :
When copying a document using $xwiki.copyDocument(), I
find that all the
attached objects are copied along with the document, and I am able to
view them appropriately. However, they are not available to other
users, and when I call $xwiki.flushCache(), only the document content
remains; the objects are no longer attached.
A further detail, whether relevant or not, is that the document being
copied is a user profile document (defined as a document named
XWiki.<username>, where <username> is the login name of the user, and
containing an XWiki.XWikiUsers object).
Yet another detail, puzzling though it may be, is that of the objects in
the original, one of them is the one defined in the xwiki-db-0.9.2.sql
database download as an object of XWiki class XWiki.XWikiRights with ID
165499024, with a field named "levelsye". It's one of two
XWiki.XWikiRights objects attached to a user profile document by
createUser; the other one explicitly gives edit permission to the user
himself. No other XWiki.XWikiRights objects contain this field, nor
does the current definition of the XWiki.XWikiRights class contain it;
instead they contain a field called "levels".
So, the questions are, in order of (logarithmically) decreasing
importance:
1. How can I make this work?
I'll revert the question. Which version of XWiki are you using and where
are you running the copyDocument (inside a wiki page or in an external
application ?)
I'm a little surprised that you are having problems. I suspect creating
the new document worked but it was not saved correctly to the database
nor the document was shared with other users.
Are you getting any error message ?
2. Does a user profile document have some special
status that makes it
inappropriate to make a copy?
No
3. Is the "levelsye" field in an object
simply a bug, or is there some
arcane reason for its existence?
It's a bug. It might have an effect on copying this exact object.
Brian M. Thomas - Senior Technical Architect
AT&T Services, Inc.
One SBC Center, Room 24D3
St. Louis, MO 63101
314 235 3141
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Ludovic Dubost
XPertNet:
http://www.xpertnet.fr/
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic