Ticket #4472 (closed enhancement: fixed)

Opened 1 year ago

Last modified 9 months ago

Movable Type importer: MT keywords to WP tags

Reported by: shacker Assigned to: ryan
Priority: normal Milestone: 2.5
Component: Administration Version: 2.3
Severity: minor Keywords: has-patch
Cc:

Description

WP's Movable Type importer currently ignores the Keywords field in MT export files, which is unfortunate when you want to convert a client who wants to switch to WP, but isn't willing to lose their tagging system.

I've modified wp-admin/import/mt.php to convert MT keywords to WordPress postmeta rows as an "mtkeywords" field.

This patch converts to postmeta rather directly to WP core tags because people use MT's Keywords field for all kinds of things besides tagging -- I don't think we can safely assume that MT Keywords should be used as tags in WP. If someone wants to convert them to tags after import and they're using Ultimate Tag Warrior, UTW is able to convert postmeta fields to tags. Hopefully WP core tags will also have this ability.

Attachments

mtimport.diff (1.4 kB) - added by shacker on 06/15/07 08:20:24.
MT importer gains ability to convert MT keywords to WP postmeta
mt-export-example.txt (107.8 kB) - added by shacker on 06/15/07 08:30:49.
Example of MT export file for testing. Many/most entries have keywords.
mt.diff (2.5 kB) - added by shacker on 12/12/07 01:57:56.
Modifies MT importer to convert keywords to WP tags.

Change History

06/15/07 08:20:24 changed by shacker

  • attachment mtimport.diff added.

MT importer gains ability to convert MT keywords to WP postmeta

06/15/07 08:30:49 changed by shacker

  • attachment mt-export-example.txt added.

Example of MT export file for testing. Many/most entries have keywords.

06/15/07 15:45:25 changed by shacker

  • milestone set to 2.3 (trunk).

Setting milestone to 2.3

06/19/07 18:56:05 changed by ryan

Check out add_post_meta().

09/13/07 21:20:51 changed by ryan

  • milestone changed from 2.3 to 2.4.

12/12/07 01:57:56 changed by shacker

  • attachment mt.diff added.

Modifies MT importer to convert keywords to WP tags.

12/12/07 01:59:46 changed by shacker

  • summary changed from Movable Type importer: Keywords to postmeta fields to Movable Type importer: MT keywords to WP tags.

This 12/12/07 diff is a totally different approach from the earlier one. This one converts MT keywords directly to WP tags during import. Yes, I noted above that there's no guarantee that people using MT keywords were using them for tagging, but I do think that's the majority case. Now using wp_add_post_tags() rather than a direct query.

12/13/07 23:48:14 changed by shacker

Tested successfully on a very large conversion project: 15,665 posts and 5,784 tags integrated perfectly.

12/20/07 17:07:01 changed by ryan

  • owner changed from anonymous to ryan.

03/15/08 23:14:55 changed by westi

Hmm that patch seems to have some random unnecessary stuff in it.

I will clean up and apply but leave this open for feedback on the changes actually working as I don't have anything to test it with.

03/15/08 23:16:30 changed by westi

(In [7326]) Import mt tags/keywords. See #4472 props shacker.

(follow-up: ↓ 10 ) 03/16/08 04:50:48 changed by shacker

It should be possible to test with the attached mt-export-example.txt from June 07. I'll try a test with that myself. Thanks for cleaning up the extaneous bits, westi.

(in reply to: ↑ 9 ) 03/16/08 09:41:38 changed by westi

Replying to shacker:

It should be possible to test with the attached mt-export-example.txt from June 07. I'll try a test with that myself. Thanks for cleaning up the extaneous bits, westi.

hmm I totally didn't notice that was there :-(

Time for a quick test.

03/16/08 09:49:39 changed by westi

  • status changed from new to closed.
  • resolution set to fixed.

Importing the example file works fine and imports the tags.

Setting as fixed.