Clone can be enabled without enabling the Migrate feature. This throws a fatal error when clicking on the Clone tab on a site node:

Fatal error: Call to undefined function hosting_task_migrate_form() in /var/aegir/drupal-6.13/profiles/hostmaster/modules/hosting/clone/hosting_clone.module on line 41
CommentFileSizeAuthor
#1 573438.patch2.37 KBmig5
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Needs review
FileSize
2.37 KB

Patch attached tries to introduce dependency checking in the Features form.

Might need some work.

It'll enable any additional features it detects as dependencies, if they aren't already enabled. It won't allow a feature to be disabled if another feature depends on it (i.e you cannot disable Migrate until you also disable Clone, if Clone is active).

anarcat’s picture

Title: Clone: does not properly depend on the Migrate feature » Proper dependency management in features
Project: Provision » Hosting
Version: » 6.x-0.3
Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Needs work

We should move at least the Disable stuff into hook_validate so that we can set only a form_set_error() without the drupal_set_message() 'The configuration options have been saved' from system module sneaking in.

And if we move it into hook_validate(), we need a way to reset the checkbox states (if you disable Migrate while Clone is enabled, it doesn't disable Migrate and throws the error, but the re-rendering of the form keeps the form state so that Migrate is unchecked: reloading the page altogether fixes it). I think we need form_set_value() here but I'm not a forms wizard.

Also, my earlier patch, though it may have been less elegant, only enables modules that aren't already enabled (i.e it won't enable hosting and hosting_site to enable clone and migrate, if these are already running). I do this with module_exists() in that patch, have to work out a way to replicate this in your work.

Robin Millette’s picture

Status: Needs work » Fixed

Marking "fixed" because of the date (2009).

anarcat’s picture

Status: Fixed » Needs work

Humm... The date shouldn't matter: if the bug is still there, this bug report should stay opened. Have you tested to see if the bug was solved?

Robin Millette’s picture

No I haven't. Consider it a bump, then.

Steven Jones’s picture

Project: Hosting » Hostmaster (Aegir)
Version: 6.x-0.3 » 6.x-1.8
Status: Needs work » Fixed

Just checked in 1.8, this is fixed, dependencies are enforced correctly.

Status: Fixed » Closed (fixed)

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

  • Commit 2736649 on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by anarcat:
    #573438 - enable dependent modules in features, but don't disable...

  • Commit 2736649 on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by anarcat:
    #573438 - enable dependent modules in features, but don't disable...