Closed hvelarde closed 9 years ago
we need to add the tile to the registry programmatically instead of using GenericSetup.
Programatically, I think the best way is to do a try except for plone.app.tiles in setuphandlers.py, and, if available, you add the tile to registry.
Or create a new profile and put a zcml condition installed plone.app.tiles
, so it will only appear to be installed if plone.app.tiles is installed. It will be a similar behavior like plone.app.contenttypes, it will appear on controlpanel "Add tiles support for collective.nitf".
Or a mix of both, create a new profile with the zcml condition and, in setuphandlers, try except for plone.app.tiles and if available apply the profile.
This is indeed a problem. The faster way is to just add plone.app.tiles as dependency, but since the tiles in collective.nitf are optional...
IMO, that's over-engineered and needless; there's no harm on leaving an empty registry record for plone.app.tiles
on uninstalling.
but that's only my opinion :cactus:
Nah, you're right if there's no harm. I thought about the try except just in a caution manner, I don't have that much experience with empty records in plone.app.registry.
And all the profile suggestions were just a brainstorm though, to test how insane we can get.
we can fix it more easily by removing the record in Install.py
if it's empty.
If collective.cover is not installed, we get the following error when installing the package: