[xwiki-users] Problem hibernate
Hello, I migrated from Debian packages xwiki 7.3 to 7.4 Since I have two errors: • when connecting, the connection is very very long. It loads after validation of login and password, and then it displays the dashboard. I do not see in the logs where it loses time. • when edtion of any page During validation, hiberntate sends me an error: Information détaillée: Error number 3201 in 3: Exception while saving document suivitaxedesjour:Changements de tarifs 2016.WebHome com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document suivitaxedesjour:Changements de tarifs 2016.WebHome at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:658) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:167) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:160) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1564) at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:181) at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:223) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:416) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:184) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:115) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:127) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:690) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:477) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329) at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:105) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:124) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) at org.apache.c
Re: [xwiki-users] Fw : Fw : Re: Fw : Re: Fw : Re: How can I get event object through a form
Thxs => useful links bookmarked :-) Anyway, how do you found default alias of table name then? By example the alias "act" in my hql string here "act.eventId" (I found it by chance in error log) #set($results= $xwiki.activitystream.searchEvents("act.eventId in ($ListIn)", false, 0, 0)) Here i suppose? https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-activitystream/xwiki-platform-activitystream-api/src/main/java/com/xpn/xwiki/plugin/activitystream/impl/ActivityStreamImpl.java#L429-L430 En date de : Mer 20.1.16, Eduard Moraru a écrit : Objet: Re: [xwiki-users] Fw : Fw : Re: Fw : Re: Fw : Re: How can I get event object through a form À: "Pascal BASTIEN" , "XWiki Users" Date: Mercredi 20 janvier 2016, 16h36 Hi, This is the activitystream hibernate mapping where you can see the exact property names: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-activitystream/xwiki-platform-activitystream-api/src/main/resources/activitystream.hbm.xml ...and this is the regular XWiki model mapping (corresponding to the other tables observed in http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema ) https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xwiki.hbm.xml Remember that, when writing HQL, you need to look at the hibernate mapping, not just the SQL database schema (which is useful, but can be misleading). Thanks, Eduard ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Fw : Fw : Re: Fw : Re: Fw : Re: How can I get event object through a form
Hi, This is the activitystream hibernate mapping where you can see the exact property names: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-activitystream/xwiki-platform-activitystream-api/src/main/resources/activitystream.hbm.xml ...and this is the regular XWiki model mapping (corresponding to the other tables observed in http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema ) https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/xwiki.hbm.xml Remember that, when writing HQL, you need to look at the hibernate mapping, not just the SQL database schema (which is useful, but can be misleading). Thanks, Eduard On Wed, Jan 20, 2016 at 9:27 AM, Pascal BASTIEN wrote: > Ok thxs guys > I didn't understood why my $xwiki.activitystream.searchEvents doesn't work > with eventid... > > I'm starting to begin some help and copy/paste > Doc http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema > indicate: > "In a hibernate query you can use the same name as the get method but > without the get and with the first letter lowercase so the SQL query" > > I drink a strong coffe and read ... WITH THE FIRST LETTER LOWERCASE! > > Then I replace my EventId by eventId to fix my ugly code (because public > String getEventId()): > #set($results= > $xwiki.activitystream.searchEvents("act.eventId='$MyValue'", false, 0, 0)) > and tad! > it's working thxs a lot. > I will post my form here later when it will be ready if you want it. :-) > > > > $xwiki.activitystream.method but if I use where condition on > > eventid field I obtain this error :-( > > > > > > Caused by: org.hibernate.QueryException: could not resolve > > property: EventId of: > > com.xpn.xwiki.plugin.activitystream.impl.ActivityEventImpl > > [select act from > > com.xpn.xwiki.plugin.activitystream.impl.ActivityEventImpl > > as act where > > act.EventId='757328280-1453216488000-dishFheu' order by > > act.date desc] > > at > > > org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81) > > > > > ___ > 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] Problems setting up multilingual site
With XWiki 7.4 I have a site setup in Brazilian Portuguese (pt_BR). I edited the localization settings as follows: Multilingual - Yes Supported languages - pt_BR, en Default language - pt_BR After saving the settings, the site looks like it switches to the pt local (European Portuguese?). I can tell this because the pt local is much more sparsely translated. On the drop down menu on the right, I now see a Languages item with Portuguese and English options and selecting English switches the site to English. I go back to the drop down menu and select languages. But now I only see English - Portuguese is not listed as an available language. I tried to repeat the above with a fresh install. This time I first set the local to pt (no multilingual support) and verified that the site is switch to pt. Then I set the multilingual support to yes and added the en local (pt still the default). Now the site switches immediately to English and the only language available on the drop down menu on the right is English. I'd appreciate some help in setting up my site for multilingual support with both English and Brazilian Portuguese. Is there something I'm doing wrong? -- View this message in context: http://xwiki.475771.n2.nabble.com/Problems-setting-up-multilingual-site-tp7597630.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
Re: [xwiki-users] How can I get event object through a form (a form to choose and delete manually some events)
On 20 Jan 2016 at 11:49:31, Pascal BASTIEN (pbasnews-xw...@yahoo.fr) wrote: greedy! indeed :) Ok I will find some time to post that :-) cool, thanks -Vincent En date de : Mer 20.1.16, vinc...@massol.net a écrit : Objet: Re: [xwiki-users] How can I get event object through a form (a form to choose and delete manually some events) À: "XWiki Users" Cc: "Pascal BASTIEN" Date: Mercredi 20 janvier 2016, 11h06 #yiv8476593446 body{font-family:Helvetica, Arial;font-size:13px;}Hi Pascal, What would be very nice would be to post this snippet on extensions.xwiki.org :) (With possibly a screenshot to attract users…) Thanks!-Vincent On 20 Jan 2016 at 11:03:13, Pascal BASTIEN (pbasnews-xw...@yahoo.fr) wrote: Here a nice form to choose and delete manually some annoying event (like a page deleted or some rude text in an page updated) * * {{velocity}} Form to delete manually some event entry from Activity stream : #if ($xwiki.hasAdminRights()) {{html}} ## ## #foreach ($MyEvent in $xwiki.activitystream.getEvents(false, 500, 0 )) ##1. AAA $MyEvent - $MyEvent.getPage() #set($MycheckBox="" + "$MyEvent.getDisplayDate() - $MyEvent.getPage() - $MyEvent.getType() - - $MyEvent.getUser() " + "") $MycheckBox #end ## This is checkbox {{/html}} #else {{warning}} Vous devez être connecté avec un compte Admin pour utiliser cette macro {{/warning}} #end ## Récupère les id des event sélectionnés ## mise en forme pour générer la requête hql cat.name in ( 'Foo', 'Bar', 'Baz' ) #set($ListIn = $stringtool.join($request.getParameterValues('IdEntry'), "', '")) #set($ListIn = "'" + $ListIn + "'") ##set($results= $xwiki.activitystream.searchEvents("act.eventId='$MyValue'", false, 0, 0)) #set($results= $xwiki.activitystream.searchEvents("act.eventId in ($ListIn)", false, 0, 0)) #foreach ($MyEventToDelete in $results) ## #foreach ($MyEventToDelete in $xwiki.activitystream.getEvents($MonStream, false, 1500, 0)) $xwiki.activitystream.deleteActivityEvent($MyEventToDelete) * $MyEventToDelete.getDisplayDate() - $MyEventToDelete.getPage() - $MyEventToDelete.getType() - - $MyEventToDelete.getUser() ~*~* //**deleted**// ~*~* #end {{/velocity}} * * En date de : Mer 20.1.16, Pascal BASTIEN a écrit : it's working thxs a lot. I will post my form here later when it will be ready if you want it. :-) ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Help needed to get statitics from old xwiki into new one
Hi, On 20 Jan 2016 at 13:26:35, Marius Dumitru Florea (mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) wrote: > On Wed, Jan 6, 2016 at 11:06 AM, Nigel COUTIN wrote: > > > Hi to all xwiki devs and users, First of all best wishes and happy new > > year. > > We have a problem to get statistics from a standalone xwiki 7.1.2 (hsql + > > jetty) into a new version xwiki entreprise 7.4 (postgre + tomcat). > > > > > > As we have seen on the support site the import/export fonctions do not > > include statitics… Is there a possiblity to do so and how could it be > > done? Thank in advance for your replies > > > > Indeed, exporting the wiki pages as XAR and importing on a different wiki > doesn't preserve the statistics data. Stats are saved in the database but > in separate tables than the wiki pages. When you export a wiki only the > wiki pages are included. > > The only option I see is to play at the database level: create a sql dump > of the stats tables on the first database and then import this dump in the > second database. Indeed. This is documented here: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Backup And the limitations using XAR to perform an import/export is explained here: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Backup#HUsingtheXWikiExportfeature Thanks -Vincent > Hope this helps, > Marius > > > > Nigel COUTIN > > > > Le Mercredi 6 janvier 2016 9h37, Nigel COUTIN > > a écrit : > > > > > > Hi to all xwiki devs and users, First of all best wishes and happy new > > year. > > We have a problem to get statistics from a standalone xwiki 7.1.2(hsql + > > jetty) into a new version xwiki entreprise 7.4 (postgre + tomcat).As we > > have seen on the support site the import/exportfonctions do not include > > statitics… Is there a possiblity to do so and how could it be done? Thank > > in advance for your replies > > Nigel COUTIN > > > > > > ___ > > 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] Help needed to get statitics from old xwiki into new one
On Wed, Jan 6, 2016 at 11:06 AM, Nigel COUTIN wrote: > Hi to all xwiki devs and users, First of all best wishes and happy new > year. > We have a problem to get statistics from a standalone xwiki 7.1.2 (hsql + > jetty) into a new version xwiki entreprise 7.4 (postgre + tomcat). > > As we have seen on the support site the import/export fonctions do not > include statitics… Is there a possiblity to do so and how could it be > done? Thank in advance for your replies > Indeed, exporting the wiki pages as XAR and importing on a different wiki doesn't preserve the statistics data. Stats are saved in the database but in separate tables than the wiki pages. When you export a wiki only the wiki pages are included. The only option I see is to play at the database level: create a sql dump of the stats tables on the first database and then import this dump in the second database. Hope this helps, Marius > Nigel COUTIN > > Le Mercredi 6 janvier 2016 9h37, Nigel COUTIN > a écrit : > > >Hi to all xwiki devs and users, First of all best wishes and happy new > year. > We have a problem to get statistics from a standalone xwiki 7.1.2(hsql + > jetty) into a new version xwiki entreprise 7.4 (postgre + tomcat).As we > have seen on the support site the import/exportfonctions do not include > statitics… Is there a possiblity to do so and how could it be done? Thank > in advance for your replies > Nigel COUTIN > > > ___ > 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] Mocca calendar - display 'short description' instead of title in month/week/day view
Ah, there is the "App within minutes" editor coming in"! Actually it is a leftover from the time when this extension has been bootstrapped from "App Within Minutes". I guess I better scrap this because the "automatically created edit form" is not really useful in this case, as you have figured out Clemens > You're right - I missed a step. After step 8 I edited the event class with > the wiki editor. The Test field appeared on the form in the editor without > me having to do anything explicitly. I selected Save&View with the Update > Class Template, Update Class Sheet, and Update Class Translation Bundle > options checked. > > And running through the steps again, I confirmed that the Test field does > not appear on the form before I do the wiki edit. > > > > -- > View this message in context: > http://xwiki.475771.n2.nabble.com/Mocca-calendar-display-short-description-instead-of-title-in-month-week-day-view-tp7597592p7597624.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 > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Mocca calendar - display 'short description' instead of title in month/week/day view
You're right - I missed a step. After step 8 I edited the event class with the wiki editor. The Test field appeared on the form in the editor without me having to do anything explicitly. I selected Save&View with the Update Class Template, Update Class Sheet, and Update Class Translation Bundle options checked. And running through the steps again, I confirmed that the Test field does not appear on the form before I do the wiki edit. -- View this message in context: http://xwiki.475771.n2.nabble.com/Mocca-calendar-display-short-description-instead-of-title-in-month-week-day-view-tp7597592p7597624.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
Re: [xwiki-users] Mocca calendar - display 'short description' instead of title in month/week/day view
Small Update: Release 2.5.1 is out now, fixing that issue: > I can confirm your results from step 1 to step 5. > This is indeed a bug that needs fixing; I have added it as > http://jira.xwiki.org/browse/MOCCACAL-91 > [...] >> >> 1. Created new XWiki 7.4 instance - distribution wizard doesn't start for >> some reason so I installed the default pages using >> xwiki-enterprise-ui-mainwiki-all-7.4.xar. >> 2. Installed MoccaCalendar extension and verified that version is 2.5 (full >> calendar macro is version 2.0.2) >> 3. Logged in as Admin and created a new calendar (first to verify behaviour >> without your suggested mods to JSON Service). >> 4. In the new calendar created an event - event is displayed as expected. >> 5. In the new calendar, tried to create another event with the same title - >> event form displays 'An event with this name already exists.' under the >> title field. >> 6. In the new calendar, tried to create another event with no title - event >> form displays 'Title field is required'. >> 7. Deleted event created in step 4. >> 8. In class editor MoccaCalendarEvent class added new field 'Test' of type >> String. >> 9. Navigated to /xwiki/bin/view/MoccaCalendar/JSONService -> Edit -> Source >> and replaced $itemdoc.getPlainTitle() with $itemdoc.getValue('Test') in two >> places as you suggested. >> 10. Returned to new calendar created in Step 3. >> 11. Invoked form to create an event - event form is displayed with new Test >> field (blank). But the Title field is populated with a random string and the >> Calendar drop down field where you can select which calendar the event >> belongs to is missing from the form. >> 12. Entered a value in the Test field and saved the event - the form >> disappears but the event is not displayed on the new calendar. >> 13. Navigated to Calendar Overview and observed that new event is displayed >> there with the content of the Test field instead of the Title. Here the >> event is displayed on the Month view the way I want it. >> [...] ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How can I get event object through a form (a form to choose and delete manually some events)
greedy! Ok I will find some time to post that :-) En date de : Mer 20.1.16, vinc...@massol.net a écrit : Objet: Re: [xwiki-users] How can I get event object through a form (a form to choose and delete manually some events) À: "XWiki Users" Cc: "Pascal BASTIEN" Date: Mercredi 20 janvier 2016, 11h06 #yiv8476593446 body{font-family:Helvetica, Arial;font-size:13px;}Hi Pascal, What would be very nice would be to post this snippet on extensions.xwiki.org :) (With possibly a screenshot to attract users…) Thanks!-Vincent On 20 Jan 2016 at 11:03:13, Pascal BASTIEN (pbasnews-xw...@yahoo.fr) wrote: Here a nice form to choose and delete manually some annoying event (like a page deleted or some rude text in an page updated) * * {{velocity}} Form to delete manually some event entry from Activity stream : #if ($xwiki.hasAdminRights()) {{html}} ## ## #foreach ($MyEvent in $xwiki.activitystream.getEvents(false, 500, 0 )) ##1. AAA $MyEvent - $MyEvent.getPage() #set($MycheckBox="" + "$MyEvent.getDisplayDate() - $MyEvent.getPage() - $MyEvent.getType() - - $MyEvent.getUser() " + "") $MycheckBox #end ## This is checkbox {{/html}} #else {{warning}} Vous devez être connecté avec un compte Admin pour utiliser cette macro {{/warning}} #end ## Récupère les id des event sélectionnés ## mise en forme pour générer la requête hql cat.name in ( 'Foo', 'Bar', 'Baz' ) #set($ListIn = $stringtool.join($request.getParameterValues('IdEntry'), "', '")) #set($ListIn = "'" + $ListIn + "'") ##set($results= $xwiki.activitystream.searchEvents("act.eventId='$MyValue'", false, 0, 0)) #set($results= $xwiki.activitystream.searchEvents("act.eventId in ($ListIn)", false, 0, 0)) #foreach ($MyEventToDelete in $results) ## #foreach ($MyEventToDelete in $xwiki.activitystream.getEvents($MonStream, false, 1500, 0)) $xwiki.activitystream.deleteActivityEvent($MyEventToDelete) * $MyEventToDelete.getDisplayDate() - $MyEventToDelete.getPage() - $MyEventToDelete.getType() - - $MyEventToDelete.getUser() ~*~* //**deleted**// ~*~* #end {{/velocity}} * * En date de : Mer 20.1.16, Pascal BASTIEN a écrit : it's working thxs a lot. I will post my form here later when it will be ready if you want it. :-) ___ 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] How can I get event object through a form (a form to choose and delete manually some events)
Hi Pascal, What would be very nice would be to post this snippet on extensions.xwiki.org :) (With possibly a screenshot to attract users…) Thanks! -Vincent On 20 Jan 2016 at 11:03:13, Pascal BASTIEN (pbasnews-xw...@yahoo.fr) wrote: Here a nice form to choose and delete manually some annoying event (like a page deleted or some rude text in an page updated) * * {{velocity}} Form to delete manually some event entry from Activity stream : #if ($xwiki.hasAdminRights()) {{html}} ## ## #foreach ($MyEvent in $xwiki.activitystream.getEvents(false, 500, 0 )) ##1. AAA $MyEvent - $MyEvent.getPage() #set($MycheckBox="" + "$MyEvent.getDisplayDate() - $MyEvent.getPage() - $MyEvent.getType() - - $MyEvent.getUser() " + "") $MycheckBox #end ## This is checkbox {{/html}} #else {{warning}} Vous devez être connecté avec un compte Admin pour utiliser cette macro {{/warning}} #end ## Récupère les id des event sélectionnés ## mise en forme pour générer la requête hql cat.name in ( 'Foo', 'Bar', 'Baz' ) #set($ListIn = $stringtool.join($request.getParameterValues('IdEntry'), "', '")) #set($ListIn = "'" + $ListIn + "'") ##set($results= $xwiki.activitystream.searchEvents("act.eventId='$MyValue'", false, 0, 0)) #set($results= $xwiki.activitystream.searchEvents("act.eventId in ($ListIn)", false, 0, 0)) #foreach ($MyEventToDelete in $results) ## #foreach ($MyEventToDelete in $xwiki.activitystream.getEvents($MonStream, false, 1500, 0)) $xwiki.activitystream.deleteActivityEvent($MyEventToDelete) * $MyEventToDelete.getDisplayDate() - $MyEventToDelete.getPage() - $MyEventToDelete.getType() - - $MyEventToDelete.getUser() ~*~* //**deleted**// ~*~* #end {{/velocity}} * * En date de : Mer 20.1.16, Pascal BASTIEN a écrit : it's working thxs a lot. I will post my form here later when it will be ready if you want it. :-) ___ 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] How can I get event object through a form (a form to choose and delete manually some events)
Here a nice form to choose and delete manually some annoying event (like a page deleted or some rude text in an page updated) * * {{velocity}} Form to delete manually some event entry from Activity stream : #if ($xwiki.hasAdminRights()) {{html}} ## ## #foreach ($MyEvent in $xwiki.activitystream.getEvents(false, 500, 0 )) ##1. AAA $MyEvent - $MyEvent.getPage() #set($MycheckBox="" + "$MyEvent.getDisplayDate() - $MyEvent.getPage() - $MyEvent.getType() - - $MyEvent.getUser() " + "") $MycheckBox #end ##This is checkbox {{/html}} #else {{warning}} Vous devez être connecté avec un compte Admin pour utiliser cette macro {{/warning}} #end ## Récupère les id des event sélectionnés ## mise en forme pour générer la requête hql cat.name in ( 'Foo', 'Bar', 'Baz' ) #set($ListIn = $stringtool.join($request.getParameterValues('IdEntry'), "', '")) #set($ListIn = "'" + $ListIn + "'") ##set($results= $xwiki.activitystream.searchEvents("act.eventId='$MyValue'", false, 0, 0)) #set($results= $xwiki.activitystream.searchEvents("act.eventId in ($ListIn)", false, 0, 0)) #foreach ($MyEventToDelete in $results) ## #foreach ($MyEventToDelete in $xwiki.activitystream.getEvents($MonStream, false, 1500, 0)) $xwiki.activitystream.deleteActivityEvent($MyEventToDelete) * $MyEventToDelete.getDisplayDate() - $MyEventToDelete.getPage() - $MyEventToDelete.getType() - - $MyEventToDelete.getUser() ~*~* //**deleted**// ~*~* #end {{/velocity}} * * En date de : Mer 20.1.16, Pascal BASTIEN a écrit : it's working thxs a lot. I will post my form here later when it will be ready if you want it. :-) ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] A tool to convert terminal pages to Nested Pages
Hello, users of XWiki! I just have released the first version (alpha) of a new application to help you convert your existing (terminal) pages to nested pages after an upgrade to a recent wiki (7.4.x is the targeted version). This tool is available and can be installed directly with Extension Manager. All informations are there: http://extensions.xwiki.org/xwiki/bin/view/Extension/Nested+Pages+Migrator+Application The application *does not currently apply the migration*. It only computes a plan which say what actions should be done. The purpose, right now, is only to test the tool without affecting any wiki. There is an option to simply convert your pages to nested pages (Space.Page => Space.Page.WebHome) so they can have children (which they cannot while being terminal). But, by default, the migrator tries to preserve the existing hierarchy of pages (based on the "parent" field of each page) by moving the pages under their parent page. So if you have SpaceA.PageA with SpaceB.PageB as parent, the proposed migration will be SpaceA.PageA => SpaceB.PageB.PageA.WebHome. In the future, the plan will also contain actions for preserving the configured preferences (right now, if a page is moved, all the preferences from its previous space are not applied to it anymore), and rights. This version is a first step in order to have a very complete tool. A design document have been written with more informations ( http://design.xwiki.org/xwiki/bin/view/Proposal/UpgradeToNestedPages). I would love to see some of you testing this application, the user interface, and judging the proposed plans. Don't hesitate to give your feedbacks. Please tell me if you have other ideas that I have not listed in the design document, like features that I have not think about. Thanks a lot, -- Guillaume Delhumeau (gdelhum...@xwiki.com) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users