From what I can tell, there seem to be two relevant pieces of code in the various bits of php that power the plugin where things could be going wrong. The first is this bit from blogger-importer-blog.php:
function save_authors()
{
global $wpdb;
//Change to take authors as a parameter
$authors = (array )$_POST['authors'];
//Todo: Handle the case where there are no more authors to remap
// Get an array of posts => authors
$post_ids = (array )$wpdb->get_col($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_blog' AND meta_value = %s", $this->host));
$post_ids = join(',', $post_ids);
$results = (array )$wpdb->get_results("SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = 'blogger_author' AND post_id IN ($post_ids)");
foreach ($results as $row)
$authors_posts[$row->post_id] = $row->meta_value;
foreach ($authors as $author => $user_id)
{
$user_id = (int)$user_id;
// Skip authors that haven't been changed
if ($user_id == $this->authors[$author][1])
continue;
// Get a list of the selected author's posts
$post_ids = (array )array_keys($authors_posts, $this->authors[$author][0]);
$post_ids = join(',', $post_ids);
$wpdb->query($wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE id IN ($post_ids)", $user_id));
$this->authors[$author][1] = $user_id;
//Should we be tidying up the post meta data here, rather than in restart?
//$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = 'blogger_author'");
}
return '';
}
The second is in the blogger-importer.php file itself:
function get_author_form($blog)
{
global $current_user; //This is not used, perhaps it should be the "default" for the call to get_user_options?
if (!isset($blog->authors))
{
$blog->get_authors();
$blog->save_vars();
}
$directions = sprintf(__('All posts were imported with the current user as author. Use this form to move each Blogger user’s posts to a different WordPress user. You may <a href="%s">add users</a> and then return to this page and complete the user mapping. This form may be used as many times as you like until you activate the “Restart” function below.',
'blogger-importer'), 'users.php');
$heading = __('Author mapping', 'blogger-importer');
$blogtitle = "{$blog->title} ({$blog->host})";
$mapthis = __('Blogger username', 'blogger-importer');
$tothis = __('WordPress login', 'blogger-importer');
$submit = esc_js(__('Save Changes', 'blogger-importer'));
$rows = '';
foreach ($blog->authors as $i => $author)
$rows .= "<tr><td><label for='authors[$i]'>{$author[0]}</label></td><td><select name='authors[$i]' id='authors[$i]'>" . $this->get_user_options($author[1]) . "</select></td></tr>";
I’ve done a bit of testing on my local installation, and I believe that my author string array consists of a name, in this case ‘Mark’, in the [0] position, and a number “7” in the [1] position, and nothing else. That leads me to believe that there’s something amiss in the save_authors function–that the array is being written over when new authors are encountered, rather than being incremented or added to. Is that possible?
The other possibility that I see is that for some reason the blogger xml file isn’t including the various group authors information in the way that your code expects them. I went back to look at the group blog, and the several authors I’m trying to import are listed as admins rather than mere authors. Could that be making a difference?