plonezopeadd-ongrokzcml

Unregister a zcml resource directory in Plone


I would like to 'unregister' a resource directory registered with configure zcml and the directive

I have uninstalled my custom add-on that originally registered the resource directory, but other packages are still able to call /++resource++my.package and bring in resources from the uninstalled addon... is there a directive to unregister it properly, or via ZMI or one-off script somehow?

Ref: http://plone.org/products/dexterity/documentation/manual/five.grok/browser-components/resource-directories


Solution

  • You are confused between install and uninstall of the persistent configurations, through the Plone control panel, and actual removal of the egg from your buildout.

    Resource directories are registered in the package ZCML files, and are not persistent. You'll have to remove the package egg from your buildout for these ZCML files to not be loaded.

    If you, for some reason, need code provided by the package egg but absolutely do not want the resources to be registered, you'll need to use the z3c.unconfigure package to unregister the resource directories again.

    Unless they actively interfere with anything I see no need for you to do so, though. Note that there is absolutely no harm in having the resource URLs still available in your Plone site.