I am importing a wordpress blog with non unique email addresses for users. The last page of the form looks like it should check to make sure that the email addresses are unique, but when I went through the form, I successfully got the "success" page with the "User with mail already exists" error. What I expect is to get the last page of the form reloaded with the error.

After poking around, I think it's happening b/c of this chunk of code:

 85   // Skip user creation if not necessary
 86 
 87   if ($form_state['storage']['step'] == 3 && !wordpress_import_must_create_users(wordpr    ess_import_apply_default_user_mapping($form_state['values']['users_map'], $form_state['    values']['default_user_mapping']))) { 88     $form_state['storage']['step']++;
 89   } 

Since the user map from step 2 with the "create new user" info has already been processed, the user map for step 3 does not contain "create_new_user", so the step is advanced. Some extra logic is needed to make sure that a failed step 3 case is honored.

I'm still poking around and will post a patch when I make some headway.

CommentFileSizeAuthor
#1 wordpress_import.patch1.1 KBgwen

Comments

gwen’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Okay, it turns out this was easier to fix that I thought. It looks like different values are stored depending on which step, so I put in an extra conditional to check if $form_state['values']['users_map'] is not empty. The patch is attached.

yrocq’s picture

Assigned: Unassigned » yrocq
Status: Needs review » Fixed

Fixed in DRUPAL-6--1. Thanks !

Status: Fixed » Closed (fixed)

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