IRC Archive for channel #xwiki on 09 October 2015

Last modified by Vincent Massol on 2015/10/09 22:54

<Denis1> has joined #xwiki
06:04 <Denis> has quit
06:53 <zzeroo> has joined #xwiki
07:16 <Ramona> has joined #xwiki
07:44 <woshilapin> has quit
07:54 <woshilapin> has joined #xwiki
07:58 <woshilapin> has quit
08:00 <sdumitriu> has quit
08:04 <msmeria> has joined #xwiki
08:11 <vmassol> has joined #xwiki
08:16 <sdumitriu> has joined #xwiki
08:35 <zzeroo> has quit
08:49 <vmassol> has quit
09:00 <KermitTheFragger> has quit
09:03 <KermitTheFragger> has joined #xwiki
09:04 <zzeroo> has joined #xwiki
09:05 <tmortagne> has joined #xwiki
09:25 <spawn57> has joined #xwiki
09:28 <Ramona2> has joined #xwiki
09:28 <Ramona> has quit
09:28 <cjd> has joined #xwiki
09:38 <woshilapin> has joined #xwiki
10:16 <spawn57> are there any replacements for the methods doc.getContentOfSection and doc.updateDocumentSection?
10:21 <tmortagne> spawn57: why do you want a replacement ? they don't seems to be deprecated
10:23 <spawn57> I'm trying to create a document by copying a template and replacing some placeholder content.
10:23 <spawn57> replacing content in a specific section seems better than replacing it in the whole document...
10:31 <tmortagne> spawn57: I still don't understand why you are searching for some new version of doc.getContentOfSection and doc.updateDocumentSection, again they are not deprecated so you can use them
10:32 <spawn57> oh.
10:33 <spawn57> in the template, I have a section where I add placeholder content.  e.g. =Section 2= <content goes here> ..and I have a script where I take the template and replace the content in section 2 with some data from  I got from JIRA.
10:35 <spawn57> Also I don't see doc.getContentOfSection in the scripting documentation anymore ...!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FDocument.html
10:36 <tmortagne> Those methods are in protected API, not public scripting API. Where did you saw reference of them ?
10:36 <tmortagne> (ie.e they are in XWikiDocument and not api.Document)
10:37 <tmortagne> you can use them if you have programming right
10:37 <Slashman> has joined #xwiki
10:37 <tmortagne> the only alternative as far as I can see is to get the document XDOM, search for the SectionBlock, modify it and then call setContent(XDOM)
10:44 <spawn57> I see
10:44 <spawn57> i saw'em here!/com/xpn/xwiki/api/DocumentSection.html#DocumentSection(int, int, java.lang.String, java.lang.String)
10:44 <spawn57> sorry, I saw them here!/com/xpn/xwiki/doc/XWikiDocument.html#getContentOfSection(int)
10:46 <tmortagne> you can access XWikiDocument instance using $doc.document
10:46 <tmortagne> spawn57
10:46 <spawn57> ah
10:46 <spawn57> let me try that
10:47 <tmortagne> see!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FDocument.html%23getDocument%28%29
10:47 <tmortagne> if you don't have the right to use it you will get null
10:48 <spawn57> ..I'm coding in groovy atm
10:49 <spawn57> dammit.
10:49 <spawn57> doc.getDocument is returning null.
10:51 <tmortagne> it's impossible to not have programming right in groovy
10:51 <mflorea> has joined #xwiki
10:51 <tmortagne> otherwise it would not even execute the Groovy code
10:52 <tmortagne> doc.getDocument() will give you the XWikiDocument for sure
10:56 <spawn57> let me try again
10:57 <tmortagne> mflorea: Hi
10:58 <tmortagne> I added a comment to your last commit about Solr
10:58 <mflorea> let me see
10:59 <mflorea> indeed, I'll remove it
10:59 <spawn57> ah, I got it!
10:59 <mflorea> thanks tmortagne
10:59 <spawn57> thanks tmortagne
10:59 <tmortagne> so many thanks :)
11:00 <mflorea> :)
11:05 <spawn57> tmortagne: got my proof of concept script working.  I know what to do now.  Thanks again!
11:07 <tmortagne> spawn57: if you end with something that could be useful to other would be great to put it on, would be just a snippet showing how to manipulate sections
11:07 <spawn57> how do I submit it?
11:08 <spawn57> nvm, I read the site and I figured out how to sumbit it really quickly
11:16 <spawn57> have a look
11:18 <tmortagne> spawn57: great thanks :)
11:18 <spawn57> np
11:24 <woshilapin> has quit
11:47 <woshilapin> has joined #xwiki
12:10 <Enygma`> has joined #xwiki
12:28 <spawn57> has quit
12:31 <cjd> tmortagne: do you know of anything which might cause .xar imports to fail (not import XWikiPreferences) on 6.0 but fixed in 6.4.4 ?
12:34 <zzeroo> save
12:35 <zzeroo> has quit
12:35 <zzeroo> has joined #xwiki
12:36 <zzeroo> has quit
12:36 <zzeroo> has joined #xwiki
12:57 <evalica> has joined #xwiki
13:14 <tmortagne> cjd: did you selected only part of the XAR for import ?
13:14 <tmortagne> hmm wait checking something
13:15 <tmortagne> yep what caused most of the import related bugs is handling of partial import but I'm pretty sure a few other bugs have been fixed between 6.0 and 6.4.4
13:16 <tmortagne> if the question is "is it possible there is bugs in 6.0" then the answer is definitely yes
13:16 <tmortagne> trying to list them so that you can look at them
13:20 <tmortagne> if what is failing is a class that already existed in the wiki then there is a also a few bugs that have been fixed in the store about property type auto refactoring
13:23 <tmortagne> cjd:
13:58 <tmortagne> mflorea: most of the currently failing test are caused my java.lang.ClassNotFoundException: solr.DataImportHandler (and prevent a lot of other tests to run)
13:59 <mflorea> I'm going to commit, I was debugging some other issue with Solr
13:59 <tmortagne> ok
13:59 <tmortagne> s/my/by/
14:01 <mflorea> done
14:12 <cjd> tmortagne: sorry was at lunch, thanks for the link although it seems your irc message was truncated
14:13 <tmortagne> cjd: it just a filter on search query "xar" and module "Filter XAR" and "Old core"
14:13 <cjd> anyway I've isolated the culpret, it's xwikipreferences
14:14 <tmortagne> what happen exactly ?
14:18 <cjd> It says "error importing" and yet shows no documents skipped and no documents with error
14:18 <cjd> XWikiPreferences is left unaltered
14:18 <cjd> *also no documents imported successfully
14:20 <gsmeria> has joined #xwiki
14:22 <cjd> nothing is written in the log
14:29 <Ramona2> has quit
14:41 <msmeria> has quit
14:42 <tmortagne> yes there is no real log in 6.0, it's hard to get details when it's failing during the XAR reading
14:42 <cjd> hm mqybe I did something bad to my wiki because I cannot even import XWikiPreferences from the xwiki-enterprise-ui-mainwiki-all-6.0.1.xar
14:43 <tmortagne> you just just select it alone it's probably because of partial import bugs I told you about
14:43 <cjd> ok how about making a .xar with only that .xml file in it ?
14:43 <cjd> is that a good way to test ?
14:43 <tmortagne> yep
14:43 <cjd> ok cool
14:43 <tmortagne> you don't even need to modify the package.xml file
14:44 <tmortagne> juste remove the pages you don't want
14:44 <cjd> I get the same error from a .xar which is dumped from another wiki, a .xar which is built using maven and a .xar which is built using my nodejs tool
14:45 <cjd> ftr I did not try the nodejs built one first, lest something in my code corrupts the db
14:46 <tmortagne> in any case if it's working in 6.4.4 it's definitely a bug
14:46 <tmortagne> note that as a workaround you can use old packager plugin to import in 6.0
14:47 <tmortagne> looks at property xwiki.action.import.xar.usewikistream property in xwiki.cfg
14:47 <cjd> ahh yeah, good thinking
14:48 <tmortagne> we had to start putting the new importer as default at some point but I made sure to make as easy as possible to keep using the old one just in case
14:49 <cjd> ftr I'm impressed with how it works when you import/export "deprecated properties" IE: objects without a corrisponding class
14:51 <cjd> Importing xwiki-enterprise-ui-mainwiki-all-6.0.1.xar: Import successful
14:51 <cjd> hmm ok
15:00 <Enygma`> has quit
15:10 <woshilapin> has quit
15:27 <cjd> well if it was any surprise, indeed with the old package plugin, the import works well
15:27 <cjd> works with a xar w/ just XWikiPreferences (and classes on which it depends), a xar with everything -> fail
15:29 <cjd> I could write a bug but I have really no clue what I'd say
15:31 <tmortagne> cjd: idn't you said it was working on 6.4.4 ?
15:31 <cjd> correct
15:31 <cjd> but I don't know just which version it started to work on obviously
15:32 <tmortagne> sure but we don't support anything older that 6.4.x branch anymore so if you create a jira issue it will be closed as cannot reproduce
15:32 <cjd> music to my ears
15:33 <cjd> Creating bugs for difficult to reproduce stuff that which requires heavy investigation != fun
15:35 <tmortagne> cjd: in your case creating the jira issue could not have been very hard: you just explain what you see and how you get there and it seems easy to reproduce in your case, you could have provided the XAR to test with
15:36 <tmortagne> s/could/would/
15:36 <tmortagne> most of the time it's more important to describe how to reproduce an issue that provide a partial analysis of it
15:37 <cjd> /nod
15:46 <tmortagne> has quit
16:25 <benedict> has quit
16:36 <Ramona> has joined #xwiki
16:41 <ansuz> has quit
16:42 <gsmeria> has quit
16:52 <OSIMasson> has joined #xwiki
17:00 <gsmeria> has joined #xwiki
17:00 <gsmeria> has joined #xwiki
17:01 <gsmeria> has left #xwiki
17:05 <Enygma`> has joined #xwiki
17:09 <mflorea> has quit
17:15 <OSIMasson> has quit
17:22 <evalica> has quit
17:30 <KermitTheFragger> has quit
17:45 <woshilapin> has joined #xwiki
17:51 <Enygma`> has quit
18:05 <woshilapin> has quit
18:22 <OSIMasson> has joined #xwiki
18:30 <vmassol> has joined #xwiki
18:40 <zzeroo> has quit
18:51 <cjd> has quit
18:57 <vmassol> has quit
19:10 <Ramona> has quit
19:10 <zzeroo> has joined #xwiki
19:34 <cjd> has joined #xwiki
19:36 <OSIMasson> has quit
19:54 <abusenius> has joined #xwiki
20:01 <zzeroo> has quit
20:27 <OSIMasson> has joined #xwiki
20:28 <Slashman> has quit
20:35 <OSIMasson> has quit
20:41 <Slashman> has joined #xwiki
21:37 <OSIMasson> has joined #xwiki
21:45 <OSIMasson> has quit
21:45 <OSIMasson> has joined #xwiki
22:01 <Slashman> has quit
22:54 <woshilapin> has joined #xwiki

Get Connected