Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | 573438.patch | 2.37 KB | mig5 |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch 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).
Comment #2
anarcat CreditAttribution: anarcat commentedI committed a similar fix to CVS.
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/hosting/hos...
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedWe 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.
Comment #4
Robin Millette CreditAttribution: Robin Millette commentedMarking "fixed" because of the date (2009).
Comment #5
anarcat CreditAttribution: anarcat commentedHumm... 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?
Comment #6
Robin Millette CreditAttribution: Robin Millette commentedNo I haven't. Consider it a bump, then.
Comment #7
Steven Jones CreditAttribution: Steven Jones commentedJust checked in 1.8, this is fixed, dependencies are enforced correctly.