Hi Vincent :) Niiiiice, this works properly even with the first version of your code on XWIKI 6.0.1 !!
Thanks :) 2014-05-24 14:16 GMT+01:00 [email protected] <[email protected]>: > Hi Walid, > > On 22 May 2014 at 16:55:46, walid yaich ([email protected](mailto: > [email protected])) wrote: > > > Hi, > > > > I have problem to get this application works properly, In this > > article, > > i'm supposed to do this to test it : > > > > 1. Create a page, say Main.Test with the content "Original Content" > > 2. Edit the page again to change the content to "New Content" > > 3. Add an XObject of type Revision.RevisionClass and set the > > revisionfield to > > 1.1 (this is the version we want to display) > > 4. Save > > > > This works > > > > But when we change the order : > > > > 1. Add an XObject of type Revision.RevisionClass and set the > > revisionfield to > > 1.1 (this is the version we want to display) > > I don’t understand. To what page are you adding the XObject? You need a > page first! :) > > > 2. Create a page, say Main.Test with the content "Original Content" > > 3. Edit the page again to change the content to "New Content" > > 4. Save > > > > it doesn't work anymore, you save the Revision object with the right > > revision but it won't display it. > > But this works for all revisions before adding the object. > > Once you added the object, no matter how much changes you made, you won't > > be able to display last revisions(created after adding the object) > > I’ve updated the script to make it a bit more foolprool: > > http://www.xwiki.org/xwiki/bin/view/FAQ/How+to+implement+%22Approved+Revisions%22 > > > BTW, when i give a wrong revision, the page display just > > "$revDoc.getRenderedContent()” > > I’ve now made it foolproof, of course that makes the script a bit more > complex to understand… The original goal wasn’t to provide something of > production-level quality but more as a proof of concept. Anyway, you should > try the new version :) > > Thanks > -Vincent > > > One strange usecase : > > 1) i create a new page, make modifications and save 3 times > > 2) i add the object and give 1.1 for revision and save > > 3) when i edit the file, in the editor, i can find the last version, i > > modify something and save > > ==> it's like, it'll save the revision 1.1 (setted to the added object) > > When i make "compare selected version" between the last and the first, it > > gives me the last change i made, but when i click on the last revision i > > can't find the last change i made. > > > > Any explanation please ? > > > > Thanks in advance :) > > _______________________________________________ > > devs mailing list > > [email protected] > > http://lists.xwiki.org/mailman/listinfo/devs > > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

