Thanks for your help on my previous issue. I have managed to import my test file with a single blog item. The title, text, tags, published date etc all imported correctly. My question now is whether this module can import that URL path specified in wordpress and also the 'post image'. If so, is there some more configuration that needs to be done to get it to work?
Comments
Comment #1
mikeryanPaths should be migrated into Drupal path aliases, and images should be migrated as well - is this not happening? Look in your files directory to see if your image file got copied, edit the blog node and see if the reference to the image is in there and the alias is set,...
Comment #2
jpincas commentedThanks for the super-quick help today on this lifesaver module. On my test imports, it looks like neither has imported. Looking at the 'files' directory, nothing has been uploaded. Editing the node, the image field is blank as is the URL Path alias. A few ideas:
I am not using the default 'blog' node, but a custom node called 'recipe'. I know this caused issue with the comment body (fixed in other thread) - perhaps this is having something to do with it. If so, what field should I set up in my custom node to 'receive' the image information. Would I need to make any changes in the code?
My post image in Wordpress was a URL pointing to the image which was sometimes on our server, sometimes on another. If I'm understanding correctly, this module makes a copy of the image to the server and then references it? If so, again I guess the issue is having the correct image field setup (and possibly naming convention) in my node.
Can't think why the path import wouldn't be working, unless it's something to do with my custom node type.
Thanks in advance.
Comment #3
mikeryanSo, are you saying when you added the image to your Wordpress post, you used From URL rather than From Computer? That should just put an <img> tag in the body, which should come through just fine. If you edit the post in your Drupal site, is the <img> tag there?
Now, if you actually uploaded the image using From Computer, then in the WXR file there should be an item of post_type "attachment" for it, and the migration should use that information to copy the file to the files directory and create a files_managed row for it. The <img> tags in any post referencing the image should be rewritten to local references to make sure they're picking up the Drupal copy, not the original URL of the image.
One thing it does not do is populate any image field on the node - that shouldn't be necessary for the basic ability to display the image within the node body.
Another possibility is that I've only tested thus far in an environment with the Media module - it's supposed to work without media, but maybe it's broken. I'll test this myself when I get a chance.
Comment #4
jpincas commentedHmm - I think I understand what is going on now. We had our images stored in a field called 'Post Image' which is not part of the body, but rather a separate field. I think this field may be specific to the Wordpress theme we were using. It meant that the theme could use the image as a thumbnail in category views, the way Drupal uses an Image field, for instance. Very few of our posts actually had embedded images. So, shall I take it that I won't be able to import these 'Post Images'?
Any thoughts on the URL path issue?
PS: I do have Media installed and enabled.
Comment #5
jpincas commentedJust tried another test and it looks like the path import works! Perhaps the first one didn't work because I tried it so many times when I was getting the original error message.
Comment #6
mikeryanOK, it is true that custom fields are not yet implemented. I'm going to close this issue and add a new task issue for that.
What theme are you using? I can test with that...
Thanks.
Comment #7
jpincas commentedWas using the 'Thesis' theme, which is commercial so you have to pay for it. Don't worry too much anyway, the module has saved me tons of time already. Thanks.
Comment #9
philpro commentedAs a follow up to this post, I do believe that if you do an export of only the "posts", the WXR file does not contain the "attachment" post types. The default settings which exports everything works.