Wiki source code of IRC Archive for channel #xwiki on 10 November 2015
Last modified by Vincent Massol on 2015/11/10 23:48
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | <LucasLima> has quit | ||
2 | 00:12 <thisismatt> has quit | ||
3 | 00:16 <vmassol1> debajit: all I can think of is that it's used to differentiate local users from global users | ||
4 | 00:16 <vmassol1> (somehow) | ||
5 | 00:17 <vmassol1> and we add an A HREF for local groups to link to them | ||
6 | 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… | ||
7 | 00:33 <vmassol1> has quit | ||
8 | 00:52 <abusenius> has quit | ||
9 | 01:08 <Pbas> has quit | ||
10 | 01:14 <Pbas> has joined #xwiki | ||
11 | 01:59 <MasterPiece> has joined #xwiki | ||
12 | 02:24 <xwikibot> has joined #xwiki | ||
13 | 02:27 <MasterPiece> has quit | ||
14 | 02:34 <debajit> vmassol: Thanks | ||
15 | 02:39 <debajit> has quit | ||
16 | 06:01 <Denis> has quit | ||
17 | 06:01 <Denis3> has joined #xwiki | ||
18 | 06:01 <Denis3> is now known as <Denis> | ||
19 | 07:08 <msmeria> has joined #xwiki | ||
20 | 07:46 <kais3n> has joined #xwiki | ||
21 | 07:56 <Ramona> has joined #xwiki | ||
22 | 08:11 <sorinello> has quit | ||
23 | 08:14 <sorinello> has joined #xwiki | ||
24 | 08:18 <sorinello> has quit | ||
25 | 08:20 <sorinello> has joined #xwiki | ||
26 | 08:30 <cjd> has quit | ||
27 | 08:33 <KermitTheFragger> has joined #xwiki | ||
28 | 08:47 <Ramona> has quit | ||
29 | 08:49 <Bugendolf> has joined #xwiki | ||
30 | 08:54 <KermitTheFragger> has quit | ||
31 | 09:01 <vmassol1> has joined #xwiki | ||
32 | 09:02 <woshilapin> has quit | ||
33 | 09:02 <tmortagne> has joined #xwiki | ||
34 | 09:04 <Ramona> has joined #xwiki | ||
35 | 09:09 <woshilapin> has joined #xwiki | ||
36 | 09:17 <woshilapin> has quit | ||
37 | 09:18 <Pbas> Good morning everyone :-) I try to delete two last version of my doc with this groovy code | ||
38 | 09:18 <Pbas> def MyGroup = xwiki.getDocument('XWiki.GF_PiloteP3') | ||
39 | 09:18 <Pbas> def gArch = MyGroup.getDocumentArchive() | ||
40 | 09:18 <Pbas> gArch.removeVersions(gArch.getLatestVersion(), gArch.getPrevVersion(gArch.getLatestVersion()), context) | ||
41 | 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) | ||
42 | 09:18 <Pbas> but removeVersions crash with this log | ||
43 | 09:18 <Pbas> Possible solutions: removeVersions(org.suigeneris.jrcs.rcs.Version, org.suigeneris.jrcs.rcs.Version, com.xpn.xwiki.XWikiContext) | ||
44 | 09:18 <Pbas> Have you got i idea what I'm doing wrong? Thxs | ||
45 | 09:20 <cjd> has joined #xwiki | ||
46 | 09:20 <Ramona> has quit | ||
47 | 09:28 <tmortagne> Pbas: you are passing the wrong context | ||
48 | 09:28 <tmortagne> contex variable is a ScriptContext and the method expect a XWikiContext | ||
49 | 09:28 <tmortagne> so that would be xcontext.context | ||
50 | 09:29 <tmortagne> (xcontext binding is a public com.xpn.xwiki.api.Context and the method want the more protected XWikiContext) | ||
51 | 09:29 <Pbas> Ok thxs I will give a try (I don't understand very well what is context in doc :-( ) | ||
52 | 09:30 <tmortagne> not sure what you means by "context in doc" | ||
53 | 09:30 <tmortagne> the method want the XWiki context because it's needed to manipulate the database | ||
54 | 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 | ||
55 | 09:31 <Pbas> perhaps a java concept? | ||
56 | 09:32 <Pbas> or xwiki concept? | ||
57 | 09:32 <tmortagne> it's the XWiki context as it's name indicate so yes a XWiki concept :) | ||
58 | 09:32 <tmortagne> it contains things like current wiki, current user, etc. | ||
59 | 09:32 <tmortagne> contextual information | ||
60 | 09:32 <cjd> hehe the "context" is an object which follows you through the current http request/response cycle and then is deleted | ||
61 | 09:32 <tmortagne> and among other things it's needed when you need to access the XWiki database | ||
62 | 09:33 <cjd> I had no idea what it was either when I started with XWiki | ||
63 | 09:34 <Pbas> It is an important things to use xwiki api but doc about this missing in my opinion | ||
64 | 09:34 <tmortagne> in more public/script oriented APIs it's hidden but its still here | ||
65 | 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 | ||
66 | 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 :) | ||
67 | 09:35 <tmortagne> s/when/when we find time/ | ||
68 | 09:38 <Pbas> Thxs. Anyway gArch.removeVersions didn't crash but didn't remove version last version... | ||
69 | 09:38 <sorinello> has quit | ||
70 | 09:40 <Pbas> I can copy / past this Context description in a new faq maybe? | ||
71 | 09:46 <tmortagne> Pbas: sure if you feel more comfortable with a FAQ | ||
72 | 09:47 <Pbas> Probably someone will correct it :-) | ||
73 | 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? | ||
74 | 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 | ||
75 | 09:56 <woshilapin> has joined #xwiki | ||
76 | 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 | ||
77 | 09:56 <Pbas> last version generated by my fix | ||
78 | 09:58 <gdelhumeau> has joined #xwiki | ||
79 | 09:59 <Pbas> (not sure if it will refresh group cache anyway) | ||
80 | 09:59 <KermitTheFragger> has joined #xwiki | ||
81 | 10:00 <mflorea> has joined #xwiki | ||
82 | 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 | ||
83 | 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 | ||
84 | 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 | ||
85 | 10:09 <Pbas> Ha thxs: MyGroup.save() missing after gArch.removeVersions | ||
86 | 10:10 <Pbas> It seem to be fix :) | ||
87 | 10:12 <Pbas> Version number is increase by +1 but it is ok now. Ok thxs a lot for your help | ||
88 | 10:12 <Pbas> I must wait now if it fix the issue | ||
89 | 10:17 <Slashman> has joined #xwiki | ||
90 | 10:32 <Enygma`> has joined #xwiki | ||
91 | 10:34 <evalica> has joined #xwiki | ||
92 | 11:50 <Ramona1> has joined #xwiki | ||
93 | 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 | ||
94 | 12:37 <gdelhumeau> ok mflorea | ||
95 | 12:38 <mflorea> the quick fix is to change the parent | ||
96 | 12:38 <gdelhumeau> yes | ||
97 | 12:39 <gdelhumeau> the problem is that this test is checking if the space of the child have a webhome? | ||
98 | 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 | ||
99 | 12:42 <gdelhumeau> does it means that having pages without existing hierarchy parents is a problem? | ||
100 | 12:43 <gdelhumeau> Here we don't have a XWiki.Code.Notifications.WebHome page | ||
101 | 12:43 <gdelhumeau> neither XWiki.Code.WebHome | ||
102 | 12:43 <mflorea> it's not a problem, but this text expects it for the children of the Main.WebHome | ||
103 | 12:43 <mflorea> the link is probably for rel="http://www.xwiki.org/rel/space" | ||
104 | 12:44 <mflorea> actually no, because the failing URL ends with WebHome | ||
105 | 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 | ||
106 | 12:59 <gdelhumeau> I can put XWiki.WebHome as parent then | ||
107 | 13:21 <mflorea> +1 | ||
108 | 13:45 <sorinello> has joined #xwiki | ||
109 | 14:25 <vmassol1> has quit | ||
110 | 15:21 <msmeria> has quit | ||
111 | 15:26 <pomo> has joined #xwiki | ||
112 | 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 :( | ||
113 | 16:15 <pomo> has quit | ||
114 | 16:53 <ClemensR> has joined #xwiki | ||
115 | 17:13 <kais3n> has quit | ||
116 | 17:50 <KermitTheFragger> has quit | ||
117 | 18:19 <OSIMasson> has joined #xwiki | ||
118 | 18:20 <OSIMasson> has left #xwiki | ||
119 | 18:22 <ClemensR> tmortagne: are you telling me I am blocking the release tomorrow with XWIKI-12793 ? | ||
120 | 18:22 <tmortagne> it's a regression | ||
121 | 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 ? | ||
122 | 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 | ||
123 | 18:35 <vmassol1> has joined #xwiki | ||
124 | 18:42 <tmortagne> has quit | ||
125 | 19:04 <Ramona1> has quit | ||
126 | 19:06 <evalica> has quit | ||
127 | 19:07 <Enygma`> has quit | ||
128 | 19:13 <cjd> has quit | ||
129 | 19:16 <Ramona> has joined #xwiki | ||
130 | 19:20 <vmassol1> has quit | ||
131 | 19:35 <abusenius> has joined #xwiki | ||
132 | 19:36 <woshilapin> has quit | ||
133 | 19:38 <mflorea> has quit | ||
134 | 19:38 <ClemensR> has quit | ||
135 | 19:49 <cjd> has joined #xwiki | ||
136 | 20:04 <Ramona> has quit | ||
137 | 20:08 <Slashman> has quit | ||
138 | 20:11 <Ramona> has joined #xwiki | ||
139 | 20:20 <Ramona> has quit | ||
140 | 20:56 <Denis> Hi guys, is there a way to do conditional programming for nested spaces ? | ||
141 | 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 | ||
142 | 20:59 <cjd> It was done for webide, it's not easy | ||
143 | 21:00 <cjd> #set($nestedSpaces = !$xwiki.getVersion().matches('^([1-6]\..*|7\.[01].*)')) | ||
144 | 21:02 <cjd> another one: $services.model.createDocumentReference("wiki", ["A", "B"], "page") == 'wiki:A.B.page' | ||
145 | 21:03 <cjd> which works but was considered less good by the developers | ||
146 | 21:03 <cjd> AKA: This discussion came up. | ||
147 | 21:09 <Denis> in this regards, it looks like we have been even worse than the flamingo conditions | ||
148 | 21:09 <Denis> it starts to be very difficult to create cross-version extensions | ||
149 | 21:43 <Denis> thanks caleb for sharing, I will use the first one even if I found it the worse one | ||
150 | 21:44 <Denis> the second one looks more functional check, but depends a syntax… there is probably a third way :) | ||
151 | 21:45 <cjd> second one depends on the default toString() of document references | ||
152 | 21:45 <cjd> which is not specified (even though IMO it really should be) | ||
153 | 21:59 <gdelhumeau> has quit | ||
154 | 22:36 <OSIMasson> has joined #xwiki | ||
155 | 23:08 <woshilapin> has joined #xwiki | ||
156 | 23:29 <sorinello_> has joined #xwiki | ||
157 | 23:32 <sorinello> has quit | ||
158 | 23:47 <sorinello__> has joined #xwiki | ||
159 | 23:48 <sorinello_> has quit |