Wiki source code of IRC Archive for channel #xwiki
Last modified by Vincent Massol on 2012/10/18 18:38
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | xwikibot joined #xwiki at 13:24 | ||
2 | xwiki-bridge - (13:28): [Vincent Massol] ok I think I covered them all, he spammed something like 20 pages | ||
3 | xwiki-bridge - (13:47): [Vincent Massol] do you think we should have a field in the registration process on xwiki.org asking why the person wants edit access? That would be step1. If we still get a lot of users then we could do step 2, which would be to send an email for validation. Or do you think it doesn't matter people keep registering on xwiki.org? (the only advantage I see is that it makes us test the scalability of users handling ;)) | ||
4 | xwiki-bridge - (13:48): [Vincent Massol] hmm we shouldn't allow creating users on concerto.xwiki.org | ||
5 | xwiki-bridge - (13:48): [Vincent Massol] (unless it's not part of the farm) | ||
6 | xwiki-bridge - (13:48): [Vincent Massol] (haven't checked) | ||
7 | xwiki-bridge - (13:49): [sdumitriu] It would be better to also delete the spammed versions from the history | ||
8 | xwiki-bridge - (13:49): [Vincent Massol] sdumitriu: yes I was wondering about this | ||
9 | xwiki-bridge - (13:49): [sdumitriu] Otherwise we still link to his site | ||
10 | xwiki-bridge - (13:49): [Vincent Massol] is that safe to do? | ||
11 | xwiki-bridge - (13:49): [sdumitriu] Yes | ||
12 | xwiki-bridge - (13:49): [Vincent Massol] ok wasn't sure we were foolproof on this | ||
13 | xwiki-bridge - (13:50): [Vincent Massol] sdumitriu: so deleting the last version will automatically do a rollback right? | ||
14 | xwiki-bridge - (13:50): [Vincent Massol] (well not rollback but same effect) | ||
15 | xwiki-bridge - (13:51): [sdumitriu] Yes | ||
16 | xwiki-bridge - (13:51): [Vincent Massol] ok then I agree it's much better | ||
17 | xwiki-bridge - (13:52): [Vincent Massol] so basically we should almost never have any rollback on xwiki.org | ||
18 | xwiki-bridge - (13:52): [Vincent Massol] (since we do that mostly for spams) | ||
19 | xwiki-bridge - (13:52): [lucaa] hi guys, do we have a way to link components to their requirements declarative? | ||
20 | xwiki-bridge - (13:52): [lucaa] as in, instead of doing | ||
21 | xwiki-bridge - (13:52): [lucaa] @Requirement("hint") | ||
22 | xwiki-bridge - (13:52): [lucaa] to configure it declarative in an XML or smth so that I can change the implementation behind without recompiling? | ||
23 | xwiki-bridge - (13:53): [Vincent Massol] btw deleting a revision doesn't send a bot events apparently | ||
24 | xwiki-bridge - (13:53): [Vincent Massol] lucaa: we do support dynamic registration of components (if that's what you mean) | ||
25 | xwiki-bridge - (13:54): [sdumitriu] http://jira.xwiki.org/jira/browse/XWIKI-1949 | ||
26 | xwiki-bridge - (13:54): [Vincent Massol] ok :) | ||
27 | xwiki-bridge - (13:54): [Vincent Massol] ah it's closed | ||
28 | xwiki-bridge - (13:54): [Vincent Massol] so? | ||
29 | xwiki-bridge - (13:55): [lucaa] no, what I mean is that if I want to change the implementation of a service which is used by a component, to be able to do that without recompiling. changing for example | ||
30 | xwiki-bridge - (13:55): [lucaa] @Requirement("xwiki") | ||
31 | xwiki-bridge - (13:55): [lucaa] to | ||
32 | xwiki-bridge - (13:55): [lucaa] @Requirement("scribo") | ||
33 | xwiki-bridge - (13:55): [lucaa] at this moment requires recompile | ||
34 | xwiki-bridge - (13:55): [Vincent Massol] you need to look it up | ||
35 | xwiki-bridge - (13:56): [Vincent Massol] and not inject it | ||
36 | xwiki-bridge - (13:56): [lucaa] by what? | ||
37 | xwiki-bridge - (13:56): [Vincent Massol] you inject the CM | ||
38 | xwiki-bridge - (13:56): [Vincent Massol] and you look up when you need it | ||
39 | xwiki-bridge - (13:56): [lucaa] yes, I look up, but what do I lookup? | ||
40 | xwiki-bridge - (13:56): [Vincent Massol] the impl you want | ||
41 | xwiki-bridge - (13:56): [Vincent Massol] cm.lookup(MyClass.class, "myhint") | ||
42 | xwiki-bridge - (13:57): [Vincent Massol] where "myhint" can be anything you want and it's dynamic | ||
43 | xwiki-bridge - (13:57): [lucaa] dynamic == I can drop whatever I want in the cp? | ||
44 | xwiki-bridge - (13:57): [lucaa] and it will be recognized | ||
45 | xwiki-bridge - (13:57): [lucaa] ? | ||
46 | xwiki-bridge - (13:57): [Vincent Massol] errr | ||
47 | xwiki-bridge - (13:57): [Vincent Massol] you're mixing stuff I think | ||
48 | xwiki-bridge - (13:57): [lucaa] I think so too | ||
49 | xwiki-bridge - (13:57): [Vincent Massol] there are 2 diffrent things | ||
50 | xwiki-bridge - (13:58): [Vincent Massol] - dynamic re the CM | ||
51 | xwiki-bridge - (13:58): [Vincent Massol] - auto-reload re the ClassLoader | ||
52 | xwiki-bridge - (13:58): [Vincent Massol] when the CM injects something with @Requirement | ||
53 | xwiki-bridge - (13:58): [Vincent Massol] it's fixed | ||
54 | xwiki-bridge - (13:58): [Vincent Massol] ie it's defined whenever the component is first looked up | ||
55 | xwiki-bridge - (13:58): [Vincent Massol] (for singletons) | ||
56 | xwiki-bridge - (13:58): [Vincent Massol] so if you want to choose dynamically the impl to run | ||
57 | xwiki-bridge - (13:59): [Vincent Massol] you need to inject the CM | ||
58 | xwiki-bridge - (13:59): [Vincent Massol] and look up the impl you need at runtime | ||
59 | xwiki-bridge - (13:59): [Vincent Massol] now re ClassLoader | ||
60 | xwiki-bridge - (13:59): [Vincent Massol] you'll need to either implement your own CL | ||
61 | xwiki-bridge - (13:59): [Vincent Massol] or put your servlet container in dev mode | ||
62 | xwiki-bridge - (13:59): [Vincent Massol] they almost all support monitoring the WEB-INF/lib directory to perform auto reload | ||
63 | xwiki-bridge - (13:59): [Vincent Massol] but this will impact perfs | ||
64 | xwiki-bridge - (13:59): [lucaa] yes, I'm mixing | ||
65 | xwiki-bridge - (13:59): [lucaa] I got it now | ||
66 | xwiki-bridge - (14:00): [lucaa] but re: | ||
67 | xwiki-bridge - (14:00): [lucaa] (02:57:27 PM) Vincent Massol: and look up the impl you need at runtime | ||
68 | xwiki-bridge - (14:00): [lucaa] I don't really care which impl I use | ||
69 | xwiki-bridge - (14:00): [lucaa] but if I change the impl, I don't want to recompile the code, I'd rather just specify it declaratively | ||
70 | xwiki-bridge - (14:01): [Vincent Massol] by impl I mean hint | ||
71 | xwiki-bridge - (14:01): [Vincent Massol] you said you want to choose the hint at runtime | ||
72 | xwiki-bridge - (14:01): [Vincent Massol] (that's what I uderstood) | ||
73 | xwiki-bridge - (14:01): [Vincent Massol] "no, what I mean is that if I want to change the implementation of a service which is used by a component, to be able to do that without recompiling. changing for example | ||
74 | xwiki-bridge - (14:01): [Vincent Massol] @Requirement("xwiki") | ||
75 | xwiki-bridge - (14:01): [Vincent Massol] to | ||
76 | xwiki-bridge - (14:01): [Vincent Massol] @Requirement("scribo") | ||
77 | xwiki-bridge - (14:01): [Vincent Massol] at this moment requires recompile" | ||
78 | xwiki-bridge - (14:02): [Vincent Massol] this doesn't require recompile if you do with lookup | ||
79 | xwiki-bridge - (14:02): [lucaa] I want to be able to change the hint, if, for example I develop another implementation and I want to change it | ||
80 | xwiki-bridge - (14:02): [lucaa] without recompiling the code that uses it | ||
81 | xwiki-bridge - (14:02): [lucaa] as we used to do before when we had all this graph in an XML | ||
82 | xwiki-bridge - (14:02): [lucaa] as I was doing when playing with apache felix osgi impl | ||
83 | xwiki-bridge - (14:03): [Vincent Massol] either I don't understand or you do: cm.lookup(class, whateverghintyouwant); | ||
84 | xwiki-bridge - (14:03): [Vincent Massol] osgi does CL reload btw | ||
85 | xwiki-bridge - (14:03): [Vincent Massol] we don't | ||
86 | xwiki-bridge - (14:03): [lucaa] nevermind, it's not that imporant | ||
87 | xwiki-bridge - (14:03): [Vincent Massol] (well we do but only for the groovy script macro for jars to load in its CL) | ||
88 | xwiki-bridge - (14:12): [tmortagne] lucaa: put the hint in the configuration | ||
89 | xwiki-bridge - (14:12): [tmortagne] and use cm.lookup(class, whateverghintyouwant); instead of automatic injection as Vincent Massol suggested | ||
90 | xwiki-bridge - (14:13): [tmortagne] cm.lookup(class, configuredHint); | ||
91 | xwiki-bridge - (14:13): [tmortagne] to get the component | ||
92 | xwiki-bridge - (14:14): [tmortagne] the other way is to have two implementation using the same hint in two different modules, then you choose which module to put in /lib folder | ||
93 | xwiki-bridge - (14:26): [lucaa] tmortagne: configuration = xwiki configuration? xwiki.cfg or smth? | ||
94 | xwiki-bridge - (14:27): [tmortagne] component configuration, xwiki.properties | ||
95 | xwiki-bridge - (14:27): [tmortagne] like we do for cache | ||
96 | xwiki-bridge - (14:27): [lucaa] ok, properties | ||
97 | xwiki-bridge - (14:27): [tmortagne] you choose in xwiki.prtoperties if you want to use jbosscache or oscache implemenattion | ||
98 | xwiki-bridge - (14:27): [lucaa] ok | ||
99 | xwiki-bridge - (14:28): [tmortagne] or the velocity macro filter | ||
100 | xwiki-bridge - (14:28): [Vincent Massol] wait | ||
101 | xwiki-bridge - (14:28): [Vincent Massol] I don't think this is correct | ||
102 | xwiki-bridge - (14:28): [Vincent Massol] we already support the ability to swap implementations | ||
103 | xwiki-bridge - (14:28): [Vincent Massol] by registering a component with the same hint | ||
104 | xwiki-bridge - (14:28): [Vincent Massol] we shouldn't care about "scribo" in XE | ||
105 | xwiki-bridge - (14:29): [Vincent Massol] nor should we care about exposing a way to override the component impl | ||
106 | xwiki-bridge - (14:29): [Vincent Massol] (since it's a default feature of the CM) | ||
107 | xwiki-bridge - (14:29): [lucaa] I assumed there are solutions, it's not that important, it's just a matter of approach, the way to operate with components | ||
108 | xwiki-bridge - (14:29): [lucaa] I know you can override | ||
109 | xwiki-bridge - (14:29): [Vincent Massol] using different hints for different impl is wrong | ||
110 | xwiki-bridge - (14:29): [Vincent Massol] a hint represents a concept | ||
111 | xwiki-bridge - (14:30): [Vincent Massol] not an impl | ||
112 | xwiki-bridge - (14:30): [Vincent Massol] "scribo" is not a concept | ||
113 | xwiki-bridge - (14:30): [tmortagne] Vincent Massol: what is a concept ? | ||
114 | xwiki-bridge - (14:30): [Vincent Massol] tmortagne: for ex "current" in a Resolver | ||
115 | xwiki-bridge - (14:30): [tmortagne] i don't see what's wrong with cache and it's different implementations | ||
116 | xwiki-bridge - (14:30): [Vincent Massol] you can have several implementations of it | ||
117 | xwiki-bridge - (14:31): [Vincent Massol] tmortagne: yes but only if you need several of them at the *same* time | ||
118 | xwiki-bridge - (14:31): [tmortagne] IMO the question is only if you want to be able to change by configuration | ||
119 | xwiki-bridge - (14:32): [Vincent Massol] I'm strongly ?1 for using that for annotations unless someone explained why we need it | ||
120 | xwiki-bridge - (14:32): [lucaa] xwiki and scribo was just an example, it's not really the case as I have solutions | ||
121 | xwiki-bridge - (14:32): [Vincent Massol] otherwise this would mean we would do the same for all components | ||
122 | xwiki-bridge - (14:32): [Vincent Massol] hundreds of them | ||
123 | xwiki-bridge - (14:32): [tmortagne] Vincent Massol: I just listen technical possibilities with componenet, annotation is different | ||
124 | xwiki-bridge - (14:32): [Vincent Massol] I know | ||
125 | xwiki-bridge - (14:33): [lucaa] Vincent we need to talk I don't understand your -1, and I feel I need to | ||
126 | xwiki-bridge - (14:33): [lucaa] can I call you? | ||
127 | xwiki-bridge - (14:33): [Vincent Massol] sure | ||
128 | xwiki-bridge - (14:33): [tmortagne] if it's only about haveing a different implementation depending of the application in which it's running yes it should not be hints | ||
129 | xwiki-bridge - (14:33): [Vincent Massol] (yes that's how I understood it) | ||
130 | xwiki-bridge - (14:35): [tmortagne] like we do for rendering with the linklabelgenerator or WikiModel componenets | ||
131 | xwiki-bridge - (14:53): [lucaa] for all: ok, we cleared that out, I won't be doing anything bad on annotations and I also have my answers about what you can and what you can't do | ||
132 | xwiki-bridge - (15:12): [glerouge] it was spam, I removed ti | ||
133 | xwiki-bridge - (15:12): [glerouge] however the bot is wrong, I removed the objectss | ||
134 | xwiki-bridge - (15:12): [glerouge] I'm also deleting the user account | ||
135 | xwiki-bridge - (15:12): [Vincent Massol] ok the new rule is to remove the revisions | ||
136 | xwiki-bridge - (15:12): [Vincent Massol] (that was for glerouge) | ||
137 | xwiki-bridge - (15:12): [glerouge] lol, I'm too late | ||
138 | xwiki-bridge - (15:12): [Vincent Massol] no | ||
139 | xwiki-bridge - (15:13): [Vincent Massol] doing it now | ||
140 | xwiki-bridge - (15:13): [glerouge] I meant to delete the profile, you did it just before I could | ||
141 | xwiki-bridge - (15:13): [Vincent Massol] nope not me | ||
142 | xwiki-bridge - (15:43): [silviar] glerouge actually deleted the page, but the message says Vincent deleted it. I get this every time i remove a document. | ||
143 | xwiki-bridge - (15:44): [Vincent Massol] silviar; yes would be great to fix this bug | ||
144 | xwiki-bridge - (15:46): [tmortagne] i think it just need | ||
145 | xwiki-bridge - (15:46): [tmortagne] blankDoc.setAuthor(context.getUser()); | ||
146 | xwiki-bridge - (15:46): [tmortagne] blankDoc.setContentAuthor(context.getUser()); | ||
147 | xwiki-bridge - (15:46): [tmortagne] in XWiki#deleteDocument when we generate a XWikiDocument to send to ObservationbManager | ||
148 | xwiki-bridge - (15:49): [Vincent Massol] tmortagne: sounds good. Indeed I don't see the author/contentauthor set | ||
149 | xwiki-bridge - (15:49): [tmortagne] hmm the IRC bot seems to use contex.user anyway so i'm not sure it would fix the IRC issue | ||
150 | xwiki-bridge - (15:49): [tmortagne] } else if (event instanceof DocumentDeleteEvent) { | ||
151 | xwiki-bridge - (15:49): [tmortagne] author = context.user | ||
152 | xwiki-bridge - (15:49): [tmortagne] action = "deleted" | ||
153 | xwiki-bridge - (15:49): [tmortagne] } | ||
154 | xwiki-bridge - (15:50): [tmortagne] so i don't understand why the user is wrong | ||
155 | xwiki-bridge - (15:50): [tmortagne] in teh message | ||
156 | xwiki-bridge - (15:51): [Vincent Massol] btw using the context user is probably not the best | ||
157 | xwiki-bridge - (15:51): [tmortagne] yes but it should work | ||
158 | xwiki-bridge - (15:51): [tmortagne] in this case | ||
159 | xwiki-bridge - (15:51): [Vincent Massol] right | ||
160 | xwiki-bridge - (15:51): [Vincent Massol] I still think your change is good | ||
161 | xwiki-bridge - (15:52): [tmortagne] sure my change is for the general issue in standard | ||
162 | xwiki-bridge - (15:52): [Vincent Massol] but not enough apparently I agree | ||
163 | xwiki-bridge - (15:52): [Vincent Massol] maybe the context user is set during a delete somehow | ||
164 | xwiki-bridge - (15:52): [tmortagne] i doubt that | ||
165 | xwiki-bridge - (15:52): [tmortagne] would be a security issue | ||
166 | xwiki-bridge - (15:53): [tmortagne] or at least it's not done on purpose | ||
167 | xwiki-bridge - (15:55): [tmortagne] would need to be debugged | ||
168 | xwiki-bridge - (15:55): [tmortagne] do we have jira issue for it ? | ||
169 | xwiki-bridge - (15:55): [Vincent Massol] I don't recall any | ||
170 | arkub left at 16:10 (Read error: 60 (Operation timed out) | ||
171 | Enygma` left at 17:16 (Read error: 110 (Connection timed out) | ||
172 | xwiki-bridge - (17:23): [mflorea] Vincent Massol, tmortagne: re macro i18n, I'm thinking to translate the macro and parameter descriptors on the server, using the localization component, before sending them to the WYSIWYG editor. | ||
173 | xwiki-bridge - (17:23): [Vincent Massol] mflorea: the localization component doesn't exist yet | ||
174 | xwiki-bridge - (17:23): [Vincent Massol] that's the reason why we asked you for this quickfix | ||
175 | xwiki-bridge - (17:23): [mflorea] there is one in platform core, I guess it's not usable right now | ||
176 | xwiki-bridge - (17:23): [Vincent Massol] right it's not used and not finished | ||
177 | xwiki-bridge - (17:24): [mflorea] ok, but isn't there a way to get the translation for a key on the server side inside a component? | ||
178 | xwiki-bridge - (17:25): [mflorea] i.e. inside the XWikiMacroService which handles the request for macro and parameter descriptors | ||
179 | xwiki-bridge - (17:27): [mflorea] XWikiMacroService can translate the descriptors before sending them to the client. The WYSIWYG editor doesn't care about the language in which the macro description or parameter name is, it just displays the text. | ||
180 | xwiki-bridge - (17:28): [tmortagne] mflorea: that's the goal: translate server side before sending it to the client | ||
181 | xwiki-bridge - (17:28): [tmortagne] when we say WYSIWYG is server side WYSIWYG | ||
182 | xwiki-bridge - (17:28): [mflorea] The steps would be: 1) get the untranslated descriptors from the macro manager 2) translate them using a component (which one? I thought the localization component) 3) send the result to the server | ||
183 | xwiki-bridge - (17:28): [tmortagne] we don't know the detail | ||
184 | xwiki-bridge - (17:29): [mflorea] ok | ||
185 | xwiki-bridge - (17:29): [mflorea] then how can I get a translation inside a component? | ||
186 | xwiki-bridge - (17:29): [mflorea] because my server side is a component | ||
187 | xwiki-bridge - (17:30): [mflorea] in step 3) I meant send the result to the client, of course | ||
188 | xwiki-bridge - (17:30): [Vincent Massol] mflorea: wysiwyg module doesn't depend on xwiki-core? | ||
189 | xwiki-bridge - (17:30): [tmortagne] hmm i tough server side WYSIWYG had access to old apis | ||
190 | xwiki-bridge - (17:31): [mflorea] only a few plugins depend, like link, image and sync, the rest don't | ||
191 | xwiki-bridge - (17:31): [mflorea] the macro plugin doesn't depend on the old code. it uses only components | ||
192 | xwiki-bridge - (17:31): [tmortagne] at worst we can add some translate method in the bridge | ||
193 | xwiki-bridge - (17:32): [mflorea] yes, that would be a solution. Otherwise, I'd have to do the translation on the client | ||
194 | xwiki-bridge - (17:33): [tmortagne] translation on trhe client would be too expensive i think | ||
195 | xwiki-bridge - (17:33): [mflorea] might be, yes | ||
196 | xwiki-bridge - (17:35): [Vincent Massol] anothetr solution | ||
197 | xwiki-bridge - (17:35): [Vincent Massol] get the EC | ||
198 | xwiki-bridge - (17:35): [Vincent Massol] get the xwiki context from it | ||
199 | xwiki-bridge - (17:35): [Vincent Massol] call get() using reflection | ||
200 | xwiki-bridge - (17:35): [mflorea] :) | ||
201 | xwiki-bridge - (17:35): [Vincent Massol] it's quite easy to do and doesn't make us add a new bridge api | ||
202 | xwiki-bridge - (17:37): [tmortagne] a little more than that | ||
203 | xwiki-bridge - (17:37): [tmortagne] you have to get the MessageTool | ||
204 | xwiki-bridge - (17:37): [Vincent Massol] get("msg" | ||
205 | xwiki-bridge - (17:37): [Vincent Massol] or getMessageTool() | ||
206 | xwiki-bridge - (17:38): [Vincent Massol] it's either one reflection call or 2 | ||
207 | xwiki-bridge - (17:38): [tmortagne] safer to call getMessageTool | ||
208 | xwiki-bridge - (17:38): [Vincent Massol] does't matter much | ||
209 | xwiki-bridge - (17:38): [tmortagne] since MessageTool is lasy loaded | ||
210 | xwiki-bridge - (17:38): [tmortagne] but it's not much yes | ||
211 | xwiki-bridge - (17:39): [tmortagne] at least no need api in the bridge | ||
212 | xwiki-bridge - (17:39): [mflorea] hmm, I don't like it much. I'd rather make the translation on the client | ||
213 | xwiki-bridge - (17:40): [Vincent Massol] so you'd do several calls more right? | ||
214 | xwiki-bridge - (17:40): [Vincent Massol] doesn't sound good | ||
215 | xwiki-bridge - (17:40): [mflorea] wdym? | ||
216 | xwiki-bridge - (17:40): [tmortagne] hwo would you do that client side ? | ||
217 | xwiki-bridge - (17:40): [tmortagne] you will have to do more ajax requests, don't you ? | ||
218 | xwiki-bridge - (17:41): [mflorea] like on the server side but with the GWT api and with the WYSIWYG resource file | ||
219 | xwiki-bridge - (17:41): [mflorea] no ajax call | ||
220 | xwiki-bridge - (17:41): [tmortagne] so it's not client side the... | ||
221 | xwiki-bridge - (17:41): [tmortagne] i don't understand | ||
222 | xwiki-bridge - (17:43): [mflorea] the wysiwyg editor has its own resource file, used to translate the UI. The macro plugin can translate the macro descriptors using the same mechanism | ||
223 | xwiki-bridge - (17:43): [tmortagne] ok you mean all the possible translations are always loaded with GWT ? | ||
224 | xwiki-bridge - (17:43): [Vincent Massol] this file is on the server | ||
225 | xwiki-bridge - (17:43): [mflorea] no | ||
226 | xwiki-bridge - (17:43): [Vincent Massol] so it has to be copied to the client side I guess | ||
227 | xwiki-bridge - (17:43): [mflorea] GWT generates a JavaScript file (with the code + the translation inside) for each browser and language | ||
228 | xwiki-bridge - (17:44): [mflorea] there is a ff+en, ff+ro, ie6+en, ie6+ro, etc. | ||
229 | xwiki-bridge - (17:44): [tmortagne] I mean for one language | ||
230 | xwiki-bridge - (17:45): [tmortagne] all the translatations of one languages are loaded | ||
231 | xwiki-bridge - (17:45): [mflorea] yes | ||
232 | xwiki-bridge - (17:45): [tmortagne] even if you don't need all of them | ||
233 | xwiki-bridge - (17:45): [mflorea] yes | ||
234 | xwiki-bridge - (17:45): [tmortagne] I have to go, back in 1h (I hope) | ||
235 | xwiki-bridge - (17:45): [mflorea] that's a limitation indeed, but it depend on how much key do you have | ||
236 | xwiki-bridge - (17:50): [mflorea] ok, I'll go with the EC server side solution for now, while waiting for the localization component. | ||
237 | xwiki-bridge - (18:35): [mflorea] Vincent Massol: re translation keys, http://jira.xwiki.org/jira/browse/XWIKI-4745 I'm not sure if I should add a discriminator even when the entity associated with the key doesn't have, at least currently, additional information. For instance, should I use <macroCategoryId>.name or just <macroCategoryId>. In the case of <macroId> I used name because there is also description, but we can also drop the "name" a | ||
238 | xwiki-bridge - (18:35): [mflorea] place the translation directly on <macroId>. wdyt? | ||
239 | KermitTheFragger left at 18:37 ("Leaving" | ||
240 | xwiki-bridge - (19:11): [jerome.velociter] committed the new importer UI | ||
241 | xwiki-bridge - (19:11): [jerome.velociter] hope I did not break anything:) | ||
242 | xwiki-bridge - (19:13): [Vincent Massol] glurs | ||
243 | xwiki-bridge - (19:13): [Vincent Massol] glurps | ||
244 | xwiki-bridge - (19:13): [Vincent Massol] I'd rather not update then | ||
245 | xwiki-bridge - (19:13): [Vincent Massol] since I'm debugging problems everywhere with my local code | ||
246 | xwiki-bridge - (19:14): [Vincent Massol] I don't need more problems :) | ||
247 | xwiki-bridge - (19:14): [Vincent Massol] your change should be restricted to the packager package right? | ||
248 | xwiki-bridge - (19:14): [Vincent Massol] (reading the mail) | ||
249 | xwiki-bridge - (19:14): [Vincent Massol] jerome.velociter: another lib? | ||
250 | xwiki-bridge - (19:15): [jerome.velociter] yes | ||
251 | xwiki-bridge - (19:15): [Vincent Massol] don't we already do JSON (in the live table for ex) | ||
252 | xwiki-bridge - (19:15): [Vincent Massol] ? | ||
253 | xwiki-bridge - (19:15): [jerome.velociter] not from java | ||
254 | xwiki-bridge - (19:15): [jerome.velociter] not from java | ||
255 | xwiki-bridge - (19:15): [jerome.velociter] arf | ||
256 | xwiki-bridge - (19:16): [jerome.velociter] my jabber client is not cooperative :) | ||
257 | xwiki-bridge - (19:16): [jerome.velociter] note that we more or less voted for this lib when voting for the JSON tool | ||
258 | xwiki-bridge - (19:16): [jerome.velociter] (that I have not commited yet) | ||
259 | xwiki-bridge - (19:16): [Vincent Massol] missing some comment on dynamicsize macro | ||
260 | xwiki-bridge - (19:17): [jerome.velociter] (in the live table we write JSON ourselves by hand - here I transform Java objects to JSON with the lib) | ||
261 | xwiki-bridge - (19:17): [jerome.velociter] right | ||
262 | xwiki-bridge - (19:18): [Vincent Massol] typo | ||
263 | xwiki-bridge - (19:18): [Vincent Massol] + // If the request is an AJAX request, we don't the whole HTML page | ||
264 | xwiki-bridge - (19:18): [Vincent Massol] + // but just the exception inline. | ||
265 | xwiki-bridge - (19:19): [jerome.velociter] ok | ||
266 | xwiki-bridge - (19:19): [jerome.velociter] fixing | ||
267 | xwiki-bridge - (19:19): [Vincent Massol] duplicate code: | ||
268 | xwiki-bridge - (19:19): [Vincent Massol] + Utils.parseTemplate(Utils.getPage(context.getRequest(), "exceptioninline"), context); | ||
269 | xwiki-bridge - (19:19): [Vincent Massol] + } | ||
270 | xwiki-bridge - (19:19): [Vincent Massol] + else { | ||
271 | xwiki-bridge - (19:19): [Vincent Massol] + Utils.parseTemplate(Utils.getPage(context.getRequest(), "exception"), context); | ||
272 | xwiki-bridge - (19:19): [Vincent Massol] you can just pass a different string in param | ||
273 | xwiki-bridge - (19:20): [jerome.velociter] you mean the template name in param ? | ||
274 | xwiki-bridge - (19:20): [Vincent Massol] yes it would reduce the duplication a bit | ||
275 | xwiki-bridge - (19:20): [jerome.velociter] I'm not a big fan | ||
276 | xwiki-bridge - (19:21): [jerome.velociter] ah yes | ||
277 | xwiki-bridge - (19:21): [jerome.velociter] I see what you mean | ||
278 | xwiki-bridge - (19:21): [jerome.velociter] ok | ||
279 | xwiki-bridge - (19:21): [Vincent Massol] why do we have JSON in the packager pacager? | ||
280 | xwiki-bridge - (19:22): [Vincent Massol] s/pacager/package/ | ||
281 | xwiki-bridge - (19:22): [Vincent Massol] it doesn't look right | ||
282 | xwiki-bridge - (19:22): [Vincent Massol] json are presentation side | ||
283 | xwiki-bridge - (19:22): [Vincent Massol] s/are/is/ | ||
284 | xwiki-bridge - (19:22): [Vincent Massol] presentation layer | ||
285 | xwiki-bridge - (19:23): [jerome.velociter] not necessarly | ||
286 | xwiki-bridge - (19:24): [jerome.velociter] JSON is a data format, it's not linked to presentation | ||
287 | xwiki-bridge - (19:24): [jerome.velociter] I've put it in the packager because right now that's where the XML serialization is too | ||
288 | xwiki-bridge - (19:25): [jerome.velociter] and I did not wanted to start rewrite the whole packaging plugin | ||
289 | xwiki-bridge - (19:25): [Vincent Massol] yes that I can understand | ||
290 | xwiki-bridge - (19:25): [Vincent Massol] :) | ||
291 | xwiki-bridge - (19:29): [jerome.velociter] fixed typo + duplication | ||
292 | xwiki-bridge - (19:30): [Vincent Massol] sdumitriu: do you have any knowlegde on how custom mapping works ? | ||
293 | xwiki-bridge - (19:30): [Vincent Massol] I'm trying to debug a pb but I'm failing | ||
294 | xwiki-bridge - (19:31): [jerome.velociter] what's your issue ? | ||
295 | xwiki-bridge - (19:31): [Vincent Massol] the XWiki.XWikiPreferences object is not loaded properly | ||
296 | xwiki-bridge - (19:31): [Vincent Massol] the field values are null | ||
297 | xwiki-bridge - (19:31): [Vincent Massol] (this is definitely caused by a local change I have but I don't see where) | ||
298 | xwiki-bridge - (19:31): [Vincent Massol] the code is in hibernate store: | ||
299 | xwiki-bridge - (19:32): [Vincent Massol] Session dynamicSession = session.getSession(EntityMode.MAP); | ||
300 | xwiki-bridge - (19:32): [Vincent Massol] Object map = dynamicSession.load(bclass.getName(), new Integer(object.getId())); | ||
301 | xwiki-bridge - (19:32): [Vincent Massol] the map has all the keys but the values are null | ||
302 | xwiki-bridge - (19:33): [Vincent Massol] when I look in the hsqldb, I see that for ex for "multilingual" the value 0 is set | ||
303 | xwiki-bridge - (19:33): [Vincent Massol] (and not null) | ||
304 | xwiki-bridge - (19:34): [Vincent Massol] bclass.getName() is correct ie "XWiki.XWikiPreferences" and the object id is correct too | ||
305 | xwiki-bridge - (19:41): [Vincent Massol] tmortagne: hmmm I was wondering if setAuthor in delete event is correct or not | ||
306 | xwiki-bridge - (19:41): [Vincent Massol] I think it's missing some comments to explain it | ||
307 | xwiki-bridge - (19:42): [Vincent Massol] does it mean that we consider the deleted document as having been written by the user who's deleted it? | ||
308 | xwiki-bridge - (19:42): [Vincent Massol] (which doesn't make complete sense, does it?) | ||
309 | xwiki-bridge - (19:42): [Vincent Massol] the source document should have the author as the original one I think | ||
310 | xwiki-bridge - (19:43): [Vincent Massol] hmm unless we consider the "source" as not representing the deleted document | ||
311 | xwiki-bridge - (19:45): [Vincent Massol] sent mail o this | ||
312 | xwiki-bridge - (19:46): [Vincent Massol] s/o/on/ | ||
313 | xwiki-bridge - (19:46): [Vincent Massol] jerome.velociter: so no idea re custom mapping question? :) | ||
314 | xwiki-bridge - (19:46): [tmortagne] the new document has been created by the user who deleted the document | ||
315 | xwiki-bridge - (19:47): [tmortagne] there is the old document and the new document | ||
316 | xwiki-bridge - (19:47): [Vincent Massol] there's no new doc | ||
317 | xwiki-bridge - (19:47): [Vincent Massol] since the doc has been deleted | ||
318 | xwiki-bridge - (19:47): [tmortagne] there is in the event | ||
319 | xwiki-bridge - (19:47): [tmortagne] looks at the code | ||
320 | xwiki-bridge - (19:47): [Vincent Massol] I know | ||
321 | xwiki-bridge - (19:47): [tmortagne] in a new document | ||
322 | xwiki-bridge - (19:47): [Vincent Massol] but it doesn't make sense | ||
323 | xwiki-bridge - (19:47): [tmortagne] from event POV it's a new document | ||
324 | xwiki-bridge - (19:48): [jerome.velociter] Vincent Massol: sorry, no | ||
325 | xwiki-bridge - (19:48): [Vincent Massol] that's where I don't agree why we're doing it this way | ||
326 | xwiki-bridge - (19:48): [Vincent Massol] tmortagne: I thought we were creating a new doc simply the old one has been deleted so we recreate it | ||
327 | xwiki-bridge - (19:48): [Vincent Massol] I'd agree to pass the deleted doc copy but I don't understand why we'd pass a "new" oc | ||
328 | xwiki-bridge - (19:48): [Vincent Massol] s/oc/doc/ | ||
329 | xwiki-bridge - (19:49): [Vincent Massol] I don't see what it would represent | ||
330 | xwiki-bridge - (19:49): [Vincent Massol] I think we need either to: | ||
331 | xwiki-bridge - (19:49): [jerome.velociter] Vincent Massol: what does BaseClass#iisValidCustomMapping says ? | ||
332 | xwiki-bridge - (19:49): [Vincent Massol] 1) pass a different data structure | ||
333 | xwiki-bridge - (19:49): [Vincent Massol] or | ||
334 | xwiki-bridge - (19:49): [Vincent Massol] 2) use the extra data param | ||
335 | xwiki-bridge - (19:49): [jerome.velociter] isCustomMappingValid sorry | ||
336 | xwiki-bridge - (19:49): [Vincent Massol] (which we do by passing the context) | ||
337 | xwiki-bridge - (19:49): [tmortagne] the source document is the current document, the old document in is in doc.originaldoc | ||
338 | xwiki-bridge - (19:49): [Vincent Massol] so the current user is covered already actually | ||
339 | xwiki-bridge - (19:49): [jerome.velociter] and hasInternalCustomMapping too | ||
340 | xwiki-bridge - (19:49): [tmortagne] i don't change anything here | ||
341 | xwiki-bridge - (19:50): [tmortagne] taht how all the document events are working | ||
342 | xwiki-bridge - (19:50): [Vincent Massol] tmortagne: each event can decide what source and what extra data is passes | ||
343 | xwiki-bridge - (19:50): [Vincent Massol] I know that's what we're doing | ||
344 | xwiki-bridge - (19:50): [Vincent Massol] but I don't understand it | ||
345 | xwiki-bridge - (19:50): [Vincent Massol] we're really tweaking stuff | ||
346 | xwiki-bridge - (19:51): [Vincent Massol] and reusing fields that are not meant for this | ||
347 | xwiki-bridge - (19:51): [tmortagne] it's just a question of sending the new state of the document (empty here) and the old state | ||
348 | xwiki-bridge - (19:51): [Vincent Massol] hmm ok that makes slightly more sense said like this | ||
349 | xwiki-bridge - (19:51): [tmortagne] and no we can't change the way event is working, it breaking api | ||
350 | xwiki-bridge - (19:51): [Vincent Massol] even though it's a bit ficticious | ||
351 | xwiki-bridge - (19:52): [Vincent Massol] since there's no real new doc | ||
352 | xwiki-bridge - (19:52): [tmortagne] yes it is but its to make documents events consistent | ||
353 | xwiki-bridge - (19:52): [Vincent Massol] at the very minimum thomas could you add some comments? | ||
354 | xwiki-bridge - (19:52): [tmortagne] sure but there is already comment about why we create a new XWikiDocument i think | ||
355 | xwiki-bridge - (19:52): [tmortagne] checking | ||
356 | xwiki-bridge - (19:52): [Vincent Massol] haven't chcked, just looked at the mail | ||
357 | xwiki-bridge - (19:53): [Vincent Massol] even if there are already I'd add some re teh author/contentauthor | ||
358 | xwiki-bridge - (19:53): [tmortagne] the comment does not contain much, i will add some more in it | ||
359 | xwiki-bridge - (19:53): [Vincent Massol] ok thanks | ||
360 | xwiki-bridge - (19:53): [Vincent Massol] what did it for me waas when you explained | ||
361 | xwiki-bridge - (19:54): [Vincent Massol] that it represnted the new state | ||
362 | xwiki-bridge - (19:54): [Vincent Massol] (ie an empty document) | ||
363 | xwiki-bridge - (19:54): [Vincent Massol] I maintain that it is still slightly awkard | ||
364 | xwiki-bridge - (19:54): [Vincent Massol] :) | ||
365 | xwiki-bridge - (19:55): [Vincent Massol] since it means visualizing that deleting a doc "result" in creating a new empty doc whose author is the author who has deleted the doc | ||
366 | xwiki-bridge - (19:56): [Vincent Massol] jerome.velociter: reading | ||
367 | xwiki-bridge - (19:58): [Vincent Massol] jerome.velociter: false | ||
368 | xwiki-bridge - (20:04): [jerome.velociter] for isValidCustomMapping ? | ||
369 | xwiki-bridge - (20:05): [jerome.velociter] at what line do you break ? | ||
370 | xwiki-bridge - (20:05): [jerome.velociter] I can try on my station without your changes | ||
371 | xwiki-bridge - (20:05): [jerome.velociter] to see if it's different | ||
372 | xwiki-bridge - (20:06): [Vincent Massol] yes for isValid mapping | ||
373 | xwiki-bridge - (20:06): [Vincent Massol] I've tried calling this.makeMapping(bclass.getName(), "internal") | ||
374 | xwiki-bridge - (20:06): [Vincent Massol] and I get: | ||
375 | xwiki-bridge - (20:06): [Vincent Massol] an exception "invalid mapping" with nested exception: | ||
376 | xwiki-bridge - (20:06): [Vincent Massol] org.xml.sax.SAXParseException: The content of element type "class" must match | ||
377 | xwiki-bridge - (20:06): [Vincent Massol] "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)". | ||
378 | xwiki-bridge - (20:07): [Vincent Massol] is it supposed to return true? | ||
379 | xwiki-bridge - (20:07): [Vincent Massol] at this location I mean | ||
380 | xwiki-bridge - (20:11): [Vincent Massol] it's normal it's invalid | ||
381 | xwiki-bridge - (20:11): [Vincent Massol] protected String makeMapping(String entityName, String tableName, String custommapping1) | ||
382 | xwiki-bridge - (20:11): [Vincent Massol] { | ||
383 | xwiki-bridge - (20:11): [Vincent Massol] String custommapping = | ||
384 | xwiki-bridge - (20:11): [Vincent Massol] "<?xml version=\"1.0\"?>\n" + "<!DOCTYPE hibernate-mapping PUBLIC\n" | ||
385 | xwiki-bridge - (20:11): [Vincent Massol] + "\t\"-//Hibernate/Hibernate Mapping DTD//EN\"\n" | ||
386 | xwiki-bridge - (20:11): [Vincent Massol] + "\t\"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" + "<hibernate-mapping>" | ||
387 | xwiki-bridge - (20:11): [Vincent Massol] + "<class entity-name=\"" + entityName + "\" table=\"" + tableName + "\">\n" | ||
388 | xwiki-bridge - (20:11): [Vincent Massol] + " <id name=\"id\" type=\"integer\" unsaved-value=\"any\">\n" | ||
389 | xwiki-bridge - (20:11): [Vincent Massol] + " <column name=\"XWO_ID\" not-null=\"true\" />\n" + " <generator class=\"assigned\" />\n" | ||
390 | xwiki-bridge - (20:11): [Vincent Massol] + " </id>\n" + custommapping1 + "</class>\n" + "</hibernate-mapping>"; | ||
391 | xwiki-bridge - (20:11): [Vincent Massol] return custommapping; | ||
392 | xwiki-bridge - (20:11): [Vincent Massol] } | ||
393 | xwiki-bridge - (20:11): [Vincent Massol] and custommapping1 is "internal" | ||
394 | xwiki-bridge - (20:11): [Vincent Massol] I don't see how this can work whenever custommapping is not "" | ||
395 | xwiki-bridge - (20:12): [Vincent Massol] public String getCustomMapping() | ||
396 | xwiki-bridge - (20:12): [Vincent Massol] { | ||
397 | xwiki-bridge - (20:12): [Vincent Massol] if ("XWiki.XWikiPreferences".equals(getName())) { | ||
398 | xwiki-bridge - (20:12): [Vincent Massol] return "internal"; | ||
399 | xwiki-bridge - (20:12): [Vincent Massol] } | ||
400 | xwiki-bridge - (20:12): [Vincent Massol] | ||
401 | xwiki-bridge - (20:12): [Vincent Massol] if (this.customMapping == null) { | ||
402 | xwiki-bridge - (20:12): [Vincent Massol] return ""; | ||
403 | xwiki-bridge - (20:12): [Vincent Massol] } | ||
404 | xwiki-bridge - (20:12): [Vincent Massol] | ||
405 | xwiki-bridge - (20:12): [Vincent Massol] return this.customMapping; | ||
406 | xwiki-bridge - (20:12): [Vincent Massol] } | ||
407 | xwiki-bridge - (20:12): [Vincent Massol] so i don't see how isValid could be valid :) | ||
408 | xwiki-bridge - (20:14): [Vincent Massol] but that's probably not my pb | ||
409 | xwiki-bridge - (20:15): [Vincent Massol] tmortagne: 3 typos in | ||
410 | xwiki-bridge - (20:15): [Vincent Massol] + // Again to follow general event policy new document author the user how modified the document (here teh | ||
411 | xwiki-bridge - (20:15): [Vincent Massol] + // modification is delete) | ||
412 | xwiki-bridge - (20:15): [Vincent Massol] :) | ||
413 | xwiki-bridge - (20:16): [Vincent Massol] jerome.velociter: do you know where in the code the custom mapping is set up? | ||
414 | xwiki-bridge - (20:16): [Vincent Massol] (for XWikiPreferences) | ||
415 | xwiki-bridge - (20:17): [Vincent Massol] in loadXWikiDoc I see: | ||
416 | xwiki-bridge - (20:17): [Vincent Massol] SessionFactory sfactory = injectCustomMappingsInSessionFactory(doc, context); | ||
417 | xwiki-bridge - (20:17): [Vincent Massol] but this doesn't seem to do it | ||
418 | xwiki-bridge - (20:17): [Vincent Massol] since it contains: | ||
419 | xwiki-bridge - (20:17): [Vincent Massol] public SessionFactory injectCustomMappingsInSessionFactory(XWikiDocument doc, XWikiContext context) | ||
420 | xwiki-bridge - (20:17): [Vincent Massol] throws XWikiException | ||
421 | xwiki-bridge - (20:17): [Vincent Massol] { | ||
422 | xwiki-bridge - (20:17): [Vincent Massol] // If we haven't turned of dynamic custom mappings we should not inject them | ||
423 | xwiki-bridge - (20:17): [Vincent Massol] if (context.getWiki().hasDynamicCustomMappings() == false) { | ||
424 | xwiki-bridge - (20:17): [Vincent Massol] return getSessionFactory(); | ||
425 | xwiki-bridge - (20:17): [Vincent Massol] } | ||
426 | xwiki-bridge - (20:18): [Vincent Massol] and hasDynamicCustomMappings() is false | ||
427 | xwiki-bridge - (20:18): [tmortagne] not sure (fixing typos) | ||
428 | xwiki-bridge - (20:18): [tmortagne] two fix that was supposed to be on tw differents lines :) | ||
429 | xwiki-bridge - (20:22): [Vincent Massol] sdumitriu: any idea about all this? | ||
430 | xwiki-bridge - (20:24): [jerome.velociter] Vincent Massol: what do you mean by set up? | ||
431 | xwiki-bridge - (20:24): [Vincent Massol] actually there's no need of custom mapping for XWikiPreferences since it already has some custom table I guess | ||
432 | xwiki-bridge - (20:25): [jerome.velociter] there is a custom mapping for xwikipreferences | ||
433 | xwiki-bridge - (20:25): [Vincent Massol] and the mapping is already defined in xwiki.hbm.xml | ||
434 | xwiki-bridge - (20:25): [jerome.velociter] but it's in written down in the xwiki.hbm.xml | ||
435 | xwiki-bridge - (20:25): [jerome.velociter] yes | ||
436 | xwiki-bridge - (20:25): [Vincent Massol] still that puts me back to square 1 | ||
437 | xwiki-bridge - (20:26): [Vincent Massol] ie why would the following: | ||
438 | xwiki-bridge - (20:26): [Vincent Massol] Object map = dynamicSession.load(bclass.getName(), new Integer(object.getId())); | ||
439 | xwiki-bridge - (20:26): [Vincent Massol] not load the values from the DB | ||
440 | xwiki-bridge - (20:52): [treaki] hi, wold somebody play just one round glest (http://glest.org) with me?? please the server is treaki1.ath.cx | ||
441 | CalebJamesDeLisl joined #xwiki at 21:10 | ||
442 | xwiki-bridge - (21:27): * sdumitriu has set the subject to: XWiki Chat - http://www.xwiki.org/ | ||
443 | lucaa joined #xwiki at 21:29 | ||
444 | lucaa left #xwiki at 22:20 | ||
445 | xwiki-bridge - (22:36): [unnicked] Guten Nacht | ||
446 | user_ joined #xwiki at 22:59 | ||
447 | user_ left #xwiki at 23:00 |