[xwiki-users] Pdf export
Hi Two issues with PDF export. Might be similar to already reported issue (http://n2.nabble.com/Page-convert-PDF-error-occurs-tc3261515.html#a3261 515) But there is no advice on this issue. 1. I've tried to export all documents from my space (Scenarios) to PDF http://patternlanguagenetwork.myxwiki.org/xwiki/bin/export/Scenarios/Web Home?format=pdfincludechilds=1pagebreak=1 This didn't work as expected. Crated PDF did not contain any document content, just class property names. When exporting individually each document things seam OK, but I would like all documents from Scenario space in one PDF. 2. In a different space called Patterns even export of individual documents fails http://patternlanguagenetwork.myxwiki.org/xwiki/bin/export/Patterns/Pape r20?format=pdf Notice Wrong password Error Error number 11015 in 11: Exception while exporting Wrapped Exception: Error number 12002 in 12: Exception while exporting PDF Wrapped Exception: java.lang.IllegalArgumentException com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while exporting Wrapped Exception: Error number 12002 in 12: Exception while exporting PDF Wrapped Exception: java.lang.IllegalArgumentException at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:64) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) .. Any way of exporting a space content to PDF?? Do I need to create a PDF template? Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] viewer=code
Thanks for the response (Caleb James DeLisle and Sergiu). I am using myxwiki.org so not sure if I have access to .vm files?! I think a way of disabling viewer=code should be available ASAP. As it is not obvious (especially for new xwiki users/developers) that any code is publicly acessible and there is no clear way of hiding Groovy + Velocity code from the public (or search engines) this feature poses a great security risk. Someone unaware of this feature (like I was) and using a 3rd party API which requires authentication could easily embed and revile username/password to the whole world. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Sergiu Dumitriu Sent: 26 August 2009 22:24 To: XWiki Users Subject: Re: [xwiki-users] viewer=code Ajdin Brandic wrote: Is there an option (settings) to disable this (viewer=code) on a site? First thing to keep in mind is that any user that can *edit* documents on your wiki will always be able to retrieve the source code of documents. Now, if you want to disable the display of code to users, you should edit the following templates and add a rights check at the start: code.vm, xml.vm, changes*.vm, editwiki.vm, editwysiwyg.vm, editwysiwygnew.vm, inline.vm, plaincode.vm This snippet prevents guest access: #if($context.user == 'XWiki.XWikiGuest') #stop #end -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] viewer=code
Is there an option (settings) to disable this (viewer=code) on a site? Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] viewer=code
Lets say I'm doing some user input checking to prevent spam. Since I am using myxwiki.org service and have no access to the back end code I could have some hard coded sensitive info in my script (ie. u/p to twitter or facebook). Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Marius Dumitru Florea Sent: 26 August 2009 16:07 To: XWiki Users Subject: Re: [xwiki-users] viewer=code Hi Ajdin, Ajdin Brandic wrote: Is there an option (settings) to disable this (viewer=code) on a site? I don't know if there is a way to disable the viewer=code from the UI but I know you can prevent it by editing templates/view.vm around this line: #template(${viewer}.vm) or by renaming templates/code.vm (but that leads to a blank page which is not user friendly). Btw, why do you want to hide the code? Hope this helps, Marius Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] viewer=code
Will it show Groovy as well as Velocity code? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Marius Dumitru Florea Sent: 26 August 2009 17:18 To: XWiki Users Subject: Re: [xwiki-users] viewer=code Ajdin Brandic wrote: Lets say I'm doing some user input checking to prevent spam. Since I am using myxwiki.org service and have no access to the back end code I could have some hard coded sensitive info in my script (ie. u/p to twitter or facebook). Afaik, there is no view-code right so any user with view access is able to see the code of the page. Marius Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Marius Dumitru Florea Sent: 26 August 2009 16:07 To: XWiki Users Subject: Re: [xwiki-users] viewer=code Hi Ajdin, Ajdin Brandic wrote: Is there an option (settings) to disable this (viewer=code) on a site? I don't know if there is a way to disable the viewer=code from the UI but I know you can prevent it by editing templates/view.vm around this line: #template(${viewer}.vm) or by renaming templates/code.vm (but that leads to a blank page which is not user friendly). Btw, why do you want to hide the code? Hope this helps, Marius Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] working captcha
Edward Correct me if I'm wrong but as I mentioned in my first reply to your post a hacker can use GET method to post registration request in the URL. The hacker can set the value of register to 1 and this will pass your check and register. As you already know having incorrect captcher doesn't matter, new user still gets registered. Try GET method yourself!!! I hope I'm wrong :-( Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Edward Laptop Sent: 09 July 2009 15:22 To: XWiki Users Subject: [xwiki-users] working captcha Dear All I have spent quite a few hours playing with the captcha trying to get it to work. There were some useful posts on the new group, but none of them was a complete solution. The below has worked for me... hopefully it will prove useful to someone else. This code is taken from a fairly old xwiki that my client didn't want to upgrade. It is based around registerinline.vm, which had previously been edited to add a lot more fields. I am not an expert on OOP but got it to work with a selection of conditional statements. First declare the plugin - you have to make sure its enabled - but apparently it is by default. if ($reg)... will evaluate to true/false and if the value is negative its an error. You test the state of the captcha using $captchaPlugin.verifyCaptcha(edit) where edit is the name - set much later on. One of the problems was that the form would come back with the correct messages eg it would tell you if the captcha filled in wrong, but the new user would still be regsitered (assuming all the other fields filled in correctly). By playing I found that input type=hidden name=register value=1/ was the key - if value=1 then registration occurs, if =0 then it doesn't. So put this in a conditional - which seems to only depend on the captcha being ture/flase - which was odd, because I would ahve thought you'd want to test with $reg as well. However, I couldn't get it to work with $reg at this stage - reg=$reg usually prints out the nunber - but at this point it just printed out ref=$reg... Don't forget to put verifyCaptcha into the action of the form tag. call the displayCaptcha pass the class name as register_captcha which should map to the css classname to render the image with $captchaPlugin.displayCaptcha(edit,register_captcha) pass the name as edit go to http://host:port/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object find XWiki.XWikiPreferences[0]: XWiki.DefaultSkin select the values for Anonymous: and Registered: as image or text - text gives you a simple sum to fill in. There were 3 sets of each on mine, I set them all to imgae or all to text Anyway, back to work... ## declare the plugin #set($captchaPlugin = $xwiki.jcaptcha) #if(!$reg||$reg0 ) pWelcome ./p #end #* if reg is true (ie form filled), but less than zero OR the captcha is wrong *# #if( ($reg $reg=0) || !$captchaPlugin.verifyCaptcha(edit) ) #if($reg==-2) #error($msg.get('core.register.passwordMismatch')) #elseif($reg==-3) #error($msg.get('core.register.userAlreadyExists')) #elseif($reg==-4) #error($msg.get('core.register.invalidUsername')) #elseif($reg==-8) #error($msg.get('core.register.userAlreadyExists')) #else ##error($msg.get('core.register.registerFailed', [$reg])) #error(The captcha field was filled in wrongly.) #end #elseif($reg $captchaPlugin.verifyCaptcha(edit)) #set($xwname = XWiki.${request.xwikiname}) #info($msg.get('core.register.successful', [$xwiki.getUserName($xwname), $request.xwikiname])) #end ##form appears if reg is not true or its -ve or capatcha is wrong #if(!$reg||$reg0 || !$captchaPlugin.verifyCaptcha(edit) ) form id=register action=verifyCaptcha method=post div input type=hidden name=template value=XWiki.XWikiUserTemplate / ##this is a key statement #if ($captchaPlugin.verifyCaptcha(edit)) ##set it to 1 input type=hidden name=register value=1/ #else ##set it to 0 input type=hidden name=register value=0/ #end #set($class = $xwiki.getClass(XWiki.XWikiUsers)) #set($obj = $class.newObject()) #set($serverobj = $class.newObject()) #set($discard = $doc.use(XWiki.XWikiUsers)) #if($request.register_first_name) $doc.set(first_name, $request.register_first_name) #end #if($request.register_last_name) $doc.set(last_name, $request.register_last_name) #end dl ##username dt$msg.get(core.register.username)/dt ddinput name=xwikiname type=text size=20 onfocus= prepareName(document.forms.register); //dd ... lots more fields #if ($captchaPlugin) $captchaPlugin.displayCaptcha(edit,register_captcha) #end span class=buttonwrapperinput type=submit value=$msg.get(core.register.submit)//span/div /form #end ___ users mailing list users@xwiki.org
Re: [xwiki-users] where does the actual registration happen?
Did you get the original registration script to work (if so, HOW?) or created a bespoke one? Ajdin -Original Message- From: users-boun...@xwiki.org on behalf of Edward Laptop Sent: Wed 08/07/2009 12:55 To: XWiki Users Subject: Re: [xwiki-users] where does the actual registration happen? thanks for the reply! Believe it or not. its working! www.ee-web.co.uk edw...@ee-web.co.uk mailto:edw...@ee-web.co.uk07760 07760 392284 -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org]on Behalf Of Ajdin Brandic Sent: 08 July 2009 12:33 To: XWiki Users Subject: Re: [xwiki-users] where does the actual registration happen? I found the only way around this is to disable the default registration and create your own. You can use #set($reg = $xwiki.createUser(false)) To insert a new user once it passes any validation you have checked for. Also use this to send an email (alert to yourself, confirmation to new users etc) #set($dumpMe = $xwiki.mailsender.sendTextMessage('from_regis...@myxwiki.org', 'to_u...@blahblah.com', 'to_someone_e...@www.com', 'to...@nonono.com', 'New user registration at myxwiki.org', $messageText, null)) Another problem with the default registration is that you can pass all params in the url (GET) and it will register until you disable the registration all together. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Edward Laptop Sent: 07 July 2009 21:56 To: XWiki Users Subject: [xwiki-users] where does the actual registration happen? Dear All I have inserted a captcha field into our registration page. It validates correctly. However the user is still registered even if the code is incorrectly entered. I have tried to find the part within the code which actaully does the registering once the fields are correctly filled in. I could then put this in an if statement which depends on $reg and the captcha field. However I can't find it. Please, please, please can someone now just help me finish off. I attach a short version of the code I have. ## declare the plugin #set($captchaPlugin = $xwiki.jcaptcha) ##verify captcha ##call the verifyCaptcha #if($captchaPlugin.verifyCaptcha(edit)) h2captcha correct/h2 #else h2captcha wrong/h2 #end #if(!$reg||$reg0 ) pWelcome ../p #end #if($reg $reg=0) #if($reg==-2) #error($msg.get('core.register.passwordMismatch')) #elseif($reg==-3) #error($msg.get('core.register.userAlreadyExists')) #elseif($reg==-4) #error($msg.get('core.register.invalidUsername')) #elseif($reg==-8) #error($msg.get('core.register.userAlreadyExists')) #else #error($msg.get('core.register.registerFailed', [$reg])) #end #elseif($reg) #set($xwname = XWiki.${request.xwikiname}) #info($msg.get('core.register.successful', [$xwiki.getUserName($xwname), $request.xwikiname])) #end #if(!$reg||$reg0) form id=register action=verifyCaptcha method=post div #set($captchaPlugin = $xwiki.jcaptcha) input type=hidden name=template value=XWiki.XWikiUserTemplate / input type=hidden name=register value=1/ #set($class = $xwiki.getClass(XWiki.XWikiUsers)) #set($obj = $class.newObject()) #set($serverobj = $class.newObject()) #set($discard = $doc.use(XWiki.XWikiUsers)) #if($request.register_first_name) $doc.set(first_name, $request.register_first_name) #end #if($request.register_last_name) $doc.set(last_name, $request.register_last_name) #end dl ##username dt$msg.get(core.register.username)/dt ddinput name=xwikiname type=text size=20 onfocus= prepareName(document.forms.register); //dd ##password ##lots of form fields here #if ($captchaPlugin) $captchaPlugin.displayCaptcha(edit,register_captcha) #end span class=buttonwrapperinput type=submit value=$msg.get(core.register.submit)//span/div /form #end ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] where does the actual registration happen?
I found the only way around this is to disable the default registration and create your own. You can use #set($reg = $xwiki.createUser(false)) To insert a new user once it passes any validation you have checked for. Also use this to send an email (alert to yourself, confirmation to new users etc) #set($dumpMe = $xwiki.mailsender.sendTextMessage('from_regis...@myxwiki.org', 'to_u...@blahblah.com', 'to_someone_e...@www.com', 'to...@nonono.com', 'New user registration at myxwiki.org', $messageText, null)) Another problem with the default registration is that you can pass all params in the url (GET) and it will register until you disable the registration all together. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Edward Laptop Sent: 07 July 2009 21:56 To: XWiki Users Subject: [xwiki-users] where does the actual registration happen? Dear All I have inserted a captcha field into our registration page. It validates correctly. However the user is still registered even if the code is incorrectly entered. I have tried to find the part within the code which actaully does the registering once the fields are correctly filled in. I could then put this in an if statement which depends on $reg and the captcha field. However I can't find it. Please, please, please can someone now just help me finish off. I attach a short version of the code I have. ## declare the plugin #set($captchaPlugin = $xwiki.jcaptcha) ##verify captcha ##call the verifyCaptcha #if($captchaPlugin.verifyCaptcha(edit)) h2captcha correct/h2 #else h2captcha wrong/h2 #end #if(!$reg||$reg0 ) pWelcome ../p #end #if($reg $reg=0) #if($reg==-2) #error($msg.get('core.register.passwordMismatch')) #elseif($reg==-3) #error($msg.get('core.register.userAlreadyExists')) #elseif($reg==-4) #error($msg.get('core.register.invalidUsername')) #elseif($reg==-8) #error($msg.get('core.register.userAlreadyExists')) #else #error($msg.get('core.register.registerFailed', [$reg])) #end #elseif($reg) #set($xwname = XWiki.${request.xwikiname}) #info($msg.get('core.register.successful', [$xwiki.getUserName($xwname), $request.xwikiname])) #end #if(!$reg||$reg0) form id=register action=verifyCaptcha method=post div #set($captchaPlugin = $xwiki.jcaptcha) input type=hidden name=template value=XWiki.XWikiUserTemplate / input type=hidden name=register value=1/ #set($class = $xwiki.getClass(XWiki.XWikiUsers)) #set($obj = $class.newObject()) #set($serverobj = $class.newObject()) #set($discard = $doc.use(XWiki.XWikiUsers)) #if($request.register_first_name) $doc.set(first_name, $request.register_first_name) #end #if($request.register_last_name) $doc.set(last_name, $request.register_last_name) #end dl ##username dt$msg.get(core.register.username)/dt ddinput name=xwikiname type=text size=20 onfocus= prepareName(document.forms.register); //dd ##password ##lots of form fields here #if ($captchaPlugin) $captchaPlugin.displayCaptcha(edit,register_captcha) #end span class=buttonwrapperinput type=submit value=$msg.get(core.register.submit)//span/div /form #end ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Modal window UI component for XWiki (was Re:Javascript issue)
Hi Jerome This is a great news. Thank you. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jerome Velociter Sent: 06 May 2009 19:27 To: XWiki Users Subject: [xwiki-users] Modal window UI component for XWiki (was Re:Javascript issue) Hi Adjin I've added on code.xwiki.org a modal box extension based on http://www.wildbit.com/labs/modalbox/ You can find it here :http://code.xwiki.org/xwiki/bin/view/Applications/ModalBoxApplication Starting with XWiki 1.9 Milestone 2 (to be released very soon), there will be a modal popup UI component that you will be able to reuse, too. Check it on the release notes http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise19M2 #HNewreusable7E7Ecomponents7E7E (Note the releases notes are still work in progress until the actual release, there are even more new things in this release!) Cheers, Jerome. Ajdin Brandic wrote: Hi I'm using a modal window (subModal) in my xwiki and things work fine until I try to use it while in 'inline' mode and using Firefox 3.0.10 (IE works). The problem is that the modal window opens and closes straight away making the parent page go from 'inline' to 'preview' mode!! Looks like js method 'window.setTimeout' is not executing. Has anyone had js probs in the past?? Do xwiki developers have any idea? I can see two errors in the Error console: Error: Permission denied to get property XULElement.accessibleType Source File: http://localhost:8082/xwiki/resources/js/prototype/prototype.js Line: 2015 And Error: Permission denied to get property XULElement.accessibleType Source File: http://localhost:8082/xwiki/bin/jsx/scripts/subModal?language=en Line: 1 (Problem here is that xwiki displayed js script on one line) Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Javascript issue
Hi I'm using a modal window (subModal) in my xwiki and things work fine until I try to use it while in 'inline' mode and using Firefox 3.0.10 (IE works). The problem is that the modal window opens and closes straight away making the parent page go from 'inline' to 'preview' mode!! Looks like js method 'window.setTimeout' is not executing. Has anyone had js probs in the past?? Do xwiki developers have any idea? I can see two errors in the Error console: Error: Permission denied to get property XULElement.accessibleType Source File: http://localhost:8082/xwiki/resources/js/prototype/prototype.js Line: 2015 And Error: Permission denied to get property XULElement.accessibleType Source File: http://localhost:8082/xwiki/bin/jsx/scripts/subModal?language=en Line: 1 (Problem here is that xwiki displayed js script on one line) Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Modal window content without xwiki skin
Hi I'm trying to use subModal javascript modal tool. I got it to work but my modal window that contains a simple form also contains XWiki skin (with menu etc.). Is there a way to create a page without the skin? This is similar to the style in modal window in the Admin area when editing a group for example! Is there an XWiki js modal too that can be used instead of an external tool like subModal? Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Does myxwiki support jcaptcha??
Is jcaptcha enabled on myxwiki ??? Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Does myxwiki support jcaptcha??
Oh, enable by going to /xwiki/bin/edit/XWiki/XWikiPreferences?editor=objectclassname=XWiki.XWi kiPreferencesobject=0 and setting Anonymous and Registered (all of them) to Image. Thanks Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Sergiu Dumitriu Sent: 27 April 2009 15:32 To: XWiki Users Subject: Re: [xwiki-users] Does myxwiki support jcaptcha?? Ajdin Brandic wrote: Is jcaptcha enabled on myxwiki ??? Yes, if you enable it on your wiki. -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Modifying class property value programmatically
Is there a way of updating class property values using Velocity or Groovy? I have a class property called Group which contains values (A, B, C ..) but want to allow users to be able to add/remove groups without editing the class via the Admin area. Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Using parseGroovyFromPage on inherited class
Hi I think you'll need in your User class to use $xwiki.parseGroovyFromPage(ParentObject) Before that you need to pass $xwiki to User class. public class User extends ParentObject { private xwiki = null; void setUser() { if (session.getValue(counter) != null) this.counter = session.getValue(counter) + 1; else this.counter = 1; session.setAttribute(counter, this.counter); } String showCounter() { return this.counter; } public void setXwiki(xwiki) { this.xwiki = xwiki; } } -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jan Cerny Sent: 24 March 2009 08:43 To: users@xwiki.org Subject: [xwiki-users] Using parseGroovyFromPage on inherited class Hi, I have another problem. I want to use a class that extends a parent class and then use parseGroovyFromPage. But I can't work out how to do it. An example here: - page ParentObject: % class ParentObject { def counter = 0; def session; void setSession(session) { this.session = session; } } % - page UserClass: /* Groovy Class #* */ public class User extends ParentObject { void setUser() { if (session.getValue(counter) != null) this.counter = session.getValue(counter) + 1; else this.counter = 1; session.setAttribute(counter, this.counter); } String showCounter() { return this.counter; } } /* *# */ - script page: #set ($groovyObject = $xwiki.parseGroovyFromPage(Include.UserClass)) - The question is how to include the ParentObject page into UserClass page, so that UserClass can extend the ParentObject. Any help would be appreciated. Thanks, Zik ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Tag API doc
HI Is there a way of filtering tags using the new TagCloud? 1. I want to create a filter to display tags based on space name. 2. I want to create a filter to display tags based on a value in doc class property (ie. Show tags where doc property topic=education). Is there any documentation on tag API (I seen there is stuff like $xwiki.tag.getTags()) ? Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Bug - Tag cloud rounding bug
HI The new tag cloud in v1.8 has a number rounding bug #foreach($popularityMax in $sorttool.sort($popularityMap.keySet())) #if($tagCount.get($tag) $popularityMax) #elseif(!$classSet) #set($liClass = $popularityMap.get($popularityMax)) #set($classSet = true) #end In case when $tagCount.get($tag) is equal to $popularityMax (lets say both should be 42, $popularityMax is actually 41.999). This means that a tag with 42 occurrences has o stile sheet class set and appears very small when in fact it should be the biggest one. I've tried doing $mathtool.toInteger($popularityMax) and $mathtool.roundToInt($popularityMax) but both of these give value 41. Ajdin Brandic NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] security concern: XWikiGuest rolling back
Just to add to this Yishay Mor wrote: This has happened a few times on http://patternlanguagenetwork.myxwiki.org/, and I can't explain it. I set the access rights to allow view by all, but edit is restricted. I'm seeing documents rolled back to older versions by XWikiGuest. Example: http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Patterns/tab letopconceptmapping On this document the guest has been granted edit rights. Look at the rights editing for it, and select Users, and you will see that Unregistered Users has set view, comment and edit. I still see edit selected... And as a guest I can indeed edit the document. Just to make sure we're on the same page, I'm looking at http://patternlanguagenetwork.myxwiki.org/xwiki/bin/edit/Patterns/tablet opconceptmapping?editor=rights I went to the link Sergiu specified and I can view all groups and users without being logged in. Top right still says Log-in Register Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Just imported enterprise-wiki-1.8-rc-1.xar buttags not showing
Thanks guys Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jean-Vincent Drean Sent: 19 February 2009 20:54 To: XWiki Users Subject: Re: [xwiki-users] Just imported enterprise-wiki-1.8-rc-1.xar buttags not showing On Thu, Feb 19, 2009 at 5:58 PM, Jean-Vincent Drean jean-vinc...@drean.org wrote: On Thu, Feb 19, 2009 at 5:48 PM, Ajdin Brandic aa6...@coventry.ac.uk wrote: Hi Just imported xwiki-enterprise-wiki-1.8-rc-1.xar and Main/Tags says no documents were tagged. Now that the farm is upgraded you're in sync :) I restored the old Main/Tags but the original can be viewed at http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/newTags It's working fine now. Thanks, JV. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] adding attribute to form field
Hi Has anyone tried to add a new attribute to a form field created when document in edit (inline) mode? I want to add onChange=somejs to textarea ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] adding attribute to form field
It was much simpler than I thought. To create a hidden field Instead of $doc.display('propertyName') do input type=hidden name=my.class_0_propertyName value= To add an attribute to an element #set($tmpUMLtext=) #set($added=0) #foreach($part in $!$doc.display('propertyName').split(id='my.class_0_propertyName')) #set($tmpUMLtext = $tmpUMLtext + + $part) #if($added==0) #set($tmpUMLtext = $tmpUMLtext + id='my.class_0_propertyName' onChange=) #set($tmpUMLtext = $tmpUMLtext + 'setFormElvalue(') #set($tmpUMLtext = $tmpUMLtext + 'my.class_0_propertyName',1)) #set($tmpUMLtext = $tmpUMLtext + '') #set($added=1) #end #end $tmpUMLtext Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jerome Velociter Sent: 20 February 2009 13:12 To: XWiki Users Subject: Re: [xwiki-users] adding attribute to form field Hi Adjin, You probably want to do that the non obstrusive way. You can use prototype's Element.observe for this. See http://www.prototypejs.org/api/element/observe $('elementid').observe('change', yourFunction); or $$('cssLocator')[x].observe('change', yourFunction); Hope this helps, Jerome Ajdin Brandic wrote: Hi Has anyone tried to add a new attribute to a form field created when document in edit (inline) mode? I want to add onChange=somejs to textarea ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Just imported enterprise-wiki-1.8-rc-1.xar but tags not showing
Hi Just imported xwiki-enterprise-wiki-1.8-rc-1.xar and Main/Tags says no documents were tagged. I restored the old Main/Tags but the original can be viewed at http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/newTags Import results: Importing xwiki-enterprise-wiki-1.8-rc-1.xar: Import successful 168 Document(s) installed 7 Document(s) skipped 0 Document(s) with error List of skipped documents XWiki.XWikiPreferences Main.WebHome XWiki.XWikiAdminGroup XWiki.XWikiAllGroup XWiki.XWikiGroupSheet Panels.QuickLinks Panels.WebPreferences Any idea? Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Myxwiki Programming rights required
Hi If I cannot execute $doc.saveWithProgrammingRights() (I get erors) Does this mean I do not have programming rights. Also if I write Groovy code between % and % but the code is still visible on page Does this mean I do not have programming rights? Vincent Massol or JV ? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Ajdin Brandic Sent: 17 February 2009 17:51 To: XWiki Users Subject: Re: [xwiki-users] Myxwiki Programming rights required HI Also the tagcloud code might be old but is simple and uses two simple queries. Why is it deprecated snippet ? It is deprecated since there's now a tag plugin that allows to manipulate tags : - without requiring programming rights - without knowledge of the storage implementation http://code.xwiki.org/xwiki/bin/view/Plugins/TagPlugin Thank you! No reason why it should work on one page and not on another. You're right the snippet should not work on one page and not on another but it is related to a known core bug. Ok, all clear now. Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Myxwiki Programming rights required
I really think my programming rights on myxwiki are corrupt. Can someone PLEASE remove me then add me again!! U: ajdinbrandic Ajdin Brandic -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Ajdin Brandic Sent: 18 February 2009 16:34 To: XWiki Users Subject: Re: [xwiki-users] Myxwiki Programming rights required Hi If I cannot execute $doc.saveWithProgrammingRights() (I get erors) Does this mean I do not have programming rights. Also if I write Groovy code between % and % but the code is still visible on page Does this mean I do not have programming rights? Vincent Massol or JV ? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Ajdin Brandic Sent: 17 February 2009 17:51 To: XWiki Users Subject: Re: [xwiki-users] Myxwiki Programming rights required HI Also the tagcloud code might be old but is simple and uses two simple queries. Why is it deprecated snippet ? It is deprecated since there's now a tag plugin that allows to manipulate tags : - without requiring programming rights - without knowledge of the storage implementation http://code.xwiki.org/xwiki/bin/view/Plugins/TagPlugin Thank you! No reason why it should work on one page and not on another. You're right the snippet should not work on one page and not on another but it is related to a known core bug. Ok, all clear now. Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Myxwiki Programming rights required
To myxwiki admin people Can someone reinstate/flush my progtramming rights, username: ajdinbrandic I had programming rights set up by Vincent for myxwiki.patternlanguagenetwork.org. Due to issues with upgrade I lost all rights. Now my admin rights have been reinstated but yesterday I added a new panel 'Panels.TagCloud' and it only works on Main/Tags page. The code uses code which requires programming rights. Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Myxwiki Programming rights required
It is strange. Why is the cloud only working on Tags page and not on any other ones. I have v1.8 localy and works OK. Are any other rights required? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Vincent Massol Sent: 17 February 2009 14:39 To: XWiki Users Subject: Re: [xwiki-users] Myxwiki Programming rights required Hi Ajdin, On Feb 17, 2009, at 12:51 PM, Ajdin Brandic wrote: To myxwiki admin people Can someone reinstate/flush my progtramming rights, username: ajdinbrandic I had programming rights set up by Vincent for myxwiki.patternlanguagenetwork.org. Due to issues with upgrade I lost all rights. Now my admin rights have been reinstated but yesterday I added a new panel 'Panels.TagCloud' and it only works on Main/Tags page. The code uses code which requires programming rights. I've checked and you still have programming rights with your user from myxwiki.org. Are you sure you're logging with the correct user? In the meantime I have save the TagCloud page with my user. Thanks -Vincent http://xwiki.com http://xwiki.org http://massol.net ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Myxwiki Programming rights required
I was not aware of this page, any documentation? Is this something like this http://91.121.237.216/xwiki/bin/view/XWiki/TagCloud?viewer=code . Or ??? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jean-Vincent Drean Sent: 17 February 2009 15:24 To: XWiki Users Subject: Re: [xwiki-users] Myxwiki Programming rights required You should update your wiki with XE 1.8M2 xar and use the XWiki.TagCloud page to display the cloud instead of using the deprecated snippet which requires programming rights. JV. On Tue, Feb 17, 2009 at 12:51 PM, Ajdin Brandic aa6...@coventry.ac.uk wrote: To myxwiki admin people Can someone reinstate/flush my progtramming rights, username: ajdinbrandic I had programming rights set up by Vincent for myxwiki.patternlanguagenetwork.org. Due to issues with upgrade I lost all rights. Now my admin rights have been reinstated but yesterday I added a new panel 'Panels.TagCloud' and it only works on Main/Tags page. The code uses code which requires programming rights. Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Myxwiki Programming rights required
Also the tagcloud code might be old but is simple and uses two simple queries. Why is it deprecated snippet ? No reason why it should work on one page and not on another. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Ajdin Brandic Sent: 17 February 2009 16:19 To: XWiki Users Subject: Re: [xwiki-users] Myxwiki Programming rights required I was not aware of this page, any documentation? Is this something like this http://91.121.237.216/xwiki/bin/view/XWiki/TagCloud?viewer=code . Or ??? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jean-Vincent Drean Sent: 17 February 2009 15:24 To: XWiki Users Subject: Re: [xwiki-users] Myxwiki Programming rights required You should update your wiki with XE 1.8M2 xar and use the XWiki.TagCloud page to display the cloud instead of using the deprecated snippet which requires programming rights. JV. On Tue, Feb 17, 2009 at 12:51 PM, Ajdin Brandic aa6...@coventry.ac.uk wrote: To myxwiki admin people Can someone reinstate/flush my progtramming rights, username: ajdinbrandic I had programming rights set up by Vincent for myxwiki.patternlanguagenetwork.org. Due to issues with upgrade I lost all rights. Now my admin rights have been reinstated but yesterday I added a new panel 'Panels.TagCloud' and it only works on Main/Tags page. The code uses code which requires programming rights. Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Myxwiki Programming rights required
HI Also the tagcloud code might be old but is simple and uses two simple queries. Why is it deprecated snippet ? It is deprecated since there's now a tag plugin that allows to manipulate tags : - without requiring programming rights - without knowledge of the storage implementation http://code.xwiki.org/xwiki/bin/view/Plugins/TagPlugin Thank you! No reason why it should work on one page and not on another. You're right the snippet should not work on one page and not on another but it is related to a known core bug. Ok, all clear now. Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Panel Wizard doesn't show it
Hi Regarding accessing Panels Wizard problem on myxwiki. In my case I'm trying to create a new panel (tag cloud) so things are a bit more complex. So below is a guide on how to do it without the Panel Wizard. I think my programming rights for myxwiki.patternlanguagenetwork got corrupted due to recent upgrade issues so can I ask someone to reinstate them or to resave this page 'Panels.TagCloud'. Add TagCloud Panel without going through PanelWizard (require Programming Rights). 1. Create page called Panels.TagCloud ('xwiki/bin/view/Panels/TagCloud' then click on 'edit this page to create it.'.) 2. Add this line #includeForm(Panels.PanelSheet) 3. Click 'Save and View' 4. Click on Edit - Objects 5. Choose 'Panels.PanelClass' from the 'Add Object' panel on the right. 6. Click 'Add Object from this class' button 7. Fill in: Name=TagCloud, Panel Type=View, Description=Tag Cloud, Category=Navigation, Content= #panelheader('Tags Cloud') #set($query = select elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags') #set( $allTags = $xwiki.sort($xwiki.search($query))) #set( $previousTag = ) #set( $tagsWithCount = $xwiki.getHashMap()) #set( $count = 1) #set( $maxCount = 1) #foreach($tag in $allTags) #if ($tag == $previousTag) #set( $count = $count + 1) #if ($count $maxCount) #set ($maxCount = $count) #end #else #set( $count = 1) #set( $previousTag = ) #end #set( $dummy = $tagsWithCount.put($tag, $count)) #set( $previousTag = $tag) #end #set($query = select distinct elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags') #set( $tagsDistinct = $xwiki.sort($xwiki.search($query))) div style=font-size: 10px; text-align: justify; text-justify: auto; #foreach($tag in $tagsDistinct) #set( $currentCount = $tagsWithCount.get($tag)) ##set($size = 15 + ($currentCount * 150 / $maxCount)) #set($size = 10 + ($currentCount/2)) #set($size = $size + px) span style=font-size: $sizea href=$xwiki.getURL(Main.Tags, view, tag=$tag))$tag/a/span #end /div #panelfooter() 8. Click 'Save and View' 9. Go into XWikiPreferences and click Edit-Objects. 10. Find XWiki.XWikiprefferences and add value 'Panels.TagCloud' to property 'Panels displayed on the right:' 11. Click 'Save and View' Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Vincent Massol Sent: 07 February 2009 09:17 To: XWiki Users Subject: Re: [xwiki-users] Panel Wizard doesn't show it Hi Antonio, On Feb 7, 2009, at 9:07 AM, Antonio Goncalves wrote: Hi, I'm using XE 1.6.2 / XEM 1.4.1 and when I click on the Panel Wizard it just doesn't show up. I click on the link, but nothing happens. hmmm we need to look into this since I've heard this problem reported twice over one week. If you agree, I'll ask Raffaello to give me the rights to go the Paris JUG wiki and try it myself from there. Is there a way to skip the wizard and set up the panels layout manually like the previous versions of XWiki ? Yes. Just go to the wiki administration page and then select edit -- Objects. Find the XWikiPreferences object and find the property for panels location and put the values you want in there. Thanks -Vincent http://xwiki.com http://xwiki.org http://massol.net ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Max Upload Size questions
Hi I'm not sure why you get this error but I do know (since I tried the same with a 90MB import) that it is pointless trying this with the basic xwiki setup. Another problem you'll have is the bug with uploading attachments and doing import is equivalent to adding attachment. So first of all get Mysql and glassfish or tomcat. Install xwiki 1.8. Make sure you have plenty of memory for JVM (I found 1.6 to be the maximum on windows machine). Reduce your import file (export without attachments from your live site). Then try to import. Then again and again etc.. Until one day it all works. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of CASTRO roney Sent: 13 February 2009 13:16 To: users@xwiki.org Subject: [xwiki-users] Max Upload Size questions Hello everyone, I was testing the import/export tool from one wiki to another (I'm actually trying to export from an online xwiki to a testing instance locally in my machine), and the resulting file from the export process turned out to have around 255MB. I have the xwiki enterprise 1.7.1 installed on my machine (including a Jetty container and an HSQLDB database all set up). When I try to upload the exported file, I get an error message saying that the max upload size is 10MB. I already changed the upload_maxsize property in xwiki.preferences to 300MB (the information in the field was written in Bytes, equivalent to 300MB), but yet even so, I keep getting the same error message. I think this might be a HSQLDB handicap. Am I correct? In any case, how can I solve this issue so I can proceed with this test?! Thanks a lot ! Roney ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Database information about xwiki
Hi If you are running a local xwiki you can use tools like DB Visualizer (windows app) to connect and view DB structure. You also need to understand a bit about xwiki properties as they reflect in db structure (table names). Also look at Hibernate mapping http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/resources/xwiki.hbm.xml Hope this help. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Hernández Cuchí, Francisco Ricardo Sent: 11 February 2009 11:25 To: XWiki Users Subject: Re: [xwiki-users] Database information about xwiki How outdated is it? Are there new tables or only modifications in the tables? Thanks, -Mensaje original- De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] En nombre de Hervé Agnoux Enviado el: miércoles, 11 de febrero de 2009 11:12 Para: XWiki Users Asunto: Re: [xwiki-users] Database information about xwiki Le mercredi 11 février 2009, Hernández Cuchí, Francisco Ricardo a écrit : - A little description of the relational model, and the main tables? See perhaps http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration and the out of date schema at http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ** IMPORTANTE: El contenido de este correo y ficheros adjuntos es confidencial y está dirigido únicamente para el destinatario/s. Si Ud recibe este correo por error, por favor póngase en contacto con su administrador de correo o con el emisor immediatamente y no difunda su contenido a nadie ni haga copias. *** Este correo ha sido escaneado de virus y contenido malicioso *** ** ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Database information about xwiki
I must admit that I had not found an easy way to connect to it using DB Visualizer, sorry. As the standalone version is not to be used for any development work I had to move to MySQL. So I'm using GlassFish and MySQL to ruin xwiki enterprise. It will not take you long to install it yourself and you'll find all the instructions online. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Hernández Cuchí, Francisco Ricardo Sent: 11 February 2009 12:00 To: XWiki Users Subject: Re: [xwiki-users] Database information about xwiki I am testing it with the standalone installation (the one that is only a msi file), How can I connect to this database? -Mensaje original- De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] En nombre de Ajdin Brandic Enviado el: miércoles, 11 de febrero de 2009 12:55 Para: XWiki Users Asunto: Re: [xwiki-users] Database information about xwiki Hi If you are running a local xwiki you can use tools like DB Visualizer (windows app) to connect and view DB structure. You also need to understand a bit about xwiki properties as they reflect in db structure (table names). Also look at Hibernate mapping http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/resources/xwiki.hbm.xml Hope this help. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Hernández Cuchí, Francisco Ricardo Sent: 11 February 2009 11:25 To: XWiki Users Subject: Re: [xwiki-users] Database information about xwiki How outdated is it? Are there new tables or only modifications in the tables? Thanks, -Mensaje original- De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] En nombre de Hervé Agnoux Enviado el: miércoles, 11 de febrero de 2009 11:12 Para: XWiki Users Asunto: Re: [xwiki-users] Database information about xwiki Le mercredi 11 février 2009, Hernández Cuchí, Francisco Ricardo a écrit : - A little description of the relational model, and the main tables? See perhaps http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration and the out of date schema at http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ** IMPORTANTE: El contenido de este correo y ficheros adjuntos es confidencial y está dirigido únicamente para el destinatario/s. Si Ud recibe este correo por error, por favor póngase en contacto con su administrador de correo o con el emisor immediatamente y no difunda su contenido a nadie ni haga copias. *** Este correo ha sido escaneado de virus y contenido malicioso *** ** ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ** IMPORTANTE: El contenido de este correo y ficheros adjuntos es confidencial y está dirigido únicamente para el destinatario/s. Si Ud recibe este correo por error, por favor póngase en contacto con su administrador de correo o con el emisor immediatamente y no difunda su contenido a nadie ni haga copias. *** Este correo ha sido escaneado de virus y contenido malicioso *** ** ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Database information about xwiki
Yes :-). I apologise to the whole community and beyond. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Guillaume Lerouge Sent: 11 February 2009 15:44 To: XWiki Users Subject: Re: [xwiki-users] Database information about xwiki Hi, On Wed, Feb 11, 2009 at 3:11 PM, Ajdin Brandic aa6...@coventry.ac.ukwrote: I must admit that I had not found an easy way to connect to it using DB Visualizer, sorry. As the standalone version is not to be used for any development work I had to move to MySQL. *So I'm using GlassFish and MySQL to ruin xwiki enterprise.* It will not take you long to install it yourself and you'll find all the instructions online. I sure hope you meant run :-p Guillaume Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Hernández Cuchí, Francisco Ricardo Sent: 11 February 2009 12:00 To: XWiki Users Subject: Re: [xwiki-users] Database information about xwiki I am testing it with the standalone installation (the one that is only a msi file), How can I connect to this database? -Mensaje original- De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] En nombre de Ajdin Brandic Enviado el: miércoles, 11 de febrero de 2009 12:55 Para: XWiki Users Asunto: Re: [xwiki-users] Database information about xwiki Hi If you are running a local xwiki you can use tools like DB Visualizer (windows app) to connect and view DB structure. You also need to understand a bit about xwiki properties as they reflect in db structure (table names). Also look at Hibernate mapping http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/ main/resources/xwiki.hbm.xml Hope this help. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Hernández Cuchí, Francisco Ricardo Sent: 11 February 2009 11:25 To: XWiki Users Subject: Re: [xwiki-users] Database information about xwiki How outdated is it? Are there new tables or only modifications in the tables? Thanks, -Mensaje original- De: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] En nombre de Hervé Agnoux Enviado el: miércoles, 11 de febrero de 2009 11:12 Para: XWiki Users Asunto: Re: [xwiki-users] Database information about xwiki Le mercredi 11 février 2009, Hernández Cuchí, Francisco Ricardo a écrit : - A little description of the relational model, and the main tables? See perhaps http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administr ation and the out of date schema at http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ** IMPORTANTE: El contenido de este correo y ficheros adjuntos es confidencial y está dirigido únicamente para el destinatario/s. Si Ud recibe este correo por error, por favor póngase en contacto con su administrador de correo o con el emisor immediatamente y no difunda su contenido a nadie ni haga copias. *** Este correo ha sido escaneado de virus y contenido malicioso *** ** ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ** IMPORTANTE: El contenido de este correo y ficheros adjuntos es confidencial y está dirigido únicamente para el destinatario/s. Si Ud recibe este correo por error, por favor póngase en contacto con su administrador de correo o con el emisor immediatamente y no difunda su contenido a nadie ni haga copias. *** Este correo ha sido escaneado de virus y contenido malicioso *** ** ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Possible Bug with com.xpn.xwiki.doc.XWikiDocument.saveAttachmentContent v1.8
I'm executing some code on Save which attaches a PNG file to a document that was edited/saved. When I call docObj.saveAttachmentContent(attP, context); the attachment is save OK but any changes made to my document (ie. text changes) are not saved. If I comment out this line the text changes are saved, but off course not the attachment. Is this normal behaviour, what do the developers think? def imgAsBites = xwiki.getURLContentAsBytes(http://www.websequencediagrams.com/index.php +umlImage, context); def attP = docObj.getAttachment(filenameToSavaAs); if(!attP) { attP = new com.xpn.xwiki.doc.XWikiAttachment(docObj,filenameToSavaAs); docObj.getAttachmentList().add(attP); println NO Attach; } attP.setContent(imgAsBites); docObj.saveAttachmentContent(attP, context); Regards Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] doc.saveAttachmentContent(attImg, context) NOT working with v1.7
I am really frustrated with this now. I cannot get to save an attachment to a document although all works well on my local xwiki instance 1.6.1. As discussed in post Re: [xwiki-users] groovy.lang.MissingMethodException - Nosignatureof method and suggested by Denis Gervalle -def attP = doc.getAttachment(filenameToSavaAs) -if( !attP ) attP = new com.xpn.xwiki.doc.XWikiAttachment(doc,filenameToSavaAs) -doc.getAttachmentList().add(attP) -attP.content = imgAsBites -attP.author = context.user -// attP.comment = 'comments for your attachement if you want' -doc.saveAttachmentContent(attP,context) This however generates a new instance of the same file every time the code is run. This is the same on v1.6 and 1.7 that myxwiki runs. I've tried doing doc.getAttachmentList().add(doc.getAttachmentList().indexOf(attP),attP) but this fails saying that the index is -1. Also on the 1.6 version if I restart glassFish only one file instance is left in the attachment area. Clears the chache. But the code below works perfect on my local instance yet on myxwiki the attached file disappears after a while cos it is not stored permanently. //convert from doc.XWikiDocument to api.Document com.xpn.xwiki.api.Document apidoc = new com.xpn.xwiki.api.Document(doc,context); //get image from url as byte[] def imgAsBites = xwiki.getURLContentAsBytes(http://www.websequencediagrams.com/index.php +umlImage, context); //add to api document (this doesn't save it permanently) def attImg = apidoc.addAttachment(filenameToSavaAs, imgAsBites); //this saves it on v1.6 doc.saveAttachmentContent(attImg, context) ; //remove existing error file //there seams to be a bug in deleteAttachment so will overwrite existing file with a blank one def att = doc.getAttachment(ErrorLogUML.txt); if( att ) { def attString = No ERRORS; def attByteArr = attString.getBytes(); def attTxt = apidoc.addAttachment(ErrorLogUML.txt, attByteArr); doc.saveAttachmentContent(attTxt, context) ; } //end apidoc.save(); NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] unable to delete attachment
Hi I'm trying to delete an attachment using Groovy script. I've used com.xpn.xwiki.doc.XWikiDocument.deleteAttachment(att, context); but get error indicating a type mismatch. According to http://www.docjar.com/docs/api/com/xpn/xwiki/doc/XWikiDocument.html http://www.docjar.com/docs/api/com/xpn/xwiki/doc/XWikiDocument.html arguments should be XWikiAttachment http://www.docjar.com/docs/api/com/xpn/xwiki/doc/XWikiAttachment.html , com.xpn.xwiki.XWikiContext http://www.docjar.com/docs/api/com/xpn/xwiki/XWikiContext.html which I think I'm using (see error msg below). Can anyone point my error? Is this v1.8 method? Wrapped Exception: No signature of method com.xpn.xwiki.doc.XWikiDocument.deleteAttachment() is applicable for argument types: (com.xpn.xwiki.doc.XWikiAttachment, com.xpn.xwiki.XWikiContext) values: {com.xpn.xwiki.doc.xwikiattachm...@3c550b, [msg:com.xpn.xwiki.web.xwikimessaget...@401ab1, stats_newcookie:false, stats_cookie:javax.servlet.http.coo...@986d0e, tdoc:Patterns.UseMyStuff, org.xwiki.component.manager.ComponentManager:org.xwiki.plexus.manager. plexuscomponentmana...@457b62, ajax:false, locale:en, doc:Patterns.UseMyStuff, mainxwiki:xwiki, vcontext:org.apache.velocity.velocitycont...@11fe9d5]} Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] groovy.lang.MissingMethodException - Nosignatureof method
Hi Denis thank you very much. I did not know it was the v1.8 feature. http://maven.xwiki.org/ site doesn't mention it either. I'm developing this for a myxwiki site and I think the farm still runs 1.7, correct me if I'm wrong, so your advice was spot on. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Denis Gervalle Sent: 30 January 2009 09:11 To: XWiki Users Subject: Re: [xwiki-users] groovy.lang.MissingMethodException - Nosignatureof method Hi Adjin, com.xpn.xwiki.doc.XWikiDocument.addAttachment() has just been added in revision 14565, which was only release in 1.8M1. Before, the addAttachment() function was only available from com.xpn.xwiki.api.Document object. You may want to wrap your XWikiDocument object into a Document object with: com.xpn.xwiki.api.Document apidoc = new Document(doc,context) apidoc.addAttachment(filenameToSavaAs, imgAsBites) Or you may do the job by yourself (be very careful that changing an XWikiDocument implies that you have to clone it first, if you want to avoid cache corruption in case you never store your changes or it fails.), this should be something like this: def att = doc.getAttachment(filenameToSavaAs) if( !att ) att = new com.xpn.xwiki.doc.XWikiAttachment(doc, filenameToSavaAs) doc.getAttachmentList().add(att) att.content = imgAsBites att.author = context.user // att.comment = 'comments for your attachement if you want' doc.saveAttachmentContent(att,context) Hope this helps, Denis On 29 janv. 09, at 18:01, Ajdin Brandic wrote: * I'm posting this again cos the whole post got mixed up with another post Custom class field as field on a different class http://n2.nabble.com/Custom-class-field-as-field-on-a-different-class -t p2152709p2239310.html * As written previously I'm trying to trigger some code on document save. Sergiu Dumitriu explained issue I had with (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). I got most the stuff to work except (last two lines of code) I am not able to save image from url as attachment. I get Wrapped Exception: No signature of method com.xpn.xwiki.doc.XWikiDocument.addAttachment() is applicable for argument types: (java.lang.String, [B, com.xpn.xwiki.XWikiContext) values: {notif1.png, [-119,.., [vcontext:...]} Looking at the documentation at http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/x pn /xwiki/doc/XWikiDocument.html Says XWikiAttachment | addAttachment(java.lang.String fileName, byte[] data, XWikiContext context) Have I got type issue here or??? This is what I'm doing def doc = xwiki.getDocument(docName, context); //use this for com.xpn.xwiki.XWiki def tmpElList = el.split([\]) def umlImage = tmpElList[1] def imgAsBites = xwiki.getURLContentAsBytes(http://www.websequencediagrams.com/index.p hp +umlImage, context); def newAttachment = doc.addAttachment(filenameToSavaAs,imgAsBites, context); //use this for com.xpn.xwiki.XWiki saveAttachmentContent(newAttachment,context); Has anyone had a similar problem? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Sergiu Dumitriu Sent: 14 January 2009 17:03 To: XWiki Users Subject: Re: [xwiki-users] groovy.lang.MissingMethodException Ajdin Brandic wrote: Hi I'm trying to execute another script on Save event. I've created a notification class (based on xwiki example http://dev.xwiki.org/xwiki/bin/view/Drafts/GroovyNotifications) and pointed to it in Administration Programming Notification pages. This script gets called every time which is fine and when I try to display name of a document that is being saved (doc.fullName) all works well. document name it works fine but when I try to display one of the fieldnames doc.display('Summary') I get groovy.lang.MissingMethodException: No signature of method com.xpn.xwiki.doc.XWikiDocument.display() is applicable for argument types: (java.lang.String) values: {Summary} I tried def tmpDoc = context.getWiki().getDocument(doc.fullName, context); But again fullName is OK but display('Summary') isn't Am I missing something in my syntax? How do I make document values available in my Notification class? As you see, that is not an api object, but an internal class (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). This means that API methods don't work, unless they have an equivalent in the other class. You can either look at the methods of the XWikiDocument class, or get an API object and work with it (new com.xpn.xwiki.apiDocument(tmpDoc) -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended
Re: [xwiki-users] groovy.lang.MissingMethodException - No signature of method
As written previously I'm trying to trigger some code on document save. Sergiu explained issue I had with (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). I got most the stuff to work except (last two lines of code) I am not able to save image from url as attachment. I get Wrapped Exception: No signature of method com.xpn.xwiki.doc.XWikiDocument.addAttachment() is applicable for argument types: (java.lang.String, [B, com.xpn.xwiki.XWikiContext) values: {notif1.png, [-119,.., [vcontext:...]} Looking at the documentation at http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn /xwiki/doc/XWikiDocument.html Says XWikiAttachment | addAttachment(java.lang.String fileName, byte[] data, XWikiContext context) Have I got type issue here or??? This is what I'm doing def doc = xwiki.getDocument(docName, context); //use this for com.xpn.xwiki.XWiki def tmpElList = el.split([\]) def umlImage = tmpElList[1] def imgAsBites = xwiki.getURLContentAsBytes(http://www.websequencediagrams.com/index.php +umlImage, context); def newAttachment = doc.addAttachment(filenameToSavaAs,imgAsBites, context); //use this for com.xpn.xwiki.XWiki saveAttachmentContent(newAttachment,context); Has anyone had a similar problem? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Sergiu Dumitriu Sent: 14 January 2009 17:03 To: XWiki Users Subject: Re: [xwiki-users] groovy.lang.MissingMethodException Ajdin Brandic wrote: Hi I'm trying to execute another script on Save event. I've created a notification class (based on xwiki example http://dev.xwiki.org/xwiki/bin/view/Drafts/GroovyNotifications) and pointed to it in Administration Programming Notification pages. This script gets called every time which is fine and when I try to display name of a document that is being saved (doc.fullName) all works well. document name it works fine but when I try to display one of the fieldnames doc.display('Summary') I get groovy.lang.MissingMethodException: No signature of method com.xpn.xwiki.doc.XWikiDocument.display() is applicable for argument types: (java.lang.String) values: {Summary} I tried def tmpDoc = context.getWiki().getDocument(doc.fullName, context); But again fullName is OK but display('Summary') isn't Am I missing something in my syntax? How do I make document values available in my Notification class? As you see, that is not an api object, but an internal class (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). This means that API methods don't work, unless they have an equivalent in the other class. You can either look at the methods of the XWikiDocument class, or get an API object and work with it (new com.xpn.xwiki.apiDocument(tmpDoc) -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] groovy.lang.MissingMethodException - No signatureof method
* I'm posting this again cos the whole post got mixed up with another post Custom class field as field on a different class http://n2.nabble.com/Custom-class-field-as-field-on-a-different-class-t p2152709p2239310.html * As written previously I'm trying to trigger some code on document save. Sergiu Dumitriu explained issue I had with (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). I got most the stuff to work except (last two lines of code) I am not able to save image from url as attachment. I get Wrapped Exception: No signature of method com.xpn.xwiki.doc.XWikiDocument.addAttachment() is applicable for argument types: (java.lang.String, [B, com.xpn.xwiki.XWikiContext) values: {notif1.png, [-119,.., [vcontext:...]} Looking at the documentation at http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn /xwiki/doc/XWikiDocument.html Says XWikiAttachment | addAttachment(java.lang.String fileName, byte[] data, XWikiContext context) Have I got type issue here or??? This is what I'm doing def doc = xwiki.getDocument(docName, context); //use this for com.xpn.xwiki.XWiki def tmpElList = el.split([\]) def umlImage = tmpElList[1] def imgAsBites = xwiki.getURLContentAsBytes(http://www.websequencediagrams.com/index.php +umlImage, context); def newAttachment = doc.addAttachment(filenameToSavaAs,imgAsBites, context); //use this for com.xpn.xwiki.XWiki saveAttachmentContent(newAttachment,context); Has anyone had a similar problem? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Sergiu Dumitriu Sent: 14 January 2009 17:03 To: XWiki Users Subject: Re: [xwiki-users] groovy.lang.MissingMethodException Ajdin Brandic wrote: Hi I'm trying to execute another script on Save event. I've created a notification class (based on xwiki example http://dev.xwiki.org/xwiki/bin/view/Drafts/GroovyNotifications) and pointed to it in Administration Programming Notification pages. This script gets called every time which is fine and when I try to display name of a document that is being saved (doc.fullName) all works well. document name it works fine but when I try to display one of the fieldnames doc.display('Summary') I get groovy.lang.MissingMethodException: No signature of method com.xpn.xwiki.doc.XWikiDocument.display() is applicable for argument types: (java.lang.String) values: {Summary} I tried def tmpDoc = context.getWiki().getDocument(doc.fullName, context); But again fullName is OK but display('Summary') isn't Am I missing something in my syntax? How do I make document values available in my Notification class? As you see, that is not an api object, but an internal class (com.xpn.xwiki.doc.XWikiDocument vs. com.xpn.xwiki.api.Document). This means that API methods don't work, unless they have an equivalent in the other class. You can either look at the methods of the XWikiDocument class, or get an API object and work with it (new com.xpn.xwiki.apiDocument(tmpDoc) -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Adding survey question and details to page template...
Kevin and others It is really good that you got it but I think it is very important for people to share with others what they got, so if someone has a similar problem he/she can at least see a possible solution rather than repost the same question again. This happens very often on all forums. In my mind it doesn't matter how simple / trivial the solution is (user error, one line code etc) the point is it should be described and posted for future use. Regards Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of KevinC Sent: 21 January 2009 18:41 To: users@xwiki.org Subject: Re: [xwiki-users] Adding survey question and details to page template... I got it. -- View this message in context: http://n2.nabble.com/Adding-survey-question-and-details-to-page-template ...-tp2192675p2193848.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Adding survey question and details to page template...
Kevin The main thing I'm trying to determine at this point is if I can't require someone to have an account in order to vote, how do I keep them from voting multiple times? I can't use cookies, and I'm not sure using their IP address will prove of any use. Even if users do have to register in order to vote, I'm not sure there's an API method available that allows me to access their unique user ID as opposed to their user name. If I have to track usernames on each of these objects for all of the people who have ever voted on a particular question it could get out of hand really fast! Any ideas? Not sure if storing IDs instead of usernames makes much difference. Also IP addresses will change but maybe not that often. Just thinking but perhaps you could create a new property in your page class and add username to it each time someone votes. Then on load (view mode) you can get this list of usernames as an array and loop to check if current user already in there. If so then do not show the vote form. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of KevinC Sent: 22 January 2009 12:54 To: users@xwiki.org Subject: Re: [xwiki-users] Adding survey question and details to page template... Ajdin, You are absolutely right, especially since there seem to be so few people posting information from a users perspective. So here's what I did. The key to getting it working was an example I found in the snippets section that talked about how to create new documents with Tags. It showed an example of how to check if there was an instance of a certain class already attached to a document and create one if not (I already knew how to do this more or less). The important piece was how to set a property on that object once you have a handle to it. I don't have the code done completely yet but the basic shell is something like: #set($surveyObj = $doc.getObject(CPA_FAQs.SurveyClass)) #set($surveyChoice = $request.getParameter(surveyChoice)) #if(!$surveyObj) ##Create a new survey object and attach it to this document. #set($sObj = $doc.newObject(CPA_FAQs.SurveyClass)) $sObj.set(votetotal, $voteCnt) ## these are just here as an example $sObj.set(voters, $voters) ## as I haven't even created the Survey class yet $doc.save() #end #if($surveyChoice) ## Need to update the objects values here #end ## If the current user has voted don't allow them to vote again Was this information useful to you? form action=${doc.getURL()} method=POST style=display: inline input name=surveyChoice type=radio name=Yes value=Yes/Yes input name=surveyChoice type=radio name=No value=No/No nbsp;input type=submit value=Submit/ /form I still need to implement a few things but I know should work for what I need. The main thing I'm trying to determine at this point is if I can't require someone to have an account in order to vote, how do I keep them from voting multiple times? I can't use cookies, and I'm not sure using their IP address will prove of any use. Even if users do have to register in order to vote, I'm not sure there's an API method available that allows me to access their unique user ID as opposed to their user name. If I have to track usernames on each of these objects for all of the people who have ever voted on a particular question it could get out of hand really fast! Any ideas? Thanks! .:. Kevin -- View this message in context: http://n2.nabble.com/Adding-survey-question-and-details-to-page-template ...-tp2192675p2197567.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Panel Wizard at MyXwiki
I'm unable to get into Panel Wizard on http://patternlanguagenetwork.myxwiki.org Does it require Programming rights? It just hangs for 20+ secs then the main Admin page is displayed again. I want to add a new panel TagCloud based on Tag Cloud Snippet. Thanks Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] myxwiki.org down?
Anyone know what's happening with myxwiki.org? Ajdin NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Tags
HI I want to thank you all for replies. I shall not touch that page again and must admit that I had no idea that $xwiki.search($sql) required programming rights. again Thanks Ajdin Brandic Coventry University Key words: Main/Tags not working, Tags not showing, missing tags !! -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Vincent Massol Sent: 16 January 2009 16:43 To: XWiki Users Subject: Re: [xwiki-users] Tags On Jan 16, 2009, at 5:37 PM, Vincent Massol wrote: ok have a look at http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags I copied paste the content I had for the tags page from my local wiki. 2 things could have happened (still checking): 1) the page had the wrong content 2) when I saved I saved using programming rights and that page is using some private api that requires programming rights (which you don't have) 2) is most likely. I've checked and indeed it uses a private api which requires programming rights: #set ($tags = $xwiki.search($sql)) On wiki farms only users from the master wiki have programming rights (provided they are given programming rights there). This is to prevent subwikis to do dangerous things. Thus if you modify this page (or any other page requiring programming rights) and you save it, it'll not execute correctly since the private apis won't execute. Hence on myxwiki.org you need to ask here on this list if you need someone to save some page with programming rights. Thanks -Vincent On Jan 16, 2009, at 5:27 PM, Vincent Massol wrote: On Jan 16, 2009, at 5:21 PM, Ajdin Brandic wrote: Hi Vincent I just did the same and no tags showing. If I reedit the main page the tags are clearly displayed in the tag field so they have been saved. I guess when you say 2) tag the home page using the information panel in edit mode it means simply edit with WYSIWYG or editor=wiki. Yes. I've tried both in wiki edit mode or wysiwyg mode and both worked. What DB are you using? Thanks -Vincent Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Vincent Massol Sent: 16 January 2009 16:13 To: XWiki Users Subject: Re: [xwiki-users] Tags Hi Ajdin, I've just tested with a 1.8-SNAPSHOT version built a few minutes ago and it worked fine. Here's what I did: 1) go to tags page. No tags showing 2) tag the home page using the information panel in edit mode 3) go back to the tags page. The new tag is showing. Thanks -Vincent On Jan 16, 2009, at 4:30 PM, Ajdin Brandic wrote: Tags facility to display all tags in XWiki is not working as I mentioned before. I would really like someone from the development team to answer this post as there are others with the same problem. I searched internet for 'xwiki tags' and 'how to use xwiki tags' but get tons of pages which display No documents have been tagged yet I created an API that searches through Tags, I added some Velocity code to view/delete tags on a page, but cannot get the system to display all tags (Well I can on v1.6 but myxwiki is using the latest version). Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jean Couteau Sent: 29 December 2008 13:10 To: XWiki Users Subject: Re: [xwiki-users] Tags Hi Adjin, I do not know the reason, but I have exactly the same problem... Best regards, Jean Ajdin Brandic a écrit : Hi I've tried the same as below on my live site http://patternlanguagenetwork.myxwiki.org but no joy. Is there a reason why tags are not showing? I could not find any info on the web. Ajdin -Original Message- From: users-boun...@xwiki.org on behalf of Ajdin Brandic Sent: Wed 24/12/2008 12:43 To: XWiki Users Subject: [xwiki-users] Tags Hi I'm playing with tags and noticed something odd. I've added tags to a few pages but when I go to xwiki/bin/view/Main/Tags I always get message No documents have been tagged yet. To tag a document, edit it and enter the tags I've searched all the posts but found only one person having the same problem in April 2008 but no one answered. In the end I found the problem in the page itself ##set($sql = select distinct elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags') Note at the end and prop.id.name='tags' should be and prop.name='tags' Example: http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags There are some tags added alredy but none displayed. Also is there a list of all Hibernate Object names that relate to database tables (ie. DBStringListProperty = xwikilistitems or LargeStringProperty = xwikilargestrings). I am trying to work with xwiki but its documentation is patchy and sometimes out of date so I
Re: [xwiki-users] Tags
Hi Vincent I just did the same and no tags showing. If I reedit the main page the tags are clearly displayed in the tag field so they have been saved. I guess when you say 2) tag the home page using the information panel in edit mode it means simply edit with WYSIWYG or editor=wiki. Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Vincent Massol Sent: 16 January 2009 16:13 To: XWiki Users Subject: Re: [xwiki-users] Tags Hi Ajdin, I've just tested with a 1.8-SNAPSHOT version built a few minutes ago and it worked fine. Here's what I did: 1) go to tags page. No tags showing 2) tag the home page using the information panel in edit mode 3) go back to the tags page. The new tag is showing. Thanks -Vincent On Jan 16, 2009, at 4:30 PM, Ajdin Brandic wrote: Tags facility to display all tags in XWiki is not working as I mentioned before. I would really like someone from the development team to answer this post as there are others with the same problem. I searched internet for 'xwiki tags' and 'how to use xwiki tags' but get tons of pages which display No documents have been tagged yet I created an API that searches through Tags, I added some Velocity code to view/delete tags on a page, but cannot get the system to display all tags (Well I can on v1.6 but myxwiki is using the latest version). Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Jean Couteau Sent: 29 December 2008 13:10 To: XWiki Users Subject: Re: [xwiki-users] Tags Hi Adjin, I do not know the reason, but I have exactly the same problem... Best regards, Jean Ajdin Brandic a écrit : Hi I've tried the same as below on my live site http://patternlanguagenetwork.myxwiki.org but no joy. Is there a reason why tags are not showing? I could not find any info on the web. Ajdin -Original Message- From: users-boun...@xwiki.org on behalf of Ajdin Brandic Sent: Wed 24/12/2008 12:43 To: XWiki Users Subject: [xwiki-users] Tags Hi I'm playing with tags and noticed something odd. I've added tags to a few pages but when I go to xwiki/bin/view/Main/Tags I always get message No documents have been tagged yet. To tag a document, edit it and enter the tags I've searched all the posts but found only one person having the same problem in April 2008 but no one answered. In the end I found the problem in the page itself ##set($sql = select distinct elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags') Note at the end and prop.id.name='tags' should be and prop.name='tags' Example: http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags There are some tags added alredy but none displayed. Also is there a list of all Hibernate Object names that relate to database tables (ie. DBStringListProperty = xwikilistitems or LargeStringProperty = xwikilargestrings). I am trying to work with xwiki but its documentation is patchy and sometimes out of date so I try to find info in the database to understand xwiki structure but get stuck when I want to get some info out using HQL. I usualy spend hours looking through Volocity scripts. Ajdin Brandic Coventry University NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] groovy.lang.MissingMethodException
Hi Kevin Yes, you are correct. So how do I get the correct instance? Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Kevin_C Sent: 14 January 2009 15:12 To: users@xwiki.org Subject: Re: [xwiki-users] groovy.lang.MissingMethodException Is Summary a property you've added to a custom class that this document is an instance of? By default an XWiki document doesn't have a summary property which I believe is why you are getting that error. Hope this helps! .:. Kevin -- View this message in context: http://n2.nabble.com/Custom-class-field-as-field-on-a-different-class-tp 2152709p2157296.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Scripting issue - xwiki
Hi I wander if anyone can help. I have found a discussion on IRC between users asyd and lucaa but the was no answer to the problem. I have two Groovy Classes saved as two pages page1 and page2. I also have some scripting outside class in page1. So page1 class requires an instance of page2 class and I use xwiki.parseGroovyFromPage(somespace.page2) which works fine until I introduce a third page / script called page3. In page3 I use xwiki.parseGroovyFromPage(somespace.page1) REMEMBER: page1 also uses parseGroovyFromPage to call page2. I get NullPinterException when page1 class tries to access a method of page2 class. I then tried to create an instance of page1 and page 2 classes in my page3 script then pass page2 instance as parameter to page1 but still the same error. Is there any way around this except putting all content (page1 and page2) into one class? I would really appreciate some feedback. If you require the code to be sent I'll gladly do that. Thanks Ajdin B. NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Scripting issue - xwiki
Hi again My problem was that in my Velocity script (page3) I forgot to add $ in front of some variable names (Groovy doesn't use $) so the real values were not passed across correctly and the object was not created correctly therefore NullPointerException (Null Pointer Exception). Anyway, for those who get stuck like me, this is the correct way to include groovy class within another groovy class. Velocity script : #set($wsd = $xwiki.parseGroovyFromPage(GroovyScripts.Class1)) #set($discard2 = $wsd.setXWiki($xwiki, $context)); Groovy Class1: def groovyHTTP = xwiki.parseGroovyFromPage(GroovyScripts.Class2); //then groovyHTTP.someMethod(someParam); Groovy Class2: //some methods * Some tags: Include groovy class in velocity script, pass value from velocity to groovy * Ajdin -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Ajdin Brandic Sent: 12 January 2009 13:50 To: XWiki Users Subject: [xwiki-users] Scripting issue - xwiki Hi I wander if anyone can help. I have found a discussion on IRC between users asyd and lucaa but the was no answer to the problem. I have two Groovy Classes saved as two pages page1 and page2. I also have some scripting outside class in page1. So page1 class requires an instance of page2 class and I use xwiki.parseGroovyFromPage(somespace.page2) which works fine until I introduce a third page / script called page3. In page3 I use xwiki.parseGroovyFromPage(somespace.page1) REMEMBER: page1 also uses parseGroovyFromPage to call page2. I get NullPinterException when page1 class tries to access a method of page2 class. I then tried to create an instance of page1 and page 2 classes in my page3 script then pass page2 instance as parameter to page1 but still the same error. Is there any way around this except putting all content (page1 and page2) into one class? I would really appreciate some feedback. If you require the code to be sent I'll gladly do that. Thanks Ajdin B. NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Tags
Hi I've tried the same as below on my live site http://patternlanguagenetwork.myxwiki.org; but no joy. Is there a reason why tags are not showing? I could not find any info on the web. Ajdin -Original Message- From: users-boun...@xwiki.org on behalf of Ajdin Brandic Sent: Wed 24/12/2008 12:43 To: XWiki Users Subject: [xwiki-users] Tags Hi I'm playing with tags and noticed something odd. I've added tags to a few pages but when I go to xwiki/bin/view/Main/Tags I always get message No documents have been tagged yet. To tag a document, edit it and enter the tags I've searched all the posts but found only one person having the same problem in April 2008 but no one answered. In the end I found the problem in the page itself ##set($sql = select distinct elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags') Note at the end and prop.id.name='tags' should be and prop.name='tags' Example: http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags There are some tags added alredy but none displayed. Also is there a list of all Hibernate Object names that relate to database tables (ie. DBStringListProperty = xwikilistitems or LargeStringProperty = xwikilargestrings). I am trying to work with xwiki but its documentation is patchy and sometimes out of date so I try to find info in the database to understand xwiki structure but get stuck when I want to get some info out using HQL. I usualy spend hours looking through Volocity scripts. Ajdin Brandic Coventry University NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Tags not showing
Hi I'm playing with tags and noticed something odd. I've added tags to a few pages but when I go to xwiki/bin/view/Main/Tags I always get message No documents have been tagged yet. To tag a document, edit it and enter the tags I've searched all the posts but found only one person having the same problem in April 2008 but no one answered. In the end I found the problem in the page itself ##set($sql = select distinct elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags') Note at the end and prop.id.name='tags' should be and prop.name='tags' Example: http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags There are some tags added already but none displayed. Also is there a list of all Hibernate Object names that relate to database tables (ie. DBStringListProperty = xwikilistitems or LargeStringProperty = xwikilargestrings). I am trying to work with xwiki but its documentation is patchy and sometimes out of date so I try to find info in the database to understand xwiki structure but get stuck when I want to get some info out using HQL. I usually spend hours looking through Velocity scripts. I have not fixed this on NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Tags
Hi I'm playing with tags and noticed something odd. I've added tags to a few pages but when I go to xwiki/bin/view/Main/Tags I always get message No documents have been tagged yet. To tag a document, edit it and enter the tags I've searched all the posts but found only one person having the same problem in April 2008 but no one answered. In the end I found the problem in the page itself ##set($sql = select distinct elements(prop.list) from BaseObject as obj, DBStringListProperty as prop where obj.className='XWiki.TagClass' and obj.id=prop.id.id and prop.id.name='tags') Note at the end and prop.id.name='tags' should be and prop.name='tags' Example: http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/Tags There are some tags added alredy but none displayed. Also is there a list of all Hibernate Object names that relate to database tables (ie. DBStringListProperty = xwikilistitems or LargeStringProperty = xwikilargestrings). I am trying to work with xwiki but its documentation is patchy and sometimes out of date so I try to find info in the database to understand xwiki structure but get stuck when I want to get some info out using HQL. I usualy spend hours looking through Volocity scripts. Ajdin Brandic Coventry University NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Java Heap Space, Out of memory exception
Sergiu Xwiki would not start with heap size more than 1.6gb, I've attempted this. I'll try the other option you've suggested although I do not know how to load sql dump into HSQLDB? I've you have any suggestions please advise. I searched web for 2 days looking for answers to this question and all I found was JAVA_OPTS and CATALINA_OPTS suggestions. I have not seen any ware your comment on handling attachment consumes about 27 time the size of the attachment. It was probably some ware out there but I missed it. Maybe you should include it on the Import/Export page http://platform.xwiki.org/xwiki/bin/view/AdminGuide/ImportExport Thank you for your response, at least I know where the issue is. Ajdin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sergiu Dumitriu Sent: 05 December 2008 10:14 To: XWiki Users Subject: Re: [xwiki-users] Java Heap Space, Out of memory exception Ajdin Brandic wrote: Hi All I am having a problem uploading a xar file. I get Java Heap Space, Out of memory exception (full message below). I've downloaded the latest version of XWiki for windows xp (beginner's version with HSQLDB Jetty). In my start_xwiki.bat I have set set JAVA_OPTS=-Xmx1600m -Xms512m. 1.6gb is the maximum as xwiki would not start if I go over this. I don't think I have CATALINA.bat any ware so I din not find where to set CATALINA_OPTS. I have changed file upload size to 133MB by going to http://localhost:8080/xwiki/bin/edit/XWiki/XWikiPreferences?editor=obj ec t and changing Maximum Upload Size:. The .xar file is 90MB downloaded as backup from http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/WebHome. I do not know what version this runs on since it is on one of the xwiki farm things :-). I have Win XP with 3.5gb memory available. Has anyone had this error recently? This is a major design flaw of the current attachment storage model. As stated in a previous mail, handling attachment consumes about 27 time the size of the attachment, so 90M * 27 ~= 2.5G. This needs to be fixed ASAP. In the meantime, you can either increase the heap size to more than 2.5G, or request an sql dump from the myxwiki farm admins. -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Java Heap Space, Out of memory exception
Hi I am still learning about xwiki (how to code velocity, code/add plug-in etc) so wanted some real data. I will install mysql and ask for sql dump as Sergiu suggested. I will add a few notes as Comments to Import/Export and Download pages!! Many thanks! Ajdin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Massol Sent: 05 December 2008 10:30 To: XWiki Users Subject: Re: [xwiki-users] Java Heap Space, Out of memory exception On Dec 5, 2008, at 11:23 AM, Ajdin Brandic wrote: Sergiu Xwiki would not start with heap size more than 1.6gb, I've attempted this. I'll try the other option you've suggested although I do not know how to load sql dump into HSQLDB? I've you have any suggestions please advise. One warning: You should definitely not use HSQLDB for anything more than demo purpose. It's not a production database. Thanks -Vincent I searched web for 2 days looking for answers to this question and all I found was JAVA_OPTS and CATALINA_OPTS suggestions. I have not seen any ware your comment on handling attachment consumes about 27 time the size of the attachment. It was probably some ware out there but I missed it. Maybe you should include it on the Import/Export page http://platform.xwiki.org/xwiki/bin/view/AdminGuide/ImportExport Thank you for your response, at least I know where the issue is. Ajdin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sergiu Dumitriu Sent: 05 December 2008 10:14 To: XWiki Users Subject: Re: [xwiki-users] Java Heap Space, Out of memory exception Ajdin Brandic wrote: Hi All I am having a problem uploading a xar file. I get Java Heap Space, Out of memory exception (full message below). I've downloaded the latest version of XWiki for windows xp (beginner's version with HSQLDB Jetty). In my start_xwiki.bat I have set set JAVA_OPTS=-Xmx1600m -Xms512m. 1.6gb is the maximum as xwiki would not start if I go over this. I don't think I have CATALINA.bat any ware so I din not find where to set CATALINA_OPTS. I have changed file upload size to 133MB by going to http://localhost:8080/xwiki/bin/edit/XWiki/XWikiPreferences? editor=obj ec t and changing Maximum Upload Size:. The .xar file is 90MB downloaded as backup from http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Main/ WebHome. I do not know what version this runs on since it is on one of the xwiki farm things :-). I have Win XP with 3.5gb memory available. Has anyone had this error recently? This is a major design flaw of the current attachment storage model. As stated in a previous mail, handling attachment consumes about 27 time the size of the attachment, so 90M * 27 ~= 2.5G. This needs to be fixed ASAP. In the meantime, you can either increase the heap size to more than 2.5G, or request an sql dump from the myxwiki farm admins. -- Sergiu Dumitriu ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users NOTICE This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users