I was running module version 7x-2.1, then upgraded to 7x-2.2, but had the same issues with both. I have a wordpress site I'm importing into Drupal, exported the site (160 posts, 1 page, 164 approved comments), but only the posts, page, and attachments import (even though I've selected for it to NOT import the images, they just keep coming!). The xml file is 770KB, so not anywhere near the size limit. I've cleared out all the previous image imports from the folders, but it keeps saying there's a duplicate in the error.
I'm running this site off the Acquia Dev Desktop.
Upon import I get the following error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?render=overlay&id=38&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://wp-content/uploads/2006/09/1.thumbnail.png' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp, type) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => 1.thumbnail.png [:db_insert_placeholder_2] => public://wp-content/uploads/2006/09/1.thumbnail.png [:db_insert_placeholder_3] => image/png [:db_insert_placeholder_4] => 5276 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1355328378 [:db_insert_placeholder_7] => image ) in drupal_write_record() (line 7036 of /Users/caseyfox/Sites/acquia-drupal/includes/common.inc). Fatal error: Exception thrown without a stack frame in Unknown on line 0
So what I found after a little DB digging is that upon rolling back/deleting an import the "file_managed" table doesn't get wiped of all wp imports. Once I went through and took all those out, almost everything imported (only 142/164 comments, but since this is a crazy old site that gets less than 5,000 hits a month, I'm a happy camper!).
Comments
Comment #1
ergow commentedI have the same problem. but I can import any comment.
Appears the following error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?render=overlay&id=49&op=do StatusText: Service unavailable (with message) ResponseText: MigrateException: array_merge() [function.array-merge]: Argument #2 is not an array File /Users/JuanCarlos/DWeb/experimental-7.18/sites/all/modules/media_youtube/includes/themes/media_youtube.theme.inc, line 98 in MigrationBase->errorHandler() (line 530 of /Users/JuanCarlos/DWeb/experimental-7.18/sites/all/modules/migrate/includes/base.inc). Fatal error: Exception thrown without a stack frame in Unknown on line 0
When i go to my page it show this warning:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in media_youtube_preprocess_media_youtube_video() (line 98 of /Users/JuanCarlos/DWeb/experimental-7.18/sites/all/modules/media_youtube/includes/themes/media_youtube.theme.inc).
Any idea?
Thanks a lot!
Comment #2
mikeryanSorry for the late response, somehow this issue fell through the cracks.
@cfox612: Images referenced from a content body but not having an explicit attachment entry in the imported file are imported on the fly. Because they aren't imported in their own migration, they aren't tracked in a map table, so migration rollback has no means to identify and explicitly delete them on rollback - they get left behind.
Now, I think we can do something about that - if we added a file_usage entry when creating these on the fly, then when any content referencing them is deleted, they should also get deleted. I'll look into that.
@ergow: Your error is entirely different, if you're still seeing that problem with Youtube videos please open a separate issue.
Comment #3
mikeryanComment #4
mikeryanAh, upping the file_usage ourselves doesn't address it, because the file_usage is only checked (and orphaned files deleted) if they're attached through a file field. If we've got a configured attachment field we can add the implicitly referenced files through that, but if we don't there's not much we can do.
Comment #5
mikeryanOK, if there's an attachment field configured, any images picked up from scanning the body are added to it - then, when the node is rolled back, the file entities are removed.