Related to : #1044692: wordpress backend
Currently Aegir hardcodes a list of content-types that may have "contexts" (server, platform, site) in hosting_context_node_types(). This function is only used twice, and both cases do not make much sense.
The function also makes it hard to develop new entities as part of third-party extensions. For example, the WordPress integration has wpplatform and wpsite entities. Talking with Jon, OpenDevshop also has similar needs for new entities (environments).
Therefore I am planning to submit a patch to remove hosting_context_node_types() in one place where it is used. The other place is a rather weird undocumented need, so I will ignore it (in hosting_node_presave). I will also flag the function as deprecated.
Comment | File | Size | Author |
---|---|---|---|
#3 | deprecate-2763509-3.patch | 2.21 KB | helmo |
#2 | 0001-Issue-2763509-Deprecate-hosting_context_node_types.patch | 2.23 KB | bgm |
Comments
Comment #2
bgm CreditAttribution: bgm at Coop SymbioTIC commentedPatch
Comment #3
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedThe presave was introduced in #908202: Author not set on site node creation (and other hosting content types). The 'unset($form['author']);' mentioned there seems to be gone so I think it's save to remove.
Here's an updated patch to just remove it. I've created a PR for it, but travis support os not done jet :(
The alternative would be to add an alter hook to hosting_context_node_types().
Comment #5
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedThe PR is green :)... Merged.