Last modified by Vincent Massol on 2015/09/09 23:49

Show last authors
1 <debajit> has joined #xwiki
2 00:10 <abusenius_> has quit
3 01:35 <debajit> has quit
4 02:36 <OSIMasson> has joined #xwiki
5 03:49 <Denis> has joined #xwiki
6 04:11 <cpe> has quit
7 04:12 <cpe> has joined #xwiki
8 04:25 <Denis> has quit
9 06:49 <Ramona1> has joined #xwiki
10 06:58 <msmeria> has joined #xwiki
11 07:46 <vmassol> has joined #xwiki
12 07:53 <Ramona1> has quit
13 07:53 <Ramona1> has joined #xwiki
14 08:32 <vmassol> has quit
15 08:33 <KermitTheFragger> has joined #xwiki
16 09:01 <gsmeria> has joined #xwiki
17 09:10 <Ramona1> has quit
18 09:12 <Ramona1> has joined #xwiki
19 09:17 <mflorea> has joined #xwiki
20 09:17 <woshilapin> has joined #xwiki
21 09:18 <tmortagne> has joined #xwiki
22 09:19 <Denis> has joined #xwiki
23 09:33 <vmassol> has joined #xwiki
24 09:36 <spawn57> has joined #xwiki
25 09:38 <spawn57> hi, I created an app using app within minutes, and it shows me a page using a form view.
26 09:38 <vmassol> good morning everyone
27 09:38 <spawn57> however I can't see that content when I use $doc.getRenderedContent(). I notice that share email script using the same method to generate an email
28 09:39 <spawn57> hi vmassol
29 09:39 <vmassol> spawn57: wdym? the homepage of the app that was generated doesn't display correctly?
30 09:39 <spawn57> no, I'm writing a script to send an email
31 09:40 <spawn57> where the message has the content of the page
32 09:40 <vmassol> what's the relationship with AWM?
33 09:40 <spawn57> I'm trying to get the content of a page generated by the AWM.
34 09:41 <vmassol> basically you're writing sharepage by email, right?
35 09:41 <spawn57> yes, exactly, but a with a few customizations
36 09:41 <vmassol> btw does it work if you share your AWM page by email using the standard share button?
37 09:41 <spawn57> sorry for not being clear
38 09:41 <spawn57> yes it does
39 09:42 <spawn57> I can't seem to get the content from the object attached to the page using getRenderContent
40 09:42 <vmassol> yes $doc.getRenderedContent() will render the page content in view mode
41 09:42 <vmassol> getRenderedContent() renders the content of the page
42 09:42 <spawn57> how does the share by email get all the content from the object then :O
43 09:42 <vmassol> basically it does the same as when you view the page
44 09:42 <vmassol> it doesn't
45 09:42 <vmassol> the page content has script
46 09:43 <spawn57> oh really?
47 09:43 <vmassol> that script executes
48 09:43 <vmassol> and does whatever it does
49 09:43 <vmassol> it could extract data from xobjects, call apis, etc
50 09:44 <spawn57> where is this script?
51 09:44 <vmassol> go to a page and edit it
52 09:44 <vmassol> and if you don't see anything you need to understand the concept of sheets, see http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module
53 09:45 <spawn57> ok
54 09:45 <vmassol> each page is responsible for displaying its content
55 09:46 <spawn57> when I edit it, it goes into...inline form ..mode?
56 09:46 <vmassol> edit in wiki mode
57 09:46 <vmassol> (see http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing )
58 09:47 <spawn57> oh I see what you mean
59 09:47 <spawn57> the code to display is in the class sheet...
60 09:48 <vmassol> yes
61 09:48 <vmassol> (probably, I don't know your page)
62 09:49 <spawn57> ok
63 09:50 <spawn57> so a page from awm, is using a class sheet to display the document..
64 09:50 <vmassol> I don't know AWM well, not sure
65 09:51 <vmassol> but possibly
66 09:53 <spawn57> hmm ok
67 09:54 <vmassol> so 11 issues to kill today :)
68 09:55 <vmassol> (I'll be in a meeting the whole morning, starting in 5 minutes)
69 09:59 <spawn57> damn
70 09:59 <spawn57> enjoy
71 10:02 <vmassol> :)
72 10:02 <vmassol> cannot say it's enjoyable but it has to be done
73 10:02 <vmassol> bbiab
74 10:26 <gdelhumeau> has joined #xwiki
75 10:26 <Slashman> has joined #xwiki
76 10:48 <Ramona1> has quit
77 10:49 <Ramona1> has joined #xwiki
78 11:22 <Slashman> has quit
79 11:40 <ClemensR> has joined #xwiki
80 11:46 <Slashman> has joined #xwiki
81 11:51 <Enygma`> has joined #xwiki
82 11:52 <evalica> has joined #xwiki
83 12:45 <Ramona1> has quit
84 12:58 <spawn57> hi, is there a way to render convert a wiki2.0 string into html using velocity code?
85 13:01 <tmortagne> spawn57: you have an example in http://extensions.xwiki.org/xwiki/bin/view/Extension/Rendering+Module of how to parse a string in a syntax and render it in another
86 13:01 <tmortagne> at the end
87 13:02 <spawn57> thanks
88 13:02 <tmortagne> it's also what is done by $doc.getRenderingContent() when you document content is xwiki/2.0 syntax for example
89 13:03 <tmortagne> *getRenderedContent
90 13:03 <tmortagne> except that it also execute transformations
91 13:10 <spawn57> I tried that but it won't render the object that's attached to the page
92 13:10 <spawn57> trying to replicate the share by email feature
93 13:11 <spawn57> but when there's an object attached to the page ..getRenderingContent() won't render it. But it's a page created using AppWithinMinutes so the object is displayed inline when I view the page
94 13:13 <ClemensR> is the view uses a special template, the "content" of the page is empty (you can check that in the wiki editor) - so this is exactly what you get
95 13:13 <spawn57> yup, I understand that completely
96 13:14 <Denis> has quit
97 13:15 <spawn57> dammit, I tried rendering from xwiki/2.1 to html/4.01, but it's empty
98 13:18 <spawn57> is there something wrong with this line? ---> #set ($htmlValue = $services.rendering.render($xdom, "html/4.01"))
99 13:19 <ClemensR> is there anything in the xdom ?
100 13:20 <spawn57> I can't tell, but It's not null...
101 13:20 <spawn57> ..is there a way to see it?
102 13:23 <ClemensR> you can check with the javadoc: http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/rendering/xwiki-rendering-api/7.1.2/xwiki-rendering-api-7.1.2-javadoc.jar/!/index.html ... look into the org.xwiki.rendering.block
103 13:24 <ClemensR> the "Block" interface ith the API you might me most inters. (the XDOM in a block)
104 13:24 <ClemensR> and it has eg. xdom.getChildren().size()
105 13:27 <spawn57> let me try that
106 13:28 <spawn57> yeah it's giving numbers
107 13:28 <ClemensR> using the traversal methods like "getBlocks(BlockMatcher matcher, Block.Axes axes)" is somewhat impossible in velocity, so there are string based alternatives like #foreach($headerBlock in $doc.getDocument().getXDOM().getBlocks('class:HeaderBlock', 'DESCENDANT')) - get all HeaderBlocks in the current xdom
108 13:28 <spawn57> damn, that's complicated for me now
109 13:28 <spawn57> hmm
110 13:28 <ClemensR> hm, then it is odd that the xdom is not empty, but the html is ...
111 13:29 <spawn57> unless there's bad syntax..
112 13:29 <ClemensR> it would display a literal "$services.rendering.render($xdom, "html/4.01")" then, I think
113 13:30 <spawn57> dammit
114 13:31 <ClemensR> maybe add more debugging like "#foreach($child in $xdom.getChildren()) $child.class #end or the like
115 13:32 <spawn57> shows things like class org.xwiki.rendering.block.ParagraphBlock
116 13:32 <ClemensR> anyway, to display the stuff normally shown on the page, usually it is $doc.getRenderedContent() ... and this displays the objects in the sheet instead of the page content, as it is for "App within Minutes" pages
117 13:33 <spawn57> one of them was...empty.. but the size is one. I thin the content for that is "red"
118 13:33 <ClemensR> hm, ok, yes, to the content contains paragraphs ... admittedly what is to be expected if there is content
119 13:34 <spawn57> damn...wonder what's wrong then
120 13:34 <ClemensR> content is then child of the ParagraphBlock ... should contains word blocks and such
121 13:36 <spawn57> I wonder why share page by email is able to use $doc.getRenderedContent() and I can't
122 13:36 <spawn57> that would save me a whole world of trouble
123 13:36 <ClemensR> yeah, why cann't you? what is the problem when you try to use it?
124 13:39 <vmassol> has quit
125 13:40 <spawn57> oh, I'm trying to use it on with a page that has an object, one that was generated using AppWithinMinutes. like yousaid that it earlier,....it's getRenderedContent is suppose to be empty if I try to do that
126 13:40 <spawn57> btw, I just tried renderiung a simple xwiki syntax line like **red** and it doesn't work
127 13:41 <ClemensR> hm, then "share by email" should not work with AWM-pages either, let me check ...
128 13:42 <spawn57> ...infact it didn't evaluate $services.rendering.render($xdom, "html/4.01") too
129 13:43 <spawn57> I tried it with AppWithinMinutes, share by email renders the page fine
130 13:43 <spawn57> and sends it via email fine
131 13:44 <ClemensR> yeah, I see, and can reproduce: #set ($xdom = $services.rendering.parse("some **bold** content", "xwiki/2.1")) $services.rendering.render($xdom, "html/4.01") .... shows explicit the velocity code
132 13:46 <spawn57> what's wrong then?
133 13:46 <spawn57> hmm
134 13:46 <spawn57> I have to get going now, but can you open an issue, or email me if you find out what to do?
135 13:46 <ClemensR> oh, yeah, of course ... it is "xhtml/1.0" as output syntax
136 13:46 <spawn57> that will work?
137 13:46 <ClemensR> not "html/4.01" - the corresponding renderer is deprected and seemingly removed
138 13:46 <ClemensR> works for me then
139 13:47 <spawn57> zomg
140 13:47 <spawn57> that works for me too
141 13:47 <spawn57> let me add it to my script
142 13:47 <spawn57> oh really? time to update that wiki page and docs then
143 13:48 <spawn57> oh wow
144 13:49 <ClemensR> yep, you can check with $services.rendering.getAvailableRendererSyntaxes() which syntaxes are available
145 13:50 <ClemensR> "html/4.01" is still available as a *parser*, however, so the example code still works
146 13:51 <ClemensR> it must be supported, as that is what is produced by the wysiwyg editor
147 13:52 <spawn57> I see
148 13:52 <spawn57> alright, I got my script working
149 13:52 <spawn57> thanks so much
150 13:52 <ClemensR> glad it works :)
151 13:53 <Denis> has joined #xwiki
152 14:23 <vmassol> has joined #xwiki
153 14:25 <Ramona1> has joined #xwiki
154 15:03 <Denis> has quit
155 15:07 <Denis> has joined #xwiki
156 15:08 <msmeria> has quit
157 15:27 <Chuguniy> has joined #xwiki
158 15:35 <OSIMasson> has quit
159 15:55 <gsmeria> has left #xwiki
160 16:00 <vmassol> tmortagne: did you see this: http://ci.xwiki.org/job/xwiki-platform/org.xwiki.platform$xwiki-platform-extension-handler-xar/1815/testReport/org.xwiki.extension.xar.internal.handler/XarExtensionHandlerTest/testUninstallFromWiki/ ?
161 16:01 <vmassol> (lots of XarExtensionHandlerTest tests are failing ATM)
162 16:03 <vmassol> Enygma`: hmm seems we don't have screenshots anymore on CI
163 16:03 <vmassol> for ex: http://ci.xwiki.org/job/xwiki-platform/org.xwiki.platform$xwiki-platform-administration-test-tests/1816/testReport/org.xwiki.administration.test.ui/CreatePageTest/createPageWhenNoTemplateAvailable/
164 16:15 <OSIMasson> has joined #xwiki
165 16:22 <tmortagne> vmassol: there has been any change in XAR module, looks like something like a dependency changed since the cause is that it can't find some SecurityCacheRulesInvalidator component anymore
166 16:23 <tmortagne> some deep dependency of the security module
167 16:25 <Denis> of the security bridge to be precise
168 16:30 <tmortagne> Denis: not exactly it's a dependency of DefaultSecurityCacheLoader which is in the API
169 16:31 <tmortagne> I guess the security bridge used to end up in XAR handler test classloader trough some dependency and it's been removed
170 16:31 <Denis> oh, yes, you're right, this is the interface
171 16:31 <tmortagne> looks like xwiki-platform-localization-source-wiki have the same issue
172 16:32 <Denis> implemented by the bridge
173 16:32 <tmortagne> and probable various others too
174 16:32 <tmortagne> but not sure what changed exactly
175 16:33 <Denis> there is no reason to depend on the bridge in fact, it just need to be there when you want to use the API, that looks weird
176 16:34 <tmortagne> Denis: the authorization manager is injected
177 16:34 <tmortagne> so it need all its dependencies when the component is initialized
178 16:35 <tmortagne> and one of its dependencies inject a SecurityCacheRulesInvalidator component so it needs to find one
179 16:35 <tmortagne> looking at commits from yesterday
180 16:35 <tmortagne> since its been broken yesterday
181 16:41 <tmortagne> actually no
182 16:41 <tmortagne> looks like we lost all build between Aug 19 and Sep 8
183 16:41 <tmortagne> so can be anywhere after Aug 19 actually
184 16:42 <Denis> Sure, you need the bridge at runtime, or a mock of it, but you never depends on it.
185 16:42 <tmortagne> and nobody depends on it
186 16:43 <tmortagne> but DefaultSecurityCacheLoader inject SecurityCacheRulesInvalidator so it have to find an implementation somewhere
187 16:43 <Denis> yes, the loader need to tell the invalidator to stop operation during loading time
188 16:44 <tmortagne> yes that I understood...
189 16:44 <tmortagne> I'm not asking how its working, obviously the bridge (or at least SecurityCacheRulesInvalidator implementation) used to be in the classpath and is not anymore
190 16:44 <tmortagne> that's what changed
191 16:44 <Denis> so, if someone use a real AuthorizationManager, of course it will end up requiring the invalidator
192 16:46 <tmortagne> DefualtAuthorizationManager is provided by the api module
193 16:47 <tmortagne> no code/test is explicitely asking to use "a real authorization manager", it simply used to not cause any issue to test a component require authorization manager with @AllComponents
194 16:53 <tmortagne> very weird, I don't see the security bridge anywhere in 7.2M3 pom dependency tree
195 16:54 <tmortagne> hmm I think I know
196 16:55 <tmortagne> MockitoOldcoreRule used to force mocking AuthorizationManager and looks like it accept the real one if already registered now
197 16:55 <tmortagne> looking
198 17:06 <Denis> yes, if I well remember it mocks both auth manager, since you will need oldcore if you were to be using the bridge
199 17:07 <KermitTheFragger> has quit
200 17:10 <tmortagne> was missing some comment to explain it was forcing them mock on purpose :)
201 17:14 <vmassol> fixing one build issue
202 17:14 <vmassol> caused by evalica ;) hehe
203 17:15 <vmassol> evalica: I was worried it could happen when I saw your commit
204 17:15 <vmassol> basically you changed Document -> Page but didn' t update the tests
205 17:16 <Ramona1> has quit
206 17:16 <vmassol> fixing one place but there may be more
207 17:17 <evalica> vmassol: thanks for fixing it
208 17:17 <vmassol>
209 17:18 <vmassol> evalica: I didn't check if you changed the 2 translations
210 17:18 <vmassol> (hope you did :))
211 17:18 <vmassol> re @FindBy(xpath = "//a[@class = 'secondary button' and normalize-space(.) = 'Change the target document']") it's in CopyOverwritePromptPage
212 17:19 <vmassol> could you check if you changed that text?
213 17:20 <evalica> I did changed that text
214 17:20 <vmassol> ok fixing the test then
215 17:22 <ClemensR> has left #xwiki
216 17:23 <vmassol> checking elsewhere now
217 17:24 <vmassol> using intellij super cool structural search
218 17:24 <vmassol> to look for "document" inside all strings
219 17:31 <vmassol> evalica: have you changed the share page email title?
220 17:31 <vmassol> assertEquals("superadmin wants to share a document with you", mimeMessage.getSubject());
221 17:32 <tmortagne> all missing security components related failing tests should be ok now
222 17:32 <vmassol> cool thanks tmortagne
223 17:32 <evalica> vmassol: I don't think I've change the share page message
224 17:32 <vmassol> so it was a change to mockitooldcore?
225 17:34 <vmassol> evalica: I also see in AllDocsTest this: assertTextPresent("The document has been deleted.");
226 17:34 <evalica> vmassol: the docum.. has been deleted = yes
227 17:35 <vmassol> ok updating
228 17:35 <vmassol> what about this one:
229 17:35 <vmassol> assertEquals("testCreateGroupWhenGroupAlreadyExists cannot be used for the "
230 17:35 <evalica> regarding share: I've changed translations form share, but not that one exactly. It might be computed somehow
231 17:35 <vmassol> it's not that one exactly evalica
232 17:35 <vmassol> since the user name is computed
233 17:36 <vmassol> "…wants to share a document with you"
234 17:36 <evalica> yes .. sure, but nothing with "wants to share a"
235 17:36 <vmassol> ok
236 17:36 <tmortagne> vmassol: authorization manager used to be forced mocked and I changed that to test it and did not remembering why I forced it
237 17:36 <tmortagne> there is proper comment now :)
238 17:36 <vmassol> tmortagne: ok
239 17:36 <evalica> vmassol: group ..with this name already exists." = yes
240 17:36 <vmassol> ok
241 17:36 <vmassol> fixing
242 17:37 <vmassol> what about:
243 17:37 <vmassol> private static final String OVERWRITE_PROMPT1 = "Warning: The document ";
244 17:38 <vmassol> prompt1
245 17:38 <evalica> vmassol: "already exists. Are you sure you want to overwrite it" = yes
246 17:38 <vmassol> it's "Warning: The page " right?
247 17:39 <evalica> The page {0} already exists. Are you sure you want to overwrite it (all its content would be lost)?
248 17:39 <vmassol> ok
249 17:39 <vmassol> editor.waitForNotificationErrorMessage("Failed to save the document.");
250 17:39 <vmassol> ?
251 17:39 <evalica> Failed to save the page. Reason: {0}
252 17:41 <vmassol> ok done
253 17:41 <vmassol> there are probably some more but we need to monitor the CI tests
254 17:42 <evalica> k - thank you
255 18:26 <mflorea> has quit
256 18:43 <evalica> has quit
257 18:43 <OSIMasson> has quit
258 18:48 <Enygma`> has quit
259 19:05 <vmassol> has quit
260 19:13 <woshilapin> has quit
261 19:28 <tmortagne> has quit
262 20:02 <Slashman> has quit
263 20:03 <gdelhumeau> has quit
264 20:27 <Denis> has quit
265 20:27 <Denis> has joined #xwiki
266 20:28 <OSIMasson> has joined #xwiki
267 20:38 <Denis> has quit
268 22:11 <vmassol> has joined #xwiki
269 22:21 <vmassol> nice only 4 issues remaining for RC1 :)
270 22:35 <Denis> has joined #xwiki
271 22:51 <Chuguniy> has quit
272 23:09 <vmassol> has quit
273 23:27 <MasterPiece> has joined #xwiki
274 23:40 <Denis> has quit
275 23:49 <Chuguniy> has joined #xwiki

Get Connected