Index: core/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java =================================================================== --- core/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java (revision 23911) +++ core/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java (working copy) @@ -547,8 +547,23 @@ if (is10Syntax()) { renderedContent = context.getWiki().getRenderingEngine().renderDocument(this, context); } else { - renderedContent = - performSyntaxConversion(getTranslatedContent(context), getSyntaxId(), targetSyntax, true); + // If the user is speaking a language other than the default, we must switch documents. + // This is already handled in the old renderer. + XWikiDocument tdoc = getTranslatedDocument(context); + // Get the revision from the context, mimicing behavior of getTranslatedContent + // to maintain consistancy because getTranslatedContent was used previously. + String rev = (String) context.get("rev"); + if (rev != null && rev.length() != 0 && !tdoc.getVersion().equals(rev)) { + tdoc = context.getWiki().getDocument(tdoc, rev, context); + } + + // This is only necessary because we are not allowing translations to have a different syntax from the origional + // see: XWikiDocumentTest.testGetRenderedContent() and XWikiDocumentTest.testGetRenderedContent10() + if(this.getSyntaxId().equals(tdoc.getSyntaxId())){ + renderedContent = performSyntaxConversion(tdoc.getXDOM(), this.getSyntaxId(), targetSyntax, true); + }else{ + renderedContent = performSyntaxConversion(tdoc.getContent(), this.getSyntaxId(), targetSyntax, true); + } } } finally { if (isInRenderingEngine != null) {