Opened 7 years ago
Closed 7 years ago
#2464 closed defect (bug) (fixed)
Greymatter import support missing
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Administration | Version: | 2.0.1 |
| Severity: | normal | Keywords: | greymatter, import, bg|has-patch |
| Cc: |
Description
So I went and installed Wordpress 2.0.1 and greymatter.php is 0kb. While this is a very zen solution, most people don't appreciate the wonder of this.
Attachments (10)
Change History (16)
this file should be used instead of the other two, it has about 3 lines difference, mostly adding 'published' status instead of 'draft'.
I'm putting this (final) version here so people can just use it if they wish.
This may end up on another ticket, but since this is using wp_insert_post it sends the 'publish_post' signal which by default runs generic_ping, and if the ping hangs you get a random error message involving class-IXR and the import just up and dies. Signal handlers like generic_ping need to keep in mind that they can bring down a lot more than just themselves.
- Milestone set to 2.1
Avoiding the generic_ping() during import is will be fixed in 2.1. Importers should be using wp_insert_post().
A few things need to change though:
Use username_exists() instead of doing a SELECT on user_login.
Remove the call to upgrade_all(). It is not necessary.
Remove the SELECT * on $wpdb->posts. It doesn't look like it is really needed.
Never use mysql_query. Use $wpdb for all database operations.
Thanks.
Cool beans. I know the thing needs a lot of work, I just took bits of the old import-greymatter.php and threw it into the outline of the new mt.php with enough modifications to make it work. I've never seen Wordpress before two days ago, so I'm still finding my way about a bit.
newest version of the file, interface cleaned up, all DB stuff removed, all of ryan's sugestions incorporated
ok, I swear its the last time, this one doesn't duplicate entries if you import again. There, I'm going outside now.
Looks good. It needs some i18n work, but we can take care of that separately.

greymatter import for 2.0.1. It worked for me.