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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bgm created an issue. See original summary.

bgm’s picture

Status: Active » Needs review
FileSize
2.23 KB

Patch

helmo’s picture

FileSize
2.21 KB

The 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().

  • helmo committed e6991cc on 7.x-3.x authored by bgm
    Issue #2763509 by bgm: Deprecate hosting_context_node_types()
    
helmo’s picture

Status: Needs review » Fixed

The PR is green :)... Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.