Closed (fixed)
Project:
Spaces
Version:
6.x-3.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2010 at 15:02 UTC
Updated:
8 Aug 2011 at 17:21 UTC
I'm developing the Case Tracker Plus module, which needs to support Drupal installations with or without Spaces. I think ideally I'd add a submodule, CT Plus Spaces, providing spaces integration - I think it would override Views in the core CT Plus module to filter content to current Spaces, etc... However, I can't figure out how to move the Spaces dependency out of the core CT Plus module- if I put the Spaces dependency and spaces[types] = "all" in the separate CT Plus Spaces submodule, then you'll be enabling just the submodule for Spaces, not the whole CT Plus module...
Any tips?
Sister issue in my own queue: #997282: Move Spaces dependency (and other OA-specific features) to OA CT Plus
Comments
Comment #1
Grayside commentedThe issue is that whichever module is made spaces-aware, that's the module which needs to own the various components of the feature in a Spaces sense.
There are three ways you can go.
First, just provide the Spaces integration in CT Plus. You don't need to declare a dependency on Spaces to add spaces[types][] to your .info file.
Second, you can implement hook_system_info_alter() and conditionally add the spaces types setting to the $info array. I am not sure whether this will actually work.
Third, you can do #2 in ct_plus_spaces, only you can change the module ownership of all the ct_plus components to ct_plus_spaces. Of course, now you have other strange things, like a feature which will show up as CT Plus Spaces in the Spaces features page. And a pair of features which do not update easily.
I ended up barking up this tree before, and decided the most clean thing to do was to stick with #1 or #2. Using a module to integrate a feature into Spaces is not a good practice. At this point, I would either maintain two nearly identical features, one with Spaces integration, or I would put a lot of module_exists('spaces') around the ct_plus code and let it carry the Spaces integration as unobtrusively as possible.
Comment #2
danepowell commentedThanks for the tips Grayside!