IRC Archive for channel #xwiki on 10 November 2015

Last modified by Vincent Massol on 2015/11/10 23:48

<LucasLima> has quit
00:12 <thisismatt> has quit
00:16 <vmassol1> debajit: all I can think of is that it's used to differentiate local users from global users
00:16 <vmassol1> (somehow)
00:17 <vmassol1> and we add an A HREF for local groups to link to them
00:18 <vmassol1> now I don't see what this had to do with "wiki" but maybe the code is reusing some livetable property for some custom usage…
00:33 <vmassol1> has quit
00:52 <abusenius> has quit
01:08 <Pbas> has quit
01:14 <Pbas> has joined #xwiki
01:59 <MasterPiece> has joined #xwiki
02:24 <xwikibot> has joined #xwiki
02:27 <MasterPiece> has quit
02:34 <debajit> vmassol: Thanks
02:39 <debajit> has quit
06:01 <Denis> has quit
06:01 <Denis3> has joined #xwiki
06:01 <Denis3> is now known as <Denis>
07:08 <msmeria> has joined #xwiki
07:46 <kais3n> has joined #xwiki
07:56 <Ramona> has joined #xwiki
08:11 <sorinello> has quit
08:14 <sorinello> has joined #xwiki
08:18 <sorinello> has quit
08:20 <sorinello> has joined #xwiki
08:30 <cjd> has quit
08:33 <KermitTheFragger> has joined #xwiki
08:47 <Ramona> has quit
08:49 <Bugendolf> has joined #xwiki
08:54 <KermitTheFragger> has quit
09:01 <vmassol1> has joined #xwiki
09:02 <woshilapin> has quit
09:02 <tmortagne> has joined #xwiki
09:04 <Ramona> has joined #xwiki
09:09 <woshilapin> has joined #xwiki
09:17 <woshilapin> has quit
09:18 <Pbas> Good morning everyone :-) I try to delete two last version of my doc with this groovy code
09:18 <Pbas> def MyGroup = xwiki.getDocument('XWiki.GF_PiloteP3')
09:18 <Pbas> def gArch = MyGroup.getDocumentArchive()
09:18 <Pbas> gArch.removeVersions(gArch.getLatestVersion(), gArch.getPrevVersion(gArch.getLatestVersion()), context)
09:18 <Pbas> (http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/doc/XWikiDocumentArchive.html#removeVersions%28Version,%20Version,%20com.xpn.xwiki.XWikiContext%29)
09:18 <Pbas> but removeVersions crash with this log
09:18 <Pbas> Possible solutions: removeVersions(org.suigeneris.jrcs.rcs.Version, org.suigeneris.jrcs.rcs.Version, com.xpn.xwiki.XWikiContext)
09:18 <Pbas> Have you got i idea what I'm doing wrong? Thxs
09:20 <cjd> has joined #xwiki
09:20 <Ramona> has quit
09:28 <tmortagne> Pbas: you are passing the wrong context
09:28 <tmortagne> contex variable is a ScriptContext and the method expect a XWikiContext
09:28 <tmortagne> so that would be xcontext.context
09:29 <tmortagne> (xcontext binding is a public com.xpn.xwiki.api.Context and the method want the more protected XWikiContext)
09:29 <Pbas> Ok thxs I will give a try (I don't understand very well what is context in doc :-( )
09:30 <tmortagne> not sure what you means by "context in doc"
09:30 <tmortagne> the method want the XWiki context because it's needed to manipulate the database
09:31 <Pbas> In a lot of method there are "protected XWikiContext context  The current context, needed by the underlying protected object" but didn't found an explication what it is
09:31 <Pbas> perhaps a java concept?
09:32 <Pbas> or xwiki concept?
09:32 <tmortagne> it's the XWiki context as it's name indicate so yes a XWiki concept :)
09:32 <tmortagne> it contains things like current wiki, current user, etc.
09:32 <tmortagne> contextual information
09:32 <cjd> hehe the "context" is an object which follows you through the current http request/response cycle and then is deleted
09:32 <tmortagne> and among other things it's needed when you need to access the XWiki database
09:33 <cjd> I had no idea what it was either when I started with XWiki
09:34 <Pbas> It is an important things to use xwiki api but doc about this missing in my opinion
09:34 <tmortagne> in more public/script oriented APIs it's hidden but its still here
09:35 <tmortagne> API taking this XWikiContext are mostly old things which are replaced when we all the API related to document manipulation is a big jump
09:35 <cjd> Context objects are not only confined to XWiki, it's a design pattern in software dev, irronically this is the only link I can find about it... http://c2.com/cgi/wiki?ContextObjectsAreEvil :)
09:35 <tmortagne> s/when/when we find time/
09:38 <Pbas> Thxs. Anyway gArch.removeVersions didn't crash but didn't remove version last version...
09:38 <sorinello> has quit
09:40 <Pbas> I can copy / past this Context description in a new faq maybe?
09:46 <tmortagne> Pbas: sure if you feel more comfortable with a FAQ
09:47 <Pbas> Probably someone will correct it :-)
09:52 <Pbas> gArch.removeVersions(gArch.getLatestVersion(), gArch.getPrevVersion(gArch.getLatestVersion()), xcontext.context) didn't remove last version: maybe this method can not remove current one?
09:54 <tmortagne> Pbas: from what I can see in the code the method does not seems to work for current version but not sure it's intended
09:56 <woshilapin> has joined #xwiki
09:56 <Pbas> It is an ugly fix for http://jira.xwiki.org/browse/XWIKI-12570 I will update a group every night but I want remove last version
09:56 <Pbas> last version generated by my fix
09:58 <gdelhumeau> has joined #xwiki
09:59 <Pbas> (not sure if it will refresh group cache anyway)
09:59 <KermitTheFragger> has joined #xwiki
10:00 <mflorea> has joined #xwiki
10:07 <tmortagne> Pbas: I don't see any modification to the DB in the method, it use the context to access the DB but it expect you to save the archive when you are done modifying it
10:08 <tmortagne> see example in delete version action https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/DeleteVersionsAction.java#L60
10:09 <tmortagne> and I think I was wrong for the last version support in recent version, I remember some issue about this but not sure if it was fixed or not
10:09 <Pbas> Ha thxs: MyGroup.save() missing after gArch.removeVersions
10:10 <Pbas> It seem to be fix :)
10:12 <Pbas> Version number is increase by +1 but it is ok now. Ok thxs a lot for your help
10:12 <Pbas> I must wait now if it fix the issue
10:17 <Slashman> has joined #xwiki
10:32 <Enygma`> has joined #xwiki
10:34 <evalica> has joined #xwiki
11:50 <Ramona1> has joined #xwiki
12:37 <mflorea> gdelhumeau: can you check http://ci.xwiki.org/job/xwiki-enterprise-test-rest/1825/org.xwiki.enterprise$xwiki-enterprise-test-rest/testReport/org.xwiki.test.rest/PageResourceTest/testGETPageChildren/ . Having "Main.WebHome" as parent of XWiki.Notifications.Code.NotificationsMenuUIX leads to a 404 Not Found on XWiki.Notifications.Code.WebHome
12:37 <gdelhumeau> ok mflorea
12:38 <mflorea> the quick fix is to change the parent
12:38 <gdelhumeau> yes
12:39 <gdelhumeau> the problem is that this test is checking if the space of the child have a webhome?
12:40 <mflorea> afaics, the test gets the list of  child pages for Main.WebHome and then checks the REST links for these. The space home page is probably such a link
12:42 <gdelhumeau> does it means that having pages without existing hierarchy parents is a problem?
12:43 <gdelhumeau> Here we don't have a XWiki.Code.Notifications.WebHome page
12:43 <gdelhumeau> neither XWiki.Code.WebHome
12:43 <mflorea> it's not a problem, but this text expects it for the children of the Main.WebHome
12:43 <mflorea> the link is probably for rel="http://www.xwiki.org/rel/space"
12:44 <mflorea> actually no, because the failing URL ends with WebHome
12:46 <mflorea> regarding having holes in the hierarchy of the default XAR, we need to decide. The fact that is technically possible doesn't mean we want it by default
12:59 <gdelhumeau> I can put XWiki.WebHome as parent then
13:21 <mflorea> +1
13:45 <sorinello> has joined #xwiki
14:25 <vmassol1> has quit
15:21 <msmeria> has quit
15:26 <pomo> has joined #xwiki
15:29 <pomo> Hi, I'm getting "Failed to import documents. Reason: Internal Server Error" importing pages from an old xwiki, any suggestion where to get further info? There's nothing in tomcat log :(
16:15 <pomo> has quit
16:53 <ClemensR> has joined #xwiki
17:13 <kais3n> has quit
17:50 <KermitTheFragger> has quit
18:19 <OSIMasson> has joined #xwiki
18:20 <OSIMasson> has left #xwiki
18:22 <ClemensR> tmortagne: are you telling me I am blocking the release tomorrow with XWIKI-12793 ?
18:22 <tmortagne> it's a regression
18:24 <ClemensR> ok, I will try to see if I can fix it today. if I cannot, should I rollback the fix for XWIKI-12731 ?
18:31 <tmortagne> I don't think we can release 7.3 final with XWIKI-12793 so the best would probably be to revert the cause yes
18:35 <vmassol1> has joined #xwiki
18:42 <tmortagne> has quit
19:04 <Ramona1> has quit
19:06 <evalica> has quit
19:07 <Enygma`> has quit
19:13 <cjd> has quit
19:16 <Ramona> has joined #xwiki
19:20 <vmassol1> has quit
19:35 <abusenius> has joined #xwiki
19:36 <woshilapin> has quit
19:38 <mflorea> has quit
19:38 <ClemensR> has quit
19:49 <cjd> has joined #xwiki
20:04 <Ramona> has quit
20:08 <Slashman> has quit
20:11 <Ramona> has joined #xwiki
20:20 <Ramona> has quit
20:56 <Denis> Hi guys, is there a way to do conditional programming for nested spaces ?
20:58 <Denis> I would like to adapt an extension that runs from 5.x, and do not want to maintain multiple versions, but to put a condition, to know if let say, doc.location is supported or if I should use doc.space in a document livetable, for example
20:59 <cjd> It was done for webide, it's not easy
21:00 <cjd> #set($nestedSpaces = !$xwiki.getVersion().matches('^([1-6]\..*|7\.[01].*)'))
21:02 <cjd> another one:   $services.model.createDocumentReference("wiki", ["A", "B"], "page") == 'wiki:A.B.page'
21:03 <cjd> which works but was considered less good by the developers
21:03 <cjd> AKA: This discussion came up.
21:09 <Denis> in this regards, it looks like we have been even worse than the flamingo conditions
21:09 <Denis> it starts to be very difficult to create cross-version extensions
21:43 <Denis> thanks caleb for sharing, I will use the first one even if I found it the worse one
21:44 <Denis> the second one looks more functional check, but depends a syntax… there is probably a third way :)
21:45 <cjd> second one depends on the default toString() of document references
21:45 <cjd> which is not specified (even though IMO it really should be)
21:59 <gdelhumeau> has quit
22:36 <OSIMasson> has joined #xwiki
23:08 <woshilapin> has joined #xwiki
23:29 <sorinello_> has joined #xwiki
23:32 <sorinello> has quit
23:47 <sorinello__> has joined #xwiki
23:48 <sorinello_> has quit
Tags:
   

Get Connected