On Fri, Sep 4, 2009 at 10:07, Vincent Massol<vincent@massol.net> 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.
Yes it's a dangerous fix I think, getRenderedContent() is really not an hidden method so changing its behavior that much even if it's a fix is dangerous anyway.
WDYT?
Thanks -Vincent _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne