Sergiu Dumitriu-2 wrote:
>
> underbad wrote:
>> Hey XWiki Users :)
>>
>> I seem to be having a little trouble in 1.7.1 changing the creator. In
>> my
>> wiki, I have a tool that makes copies of several "base" documents so that
>> a
>> user can start off with a template of what they want, most often the main
>> change is to add some text, or even just to have the relevant document
>> attached to a specific project.
>> Problem is, the code that worked for this in 1.4 doesn't work in 1.7.1 -
>> is
>> there a new way to do this?
>> Currently I use a groovy script that copies the documents related to the
>> tool (this works fab); but then I have a script that goes:
>> copiedDoc.doc.setCreator(context.user);
>>
>> context.user seems to be coming up correctly.
>> copiedDoc is correctly assigned to the document.
>> But the creator doesn't get changed.
>
> There was no API change, so this should still work. Can you check that
> copiedDoc.doc does return a valid reference? Can you check that the call
> indeed doesn't succeed by calling copiedDoc.getCreator() right after the
> set line?
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>
Hi Sergui,
When I check creator using getCreator(), the creator has not changed.
copiedDoc and copiedDoc.doc both are valid when checked, and I can do pretty
much everything else like copyDocument or getObjects().
--
View this message in context:
http://n2.nabble.com/%24doc.doc.setCreator%28%22XWiki.username%22%29-not-working-on-1.7.1--tp2423386p2423979.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users