Hi,
Found out that the problem was related to the translated pages! I created
the following script to delete all translated pages on the template. Now
I'm able to create subwikis from template without any issue and everything
works as expected. Thanks Thomas for you help :)
Following is the script. I only preserve the "en" version (yeah, I know
it's dirty but it works!). Hope it could help someone.
{{velocity}}$xwiki.getDocument("AnnotationCode.Translations").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("AnnotationCode.Translations").getTranslatedDocument("da").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("AnnotationCode.Translations").getTranslatedDocument("es").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("AnnotationCode.Translations").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("AnnotationCode.Translations").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("AnnotationCode.Translations").getTranslatedDocument("nl").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("AnnotationCode.Translations").getTranslatedDocument("pt_BR").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.SolrTranslations").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.SolrTranslations").getTranslatedDocument("es").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.SolrTranslations").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.SolrTranslations").getTranslatedDocument("nl").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.SolrTranslations").getTranslatedDocument("pt_BR").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.SolrTranslations").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("ca").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("da").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("es").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("nl").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("pt_BR").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("ro").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("ru").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("uk").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("zh").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("Main.Welcome").getTranslatedDocument("zh_TW").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("ca").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("da").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("es").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("nl").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("pt_BR").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("ru").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("WikiManager.Translations").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxDefinitionLists").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxDefinitionLists").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxDefinitionLists").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxDefinitionLists").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxDefinitionLists").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxEscapes").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxEscapes").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxEscapes").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxEscapes").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxEscapes").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGeneralRemarks").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGeneralRemarks").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGeneralRemarks").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGeneralRemarks").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGeneralRemarks").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGroups").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGroups").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGroups").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGroups").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxGroups").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHTML").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHTML").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHTML").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHTML").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHTML").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHeadings").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHeadings").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHeadings").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHeadings").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHeadings").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHorizontalLine").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHorizontalLine").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHorizontalLine").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHorizontalLine").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxHorizontalLine").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxImages").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxImages").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxImages").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxImages").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxImages").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxIntroduction").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxIntroduction").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxIntroduction").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxIntroduction").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxIntroduction").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLinks").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLinks").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLinks").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLinks").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLinks").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLists").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLists").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLists").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLists").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxLists").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxMacros").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxMacros").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxMacros").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxMacros").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxMacros").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxNewLineLineBreaks").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxNewLineLineBreaks").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxNewLineLineBreaks").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxNewLineLineBreaks").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxNewLineLineBreaks").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxOtherSyntaxes").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxOtherSyntaxes").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxOtherSyntaxes").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxOtherSyntaxes").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxOtherSyntaxes").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParagraphs").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParagraphs").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParagraphs").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParagraphs").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParagraphs").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParameters").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParameters").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParameters").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParameters").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxParameters").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxQuotations").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxQuotations").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxQuotations").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxQuotations").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxQuotations").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxScripts").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxScripts").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxScripts").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxScripts").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxScripts").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTables").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTables").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTables").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTables").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTables").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTextFormatting").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTextFormatting").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTextFormatting").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTextFormatting").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTextFormatting").getTranslatedDocument("sv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTranslations").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxTranslations").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxVerbatim").getTranslatedDocument("de").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxVerbatim").getTranslatedDocument("fr").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxVerbatim").getTranslatedDocument("it").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxVerbatim").getTranslatedDocument("lv").delete(){{/velocity}}
{{velocity}}$xwiki.getDocument("XWiki.XWikiSyntaxVerbatim").getTranslatedDocument("sv").delete(){{/velocity}}