Batch migrate form renders Submit and gives misleading form_set_error if no other platforms exist

mig5 - October 2, 2009 - 01:08
Project:Hosting
Version:6.x-0.4-alpha1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

If no other platforms exist other than the main aegir platform, the batch migrate form still renders the Submit button but of course the rest of the form is empty.

Submitting the form gives the error 'Platform field is required'. We need some more checking to see if any other platforms actually even exist before allowing the form to be submit.

Screenshot attached

AttachmentSize
migrate.png61.39 KB

#1

mig5 - October 2, 2009 - 01:51
Status:active» fixed

Fixed in HEAD.

#2

univate - October 2, 2009 - 04:19
Status:fixed» needs review

there is '}' missing

<?php
diff
--git migrate/hosting_migrate.batch.inc migrate/hosting_migrate.batch.inc
index 92c688a
..8d650b8 100644
--- migrate/hosting_migrate.batch.inc
+++ migrate/hosting_migrate.batch.inc
@@ -37,6 +37,7 @@ function hosting_migrate_platform($form_state, $node) {
        
'#type' => 'submit',
        
'#value' => t('Submit'),
       );
+    }
     else {
      
$form['no_platforms'] = array(
        
'#type' => 'item',
?>

AttachmentSize
hosting_migrate_batch.patch 418 bytes

#3

mig5 - October 2, 2009 - 04:23
Status:needs review» fixed

Gah! Sorry, I don't know how that happened.. it was in my working copy but somehow missing from my copy in my cvs checkout.. weird.

Sorry about that. Fixed. And thanks :(

#4

System Message - October 16, 2009 - 04:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.