Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 6.4, 6.2.5
-
Component/s: Component
-
Labels:
-
Difficulty:Unknown
-
Documentation:N/A
-
Documentation in Release Notes:N/A
-
Similar issues:
Description
Apparently we broke backward compat and this is bad… We used to return the root Component Manager when calling Utils.getComponentManager()
But it’s been modified and deprecated in XWiki 6.1M1 (
XWIKI-10352) to return the Context Component Manager.Now, the new way of registering components has been to use the Component Manager script service introduced in XWiki 4.1M2 (see http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module#HAccessfromScripts).
However I’ve just noticed that it’s also been modified to return the Context CM instead of the Root CM.
This means there’s now no way to dynamically register a new component from Groovy without using a deprecated API…
So right now the only workaround is to use the deprecated method:
Utils.getRootComponentManager()
See mail thread: http://xwiki.markmail.org/thread/wvduq5p2b4rcvlzu