Hello, I found some time to work on this and I changed the
import_wordpress.py (line 75)

if entry.wp_post_type == "post":
​    ​
post = self.add_post(title=entry.title, content=content,
​    ​
pub_date=pub_date, tags=terms["tag"],
​    ​
categories=terms["category"],
*​    ​old_url=entry['link'])*


​Instead of* old_url=entry.id <http://entry.id>* I used
*old_url=entry['link']*

The result: I got ALL the redirects.​

Another issue (or maybe not) is the redirects with accents. I have some
redirects like:

*old_url = /2010/05/03/la-stagione-della-luce-e-arrivata-finalmente/*
*new_url = /blog/la-stagione-della-luce-%C3%A8-arrivata-finalmente/*


This works because the new url is handled by mezzanine. The new_url slug is
generated from the title (?).

In this case:

*old_url =
 
/2010/03/09/e%e2%80%99-possibile-dare-una-spintarella-a-questo-inverno-e-mandarlo-gentilmente-in-vacanza-nell%e2%80%99emisfero-australe/*
*new_url
= 
/blog/e-possibile-dare-una-spintarella-a-questo-inverno-e-mandarlo-gentilmente-in-vacanza-nellemisfero-australe/*


But actually in wordpress the original old_url is:
*/2010/03/09/e’-possibile-dare-una-spintarella-a-questo-inverno-e-mandarlo-gentilmente-in-vacanza-nell’emisfero-australe/*

​If in my local I use the old_url as in the Redirect object, the url is
changed to: *http://127.0.0.1:8000/2010/03/09/e
<http://127.0.0.1:8000/2010/03/09/e>’-possibile-dare-una-spintarella-a-questo-inverno-e-mandarlo-gentilmente-in-vacanza-nell’emisfero-australe/*
(as in wordpress), but I get a 404.​

​I have the feeling that this is a bug.​

​Any thoughts?​



-- 
Karim N. Gorjux

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to