Hi, I'm using the code below to move posts of a blog. It worked, but they lack two things: 1) does not create a redirect on the old way; 2) permanently delete the source without putting in the trash. #foreach($noticia in $services.query.xwql("from doc.object(Blog.BlogPostClass) as blog where doc.web = 'Intranet'").setLimit(100).execute()) #set ($source = $services.model.resolveDocument($noticia)) #set ($destination = $services.model.resolveSpace('Intranet.noticias')) $services.refactoring.move($source, $destination).join() #end Does anyone know how to solve? Best Regards,Julio De: Marius Dumitru Florea <[email protected]> Para: XWiki Users <[email protected]> Enviadas: Terça-feira, 1 de Novembro de 2016 7:07 Assunto: Re: [xwiki-users] Moving batch pages with blog news I would use the query script service [1] to fetch the pages that need to be moved and then use the refactoring script service [2] to move them to the new location. The move method accepts also a list of entity references. Hope this helps, Marius [1] http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module [2] http://extensions.xwiki.org/xwiki/bin/view/Extension/Refactoring+Module On Fri, Oct 28, 2016 at 11:44 PM, Julio Brum <[email protected]> wrote:
Hi, I need to move a lot (two thousand) Blog News (pages with Blog.BlogPostClass object) from one page to another. The source page has news pages, but has other type of pages. I need only move the pages that are Blog News. How I do? Note: I am using the XWiki 7.4.4 (I migrated from 4.2). Best regards,Julio _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users