On Sep 4, 2009, at 10:07 AM, Vincent Massol wrote:
Hi,
Im trying to fix
http://jira.xwiki.org/jira/browse/XWIKI-4274
Basically if you do
$xwiki.getDocument("someDoc").getRenderedContent() it'll get
executed in the context of the current doc which I believe is wrong
especially since other signatures of getRenderedContent() execute in
the target document's context.
I have fixed this locally but found that admin.vm for example is
assuming that getRenderedContent() will get executed in the context
of the calling doc (i.e. XWiki.Import when doing an import for
example).
FYI the chain flow is admin.vm -- getRenderedContent() -->
XWiki.AdminSheet --> XWiki.AdminImportSheet --> importinline.vm,
which requires the current doc to be XWiki.Import (to get/put
attachments from/to it).
I can fix this easily using a new getRenderedContent signature I've
introduced.
However I'm wondering if we have other places that incorrectly use
getRenderedContent() and assume it won't be rendered in the context
of the target document.
Is this change too dangerous to make? If not know, we'll need to it
quickly (2.1M1?) since it's an important bug IMO.
WDYT?
I think it's safer to wait for 2.1M1. I've attached the patch to the
issue and detailed what still needs to be done.
Thanks
-Vincent