I find it very irritating for the select list that comes up when you click on a site's migrate task to show the current platform. It doesn't really make sense, at least not in my use-case where I was migrating between different Drupal 6 installs all without install profiles. I then looked into the code (I originally wanted to post a patch) and found:
// In the list of possible targets, we also include install profiles on platforms that
// USED to be named the same as our current install profile. Such as the d6 -> d7 rename
// of the default profile to standard.
(l.146-148 migrate/hosting_migrate.module)
First of all, I don't get that, really, but more importantly, I don't think that really applies to my use-case, which I would have thought to be the default use-case (== no install profiles). So maybe there should be some special-case for the described use-case while the default is to somehow show the current platform as disabled. I would roll a patch, too :)
Please also note that I filed this as "minor" and "support request", which is to say that I can understand if this sits around for a while. I realize there are more important things in the world.
Comments
Comment #1
Anonymous (not verified) commentedThe reason that the current platform is shown in the migrate form is twofold:
1) The Clone feature is basically Migrate but with a new URL and the target platform *can* be the 'current platform' of the original site. The clone feature invokes the migrate form itself to avoid duplication of code
2) When you use the Migrate feature, one of the options in the form is to simply 'rename' the site (Rename feature used to be a separate feature but got merged into Migrate), in that the site URL can be modified. In this situation, again, the current platform is a valid platform for this purpose if renaming is all you wish to do.
We have implemented validation so that in the case of a simple Migrate with no URL change, the current platform is not a valid platform and thus the form can't be submitted.
It's not the prettiest, so I'll leave this open in case someone finds a more elegant way of solving this - but when the migrate form loads, there's no way to 'anticipate' whether or not the user wants to just rename the site, so the option is displayed regardless, and the 'rules' are enforced by the hook_validate.
Thanks for posting this, perhaps some good discussion will come out of it.
Comment #2
tstoecklerActually just considering the UI and not the underlying code the ideal (?) solution would be, IMO, to:
1. Remove the current platform from the 'Migrate' task form.
2. Leave/Re-introduce the current platform on the 'Clone' task form.
3. Introduce a new 'Rename' task for simply changing the Domain name but staying on the same platform.
Optionally also remove the 'Domain name' field from the 'Migrate' task form, but I actually don't know how important the use-case "Rename while moving to a different platform" is. (I actually don't use that functionality, but that may just be me.)
Comment #3
Anonymous (not verified) commentedhehe.. the problem is the UI and the underlying code are one and the same in this special case, is what I'm saying.
3) was what we had but it was merged into Migrate, so I guess you're asking to revert back to that.
1) breaks 2) unless we duplicate code.. because it's literally the same hook_form()
to do 3) we need to duplicate code anyway, so maybe if we are going to do that, we duplicate more and more to accomplish 2) (you can start to see why we wanted to avoid doing so!)
I'll hope to chat with adrian about it soon.
Comment #4
adrian commentedi actually think the current way is correct
you can also just migrate between db servers (if you have more than one enabled) on the same platform. which is also valid.
the form should state you have to change one of the platform, the url or the DB server. i definitely remember writing that help text.
Comment #5
Anonymous (not verified) commentedThat text exists in the hook_validate when none of those settings are changed. Perhaps we can stick it in as a #description when the form loads.
Comment #6
tstoecklerI will roll a patch with a little description. I like that.
Comment #7
Anonymous (not verified) commentedI rolled in #description to the Domain name field. When the task is Migrate, it states that changing the Domain name 'renames' the site. When it's the clone task, it states that the domain name is the new domain name of the clone. Considering this fixed.
Comment #8
tstoecklerSorry, totally forgotten about this issue... Thanks for the fix anyway.