Justin Braem wrote:
@MirkoW First, thanks so much for creating this script... what a huge help.
I've tried using it with some success, but there are a couple of issues I can't seem to resolve. I'm hoping there's an easy answer to my questions.
The blog I'm working with is currently mirrored in two places: The original site is at http://web.me.com/geoffreyg/Cars/Blog/Blog.html and I've recently reconfigured the iWeb project for a new hosting account, so the same content is mirrored at http://lanciainfo.com/Lancia_Info/Blog/Blog.html (sans comments).
I've tried running the script (v1.5) on the me.com site and it always results in the "0 postings" message that other users have experienced, although I'm sure the xml feed exists and is entered properly in the script.
You have the same Problem as William McCallum1
William McCallum1Re: Move iWeb MobileMe Blog to Wordpress
The blog-archive.xml points to http://www.lanciainfo.com/
So you have to edit the line 187:
# ------------ Find posts, this only works on web.me.com
@posts = ($res->content =~ m/<link>(http:\/\/web.me.com\/.*html)<\/link/g);
I tried this in my local script, but your blog-archive.xml seems to be totally messed up.
The Links go to adresses like this:
http://www.lanciainfo.com/Cars/Blog/Entries/2012/5/22_Aurelia_brakes.html
But the oage doesn't exist. 404 You can proof it by posting it to your browser.
The script needs a proper xml, otherwise it can not get any content.
I have a solution which may works for you. You have to replace line 187
# ------------ Find posts, this only works on web.me.com
@posts = ($res->content =~ m/<link>(http:\/\/web.me.com\/.*html)<\/link/g);
with
# ------------ Find posts, this only works on web.me.com
my $the_content = $res->content;
$the_content =~ s/www\.lanciainfo\.com/web.me.com\/geoffreyg/gim;
print $the_content if $verbose;
@posts = ($the_content =~ m/<link>(http:\/\/web.me.com\/.*html)<\/link/g);
These lines are trying to fix your messed xml.
I have better luck if I reconfigure the script and run it on the blog at lanciainfo.com – in this case all posts are successfully exported and I have been able to migrate them to a new wordpress installation at http://blog.lanciainfo.com. However, there are two significant issues: first, the post dates all seem to be reset to the same date, and second, the embedded image links are all broken. I suspect these two problems are connected since WP sorts image files into folders that reflect the date they are posted.
Can you offer any insight as to what's happening or how I might fix these issues?
Thanks again,
Justin
the same date: in my local resulting xml (whith the proposed modifications) all seems ok.
embedded image links are all broken:
Set
# Add x to month of upload dir; normaly 1
my $add_upload_dir_month = -1;
play with this value
Hope that helps!
Mirko