Importing Wordpress permalinks into Drupal path aliases doesn't always work
lavamind - November 6, 2009 - 18:03
| Project: | Wordpress Import |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | lavamind |
| Status: | needs work |
Jump to:
Description
It seems that when the link posts in the WXR file are in the "ugly" permalink format (the default setting, see http://codex.wordpress.org/Using_Permalinks#Default:_.22Ugly.22), importing with alias creation doesn't work.
See this forum post : http://drupal.org/comment/reply/576858/2187408#comment-2187408
I'm not sure if this can be solved because I don't think Drupal path aliases can replicate Wordpress' "ugly" permalink format. This option works better for Wordpress sites that have activated "pretty" permalinks, ie without "p?=" in the URL.
Needs to be investigated...

#1
More info : http://www.webopius.com/content/149/migrate-data-from-wordpress-to-drupal-6
#2
Has anyone successfully used Wordpress Import to alias the ugly permalinks?
#3
This issue is under discussion between the other maintainer and myself.
One solution would be to create a modified alias in Drupal, importing
?p=[id]as something likep/[id], and then a small snippet in Drupal's .htaccess to translate the Wordpress-style ugly permalink into the pretty Drupal alias. That snippet would need to be manually added by the user though, as I simply think it would be unwise for any module to change .htaccesIf anyone could think of a better solution, let us know!
#4
I wonder if we should continue to use path aliases to support Wordpress permalinks. A better solution may be to store in a table for each imported post the Wordpress post name, the Wordpress post id and the created node id. This table could be used by a wordpress_import_legacy module that looks for a Wordpress permalink in the path or the query string of the current url and load the matching node if it finds one.
#5
In my view, we should avoid duplicating functionality of Drupal core. What would the benefit be from creating a module like this, exactly?
The case we are looking at here is specifically where the imported Wordpress has "ugly" permalinks (other permalink styles work fine) AND wants to keep the same URLs. Since this case is likely to be the exception rather than the rule, I don't we should go out of our way to create a very specific solution that would also be extra work to maintain...