[xwiki-users] Xwiki / accessing external SQL database / How to use SQL plugin ?
Hi, We are looking for the best way to access an external SQL database using velocity exclusively (because we can't write a macro using groovy language). So, we installed and tried to use this plugin : http://extensions.xwiki.org/xwiki/bin/view/Extension/SQL+Plugin. The plugin is properly installed. Now we are unsure how to use it : there is no mention of the user which is used to connect to the database, do we have to to configure a JNDI ? How ? As a side question, what is you guys your preferred method to program xwiki pages with external database access ? Thanks -- Martin ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] V7, wikis creation, descriptors and wizard issues.
Hi all, In XWiki prior to V6, when creating a new wiki using the Wiki Manager, we had the choice to provision the wiki or not by choosing "Later" from the wizard. That 'Later' trick was very useful because it was allowing the wiki descriptor to be created (but not only it, see below) without adding content to the wiki. Then, if you wanted to import a wiki (or subwiki) from another xwiki instance to the new instance using a database dump, you just had to drop and recreate the just-created database and import the dump. This is more or less what is explained here http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Backup. Less because there is no notion of sub-wiki in this doc, but we will cover this in another thread. The current one being how to bring a solution to my current issue. So the wizard trick was useful. Now in V7 any new wiki is automatically provisioned, no choice on this. Today we need to import an existing wiki in a older xwiki to a fresh xwiki v7 farm. We could export the older wiki as XAR but for some reason, the admin tool's large export tool (http://extensions.xwiki.org/xwiki/bin/view/Extension/Large+Export+By+Space+Application) locks after writing 1.7GB (vmassol, is this the other one you suggested to use http://extensions.xwiki.org/xwiki/bin/view/Extension/Large+Wiki+Export ? ) Anyway we get used to db level export so we are working through this thread. We spend the whole day to turn around the problem in V7 until we got bored to hell :) 1) if you try to create the descriptor by hand, there is something that prevent it to be listed in the wikimanager. 2) to turn around 1), we've created a 'dummy' wiki using the UI as the usual manner, then exported a XAR of the 'dummy' wiki descriptor document. 3) Restore the XAR with option "as backup" turned on (the last is very important). 4) So now we got a descriptor for our wiki. There is still no corresponding database at this point so we create the database and import the content. 5) now restart xwiki so the database upgrade occurs. Well. 6) Now we indeed run the imported wiki but next we have to upgrade all the documents package but no wizard is triggered ? Why : the issue at this point is there is no folder in the PermDir/jobs/status/distribution/wiki/ which sounds logical because we created the descriptor "by hand" throught a XAR import which doesn't include the process of writing initial status.xml files in PermDir/jobs/status/distribution/wiki//status.xml So indeed we're stuck. How do we run the Document Wizard Upgrade at this point ? Regards, -- Martin ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] V7, wikis creation, descriptors and wizard issues.
Le 21/04/2015 17:10, m...@ow2.org a écrit : > Why : the issue at > this point is there is no folder in the > PermDir/jobs/status/distribution/wiki/ which sounds logical > because we created the descriptor "by hand" throught a XAR import which > doesn't include the process of writing initial status.xml files in > PermDir/jobs/status/distribution/wiki//status.xml > > So indeed we're stuck. How do we run the Document Wizard Upgrade at this > point ? The other issue was the imported wiki skin definition was overriding the DW URL. Since then we have moved to XWiki 6.4.4 as it is the version supported by XWiki SAS. We did the wizard trick and poped up the DW by typing the URL by hand in the broswer, so it bypass the skin. Anyway, there is still some migration/move/upgrade use cases scenarios to elaborate. I'll start this when I got time. But anyone can start over, maybe you, Denis ? -- Martin ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Filesystem porter issue (VoidAttachmentVersioningStore)
Hi, Like described in http://jira.xwiki.org/browse/XWIKI-13348 I get a red line on VoidAttachmentVersioningStore. I have double-checked the configuration (those three lines in xwiki.cfg). Could someone give a hand ? Is it safe to run the backup script like this anyway ? PS: I've also attached a screenshot of the error in the issue Thanks ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Filesystem porter issue (VoidAttachmentVersioningStore)
Le 25/04/2016 11:47, m...@ow2.org a écrit : > Is it safe to run the backup script like > this anyway ? Well it throw an error, as expected, can find a method in null object. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Filesystem porter issue (VoidAttachmentVersioningStore)
Well, Having VoidAttachmentVersioningStore here just prevents the script to run, this is why I'm asking for help :) Le 25/04/2016 12:17, Caleb James DeLisle a écrit : > Hmm, I don't recall whether VoidAttachmentVersioningStore was supported > but in any case you should have little difficulty if you switch attachment > versioning store to file and then switch to void after making the > migration. > > Thanks, > Caleb > > > On 25/04/16 11:47, m...@ow2.org wrote: >> Hi, >> >> Like described in http://jira.xwiki.org/browse/XWIKI-13348 I get a red >> line on VoidAttachmentVersioningStore. >> >> I have double-checked the configuration (those three lines in xwiki.cfg). >> >> Could someone give a hand ? Is it safe to run the backup script like >> this anyway ? >> >> PS: I've also attached a screenshot of the error in the issue >> >> Thanks >> ___ >> 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] Filesystem porter issue (VoidAttachmentVersioningStore)
Hi Caleb, I'm not sure to understand, As described in http://jira.xwiki.org/browse/XWIKI-13348 , xwiki.store.attachment.versioning.hint=file is *already* set to "file". That's the point here. Le 27/04/2016 09:53, Caleb James DeLisle a écrit : > So try setting your AttachmentVersionStore in your config to "file" as per > the recommendations. When the porter is complete you can set it back. > > Thanks, > Caleb > > > On 26/04/16 09:01, m...@ow2.org wrote: >> Well, >> Having VoidAttachmentVersioningStore here just prevents the script to >> run, this is why I'm asking for help :) >> >> Le 25/04/2016 12:17, Caleb James DeLisle a écrit : >>> Hmm, I don't recall whether VoidAttachmentVersioningStore was supported >>> but in any case you should have little difficulty if you switch >>> attachment >>> versioning store to file and then switch to void after making the >>> migration. >>> >>> Thanks, >>> Caleb >>> >>> >>> On 25/04/16 11:47, m...@ow2.org wrote: >>>> Hi, >>>> >>>> Like described in http://jira.xwiki.org/browse/XWIKI-13348 I get a red >>>> line on VoidAttachmentVersioningStore. >>>> >>>> I have double-checked the configuration (those three lines in >>>> xwiki.cfg). >>>> >>>> Could someone give a hand ? Is it safe to run the backup script like >>>> this anyway ? >>>> >>>> PS: I've also attached a screenshot of the error in the issue >>>> >>>> Thanks >>>> ___ >>>> 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] Filesystem porter issue (VoidAttachmentVersioningStore)
Hi, This was a terribly ridiculous mistake from my side: xwiki.store.attachment.versioning was set to "0" ! Apologies, Martin Le 28/04/2016 08:42, m...@ow2.org a écrit : > Hi Caleb, > > I'm not sure to understand, > > As described in http://jira.xwiki.org/browse/XWIKI-13348 , > xwiki.store.attachment.versioning.hint=file is *already* set to "file". > That's the point here. > > Le 27/04/2016 09:53, Caleb James DeLisle a écrit : >> So try setting your AttachmentVersionStore in your config to "file" as per >> the recommendations. When the porter is complete you can set it back. >> >> Thanks, >> Caleb >> >> >> On 26/04/16 09:01, m...@ow2.org wrote: >>> Well, >>> Having VoidAttachmentVersioningStore here just prevents the script to >>> run, this is why I'm asking for help :) >>> >>> Le 25/04/2016 12:17, Caleb James DeLisle a écrit : >>>> Hmm, I don't recall whether VoidAttachmentVersioningStore was supported >>>> but in any case you should have little difficulty if you switch >>>> attachment >>>> versioning store to file and then switch to void after making the >>>> migration. >>>> >>>> Thanks, >>>> Caleb >>>> >>>> >>>> On 25/04/16 11:47, m...@ow2.org wrote: >>>>> Hi, >>>>> >>>>> Like described in http://jira.xwiki.org/browse/XWIKI-13348 I get a red >>>>> line on VoidAttachmentVersioningStore. >>>>> >>>>> I have double-checked the configuration (those three lines in >>>>> xwiki.cfg). >>>>> >>>>> Could someone give a hand ? Is it safe to run the backup script like >>>>> this anyway ? >>>>> >>>>> PS: I've also attached a screenshot of the error in the issue >>>>> >>>>> Thanks >>>>> ___ >>>>> 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 > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] SSO extensions, LDAP mapping, configuration availability at run-time
Hi, On of the goal we would like to achieve using XWiki is SSO integration in relation to our openLDAP server, through LemonLDAP::NG (http://www.lemonldap-ng.org/). We have tried with success the extension at http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki+Authenticator+Headers but we see a limitation here : it seems not possible to re-configure this extension at run-time from the UI, it means that the instance should be restarted when in the need to alter a configuration option like xwiki.authentication.headers.groups_mapping (and fields_mapping too). The same remark apply to other SSO extensions like Jasig CAS/SAML one. What would be the implication in terms of development power to make those configuration properties available at run-time ? Like it's done within the LDAP Application for example. For a start we don't necessarily need an UI/app but at least the attributes somewhere available in object mode. Another option I see is the possibility to achieve group mapping directly from the LDAP instead of getting it from the headers. That would lead to a combination of the LDAP authenticator and SSO (but at the moment only one authclass can be used at a time). Cheers, Martin ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] API/Scripting : create user and attach some files to its profile
Hi, I'm working on a registration system around xwiki. The basic workflow is the user is created in a LDAP directory at registration time. Then the user can login to xwiki. It's only upon the first successful login to xwiki that the user's xwiki profile is created in xwiki database. Now here is my point : how could I prepare the user profile *before* he gets connected ? For example I would be able to attach some files to XWiki. and why not some others attributes. Is anyone already achieved this ? Cheers ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] API/Scripting : create user and attach some files to its profile
Hi Pascal, Thanks for the tip :) It answers to the "how to add a field" part of my question. But it doesn't answer about attaching file to the profile. The main issue I see here is the account is created on login. Or maybe there might be a hook system so we can trigger something when the account is created( ie, to attach files to the profile) ? Cheers, Le 28/11/2016 à 08:46, Pascal BASTIEN a écrit : > Hello, > > I added some others attributes (I don't know if you can do the same with file) > Add some attributes here: /bin/edit/XWiki/XWikiUsers?editor=class > e.g. myaddress > (disabled it to prevent your user modified it) > > Add this field "myaddress" on the sheet: > /bin/view/XWiki/AdminUserProfileSheet > and finally add it in xwiki.cfg: > #-# retrieve the following fields from LDAP and store them in the XWiki user > object (xwiki-attribute=ldap-attribute) > xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,email=xcut,myaddress=street > and choose a value for this setting: > #-# On every login update the mapped attributes from LDAP to XWiki otherwise > this happens only once when the XWiki > #-# account is created. > #-# - 0: only when creating user > #-# - 1: at each authentication > #-# The default is 0 > xwiki.authentication.ldap.update_user=1 > > > (eventually add a XWiki.TranslationDocumentClass to translate myaddress > attribute) > > > Pascal BASTIEN > > > En date de : Ven 25.11.16, m...@ow2.org a écrit : > > Objet: [xwiki-users] API/Scripting : create user and attach some files to > its profile > À: "XWiki Users" > Date: Vendredi 25 novembre 2016, 12h37 > > Hi, > > I'm working on a registration system around xwiki. > > The basic workflow is the user is created in a LDAP > directory at > registration time. Then the user can login to xwiki. > It's only upon the first successful login to xwiki that the > user's xwiki > profile is created in xwiki database. > > Now here is my point : how could I prepare the user profile > *before* he > gets connected ? For example I would be able to attach some > files to > XWiki. and why not some others attributes. > > Is anyone already achieved this ? > > Cheers > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > >
Re: [xwiki-users] API/Scripting : create user and attach some files to its profile
Hi Pascal, It is a per-user PDF file generated on the fly by an external PHP routine. Then I should find a way to attach it to the user profile BEFORE that user profile is created (at auth time). I can use PHP to access XWIKI's api and attach the file to the user profile but it should exists first. Le 29/11/2016 à 15:12, Pascal BASTIEN a écrit : > You must tell us what is this file? > A custom file per user? where did this file come from? Do you want this file > attached to profile user? > Etc. > Your file is in your ldap ilike users photo:? > #-# [Since 8.1M2, XWikiLDAPAuthServiceImpl] > #-# On every login update photo from LDAP to XWiki avatar otherwise photo > will not be updated. > #-# - 0: never > #-# - 1: at each authentication > #-# The default is 0 > # xwiki.authentication.ldap.update_photo=0 > > Anyway you can add custom velocity code here: > /bin/edit/XWiki/XWikiUserProfileSheet?editor=wiki > (I don't know it it is a clean way, it depend of your use case desired) > > ------------ > En date de : Mar 29.11.16, m...@ow2.org a écrit : > > Objet: Re: [xwiki-users] API/Scripting : create user and attach some files > to its profile > À: "XWiki Users" > Date: Mardi 29 novembre 2016, 9h00 > > Hi Pascal, > Thanks for the tip :) > > It answers to the "how to add a > field" part of my question. But it > doesn't answer about attaching file to the > profile. The main issue I see > here is the > account is created on login. Or maybe there might be a > hook > system so we can trigger something when > the account is created( ie, to > attach files > to the profile) ? > > Cheers, > > Le > 28/11/2016 à 08:46, Pascal BASTIEN a écrit : > > Hello, > > > > I added some others attributes (I > don't know if you can do the same with file) > > Add some attributes here: > /bin/edit/XWiki/XWikiUsers?editor=class > > > e.g. myaddress > > (disabled it to prevent > your user modified it) > > > > Add this field "myaddress" on > the sheet: /bin/view/XWiki/AdminUserProfileSheet > > and finally add it in xwiki.cfg: > > #-# retrieve the following fields from > LDAP and store them in the XWiki user object > (xwiki-attribute=ldap-attribute) > > > > xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,email=xcut,myaddress=street > > and choose a value for this setting: > > #-# On every login update the mapped > attributes from LDAP to XWiki otherwise this happens only > once when the XWiki > > #-# account is > created. > > #-# - 0: only when creating > user > > #-# - 1: at each authentication > > #-# The default is 0 > > > xwiki.authentication.ldap.update_user=1 > > > > > > > (eventually add > a XWiki.TranslationDocumentClass to translate myaddress > attribute) > > > > > > Pascal BASTIEN > > > > > > > En date de : Ven 25.11.16, m...@ow2.org a écrit > : > > > > Objet: > [xwiki-users] API/Scripting : create user and attach some > files toits profile > > À: > "XWiki Users" > > Date: Vendredi 25 novembre 2016, > 12h37 > > > > Hi, > > > > I'm working > on a registration system around xwiki. > > > > The basic > workflow is the user is created in a LDAP > > directory at > > > registration time. Then the user can login to xwiki. > > It's only upon the first successful > login to xwiki that the > > user's > xwiki > > profile is created in xwiki > database. > > > > Now > here is my point : how could I prepare the user profile > > *before* he > > gets > connected ? For example I would be able to attach some > > files to > > > XWiki. and why not some others > attributes. > > > > > Is anyone already achieved this ? > > > > Cheers > > > ___ > > users mailing list > > users@xwiki.org > > http://lists.xwiki.org/mailman/listinfo/users > > > > > > > -- Martin
Re: [xwiki-users] API/Scripting : create user and attach some files to its profile
Le 08/12/2016 à 10:42, Hamster a écrit : > That sounds a lot like... > > "Here's a file, you should save it in that non-existing folder" > > "But the folder does not exist yet...how am I going to save that file???" When you are turning my request into a non-sense like this, I feel a little scorned. Still this is a real question with a real usecase scenario. Would you have something valuable to bring ? And you cut the remaining part of my post. Cheers
[xwiki-users] file upload issue with apache's 'http' reverse proxy (ok with ajp)
Hi, We are (still) running xwiki 6.4.4 and last week we have switched from ajp to http, because we have reasons to think it could solves our issue at http://jira.xwiki.org/browse/XWIKI-12125 Now we run into the following side-effect as we run apache/tomcat with http connector, it prevents us to upload files to wikis. The error is when we try to upload a file to https://mysite.ltd/bin/view/test/tutu (notice, https). We get, in red, at the bottom "An error occurred while uploading xxx.jpg" error when upload a file on page. firebug says: Blocage du chargement du contenu mixte actif (mixed active content) « http://mysite.tld/bin/get/test/tutu?xpage=attachmentslist&forceTestRights=1 » Sorry it's in French - but it basically says that mixed active content loading has been blocked... I don't understand why the URL /bin/get above have "http" instead of "https". The configuration is as follow, apache: ServerName ... # SSL Config... ... ProxyPreserveHost On # This one has been disabled in favor to http # to test if it solve XWIKI-12125 #ProxyPass / ajp://localhost:1234/ retry=5 #ProxyPassReverse / ajp://localhost:1234/ # This one fails with file upload to xwiki ProxyPass / http://localhost:5678/ retry=5 ProxyPassReverse / http://localhost:5678/ both tomcat connectors are like that: What could be the issue ? Cheers, Martin
Re: [xwiki-users] file upload error with apache's 'http' reverse proxy (ok with ajp)
I didn't noticed when doing my initial testing, but it seems that even with the error showing up the file is well transferred to the wiki. Weird. Le 13/03/2017 à 10:09, m...@ow2.org a écrit : > Hi, > > We are (still) running xwiki 6.4.4 and last week we have switched from > ajp to http, because we have reasons to think it could solves our issue > at http://jira.xwiki.org/browse/XWIKI-12125 > > Now we run into the following side-effect as we run apache/tomcat with > http connector, it prevents us to upload files to wikis. > > The error is when we try to upload a file to > https://mysite.ltd/bin/view/test/tutu (notice, https). > > We get, in red, at the bottom "An error occurred while uploading > xxx.jpg" error when upload a file on page. > > firebug says: Blocage du chargement du contenu mixte actif (mixed active > content) « > http://mysite.tld/bin/get/test/tutu?xpage=attachmentslist&forceTestRights=1 > » > > Sorry it's in French - but it basically says that mixed active content > loading has been blocked... > > I don't understand why the URL /bin/get above have "http" instead of > "https". > > The configuration is as follow, > > apache: > > > ServerName ... > > # SSL Config... > ... > > ProxyPreserveHost On > > # This one has been disabled in favor to http > # to test if it solve XWIKI-12125 > #ProxyPass / ajp://localhost:1234/ retry=5 > #ProxyPassReverse / ajp://localhost:1234/ > > # This one fails with file upload to xwiki > ProxyPass / http://localhost:5678/ retry=5 > ProxyPassReverse / http://localhost:5678/ > > > > both tomcat connectors are like that: > > connectionTimeout="2" >redirectPort="8443" /> > > connectionTimeout="1" maxConnections="500"/> > > What could be the issue ? > > Cheers, > > Martin > >