Forums

Greymatter Import (28 posts)

  1. gfmorris
    Member
    Posted 8 years ago #

    Some users [including yours truly] have been wondering how to import old Greymatter entries into WP.
    Careful readers will note that WP 0.72 Gold has gm-2-b2.php back in the mix.
    *IF* you have the guts and patience to do it right, here's how to go about it:
    Grab a copy of b2 and install it.
    Run gm-2-b2.php in b2.
    Run an ALTER TABLE session with the five b2 tables, renaming them to wp_$tablename before starting. [e.g. ALTER TABLE b2categeories RENAME wp_categories;] The b2-2-wp.php upgrade script is not currently noticing and renaming those tables properly, but if you go in and make that change yourself, it'll be happy.
    Grab a copy of WP 0.72 and install it.
    Run the b2-2-wp.php conversion script.
    Delete b2, as you simply used it as a stepping stone.
    Last step to make you happier [although this is really only applicable for one-poster logs]: run UPDATE wp_posts SET post_author=1 to change all posts to your admin account. You can then delete any users that b2's GM-conversion script had created, as this has consolidated everything into one account for you. If you have multiple loggers that you're trying to get, you probably want to go in and run something like:
    UPDATE wp_posts SET post_author=M WHERE post_author=N
    ... where M is the old GM author and N is the desired author's number. [If you have more than one GM log to import, you'll want to do this.]
    This all seems like a long process, but from grabbing b2 to clearing running UPDATE wp_posts ... last night, I spent all of 25 minutes importing 990 GM posts. Worth it to me!

  2. jackiefg
    Member
    Posted 8 years ago #

    I've read your post and I get the following message when trying to import my Grey Matter:
    The importer is running...
    importing users...
    Oops, can't find any database named here !
    I'd like to follow your instructions if I need to, but where is ALTER TABLES and how do I run a session? I'm completely new to this, am I supposed to edit something in one of the php files? I tried using gm-2-b2.php in order to import.
    Can you give me a more dumb-user-friendly kind of explanation?
    Thanks a lot.

  3. jackiefg
    Member
    Posted 8 years ago #

    Sorry, my site is at http://www.jackiefg.com/blog - that's where I'm trying to get the wordpress going.

  4. BytesU
    Member
    Posted 8 years ago #

    I love an answer to this question also. I am currently running Greymatter 1.21c and would love to be able to import all of the multiuser posts into WordPress.

  5. gfmorris
    Member
    Posted 8 years ago #

    Jackiefg: are you doing this on a b2 install or a WP install? Please not that gm-2-b2 converts a GM install to a b2 database. As I said in the initial post, you've gotta use b2 as a stepping stone while you do the import process.
    Bytes U: I never had any issues with pulling in multiple authors. You just have to point gm-2-b2 at the directory with your gm-authors.cgi file [which will grab all the data you see on the authors screen in GM] and the one with all the entry-related .cgi files.

  6. BytesU
    Member
    Posted 8 years ago #

    I did that and I was/still getting this error msg from gm-2-b2.php...
    The importer is running...
    * importing users...
    Oops, can't find any database named here!
    [The files are there and I can download and read them!]
    I even copied all the gm-*.cgi files to other folders, re-editied gm-2-b2.php and got the same results. The gm cgi's were originally 644 so I even chmod files to 777 and still got same results.

  7. gfmorris
    Member
    Posted 8 years ago #

    Well, let me correct my earlier statement ... I never had a problem with it pulling in mulitple single-author logs into one database.
    I've never tested multiple authors.
    The error seems to be in the insertion of the author data into the tables, based on the error message. What is your author table named?

  8. Danimal
    Member
    Posted 7 years ago #

    Please tell me someone has found an easier way?

  9. Ryan Boren
    WordPress Dev
    Posted 7 years ago #

    import-greymatter.php should take care of everything. If you try it and have problems, let us know so that we can fix it.

  10. Danimal
    Member
    Posted 7 years ago #

    where do I get that file?

  11. Matt Mullenweg
    Troublemaker
    Posted 7 years ago #

    It's in the wp-admin/ directory of every wordpress installation.

  12. Danimal
    Member
    Posted 7 years ago #

    ok thanks I got it and it worked great!

  13. awh
    Member
    Posted 7 years ago #

    I had about 640 Greymatter logs when I recent imported into a fresh installation of WordPress 1.0.1.
    After that, I made several changes to posts. I put them into categories. When I did this, I opened up several WordPress management interface pages at a time in multiple Mozilla tabs. That might have caused a problem.
    In fact, it might have caused the problem below. OTOH, it may be that the Greymatter import failed.
    The problem is that maybe 5-10% of all my Greymatter entries are not in my WordPress blog. I have to add them all back manually. This is a lot of work.
    In conclusion, first, do not open more than one WordPress management window at a time, ever. Second, after doing any Greymatter import, check all of your entries to make sure each one got imported into WordPress.

  14. awh
    Member
    Posted 7 years ago #

    The following Greymatter import problem is totally unrelated to what I was talking about in the previous comment.
    Greymatter tracks all entries by number. I used the eight digit number. As a result my posts looked like /log/00000080.html and so on.
    When I installed WordPress, I decided to use the mod_rewrite thing to get nice URLs. I decided to assign URLs in the fashion of /archives/2004/01/01/80/ .
    In other words, I used the numerical format for individual archive entries in WordPress. (I like numbered entries. What can I say?)
    Unfortunately, I failed to delete the sample WordPress entry that you get when you first install. If I had done that, perhaps the following problem would not have arisen. OTOH, maybe it would have anyway.
    The problem is that my Greymatter log entries got imported into WordPress with the numerical URL of (greymatterentrynumber)+1. Log entry 80 in Greymatter is 81 in WordPress, 81 is 82, and so on ad infinitum.
    After completing the Greymatter import, I went back into the Greymatter management interface and edited the individual entry template. I removed everything and basically just put in a header meta tag that would redirect from the Greymatter URL to the new WordPress URL, provided that the log entry numbers were the same. Then I put in enough other HTML to make every Greymatter log entry into a basic 302 redirect page. Then I rebuilt all Greymatter entries. That mostly worked. Due to the Greymatter entry numbers not corresponding with the WordPress entry numbers, though, all of the redirects were broken.
    Fortunately, Greymatter has a built-in variable of {{nextentrynumber}}. This variable returns an "81" for log entry number 80, and so on. Thus, I just substituted {{nextentrynumber}} for Greymatter's entry number in the meta redirect tag. As a result, all of my redirects are now working.
    (See above for description of other problem related to missing archive entry pages.)
    Conclusion: Greymatter hackery + WordPress hackery = goodness. It would be optimal, though, if the WordPress installation either did not come with a sample entry, or if an option could be set during installation to not install it, or if users would be advised to delete it before importing if that would work as a solution. (I'm not sure that the counter would get reset.) The worthwhile goal is to make old and new log entry numbers correspond after doing something like a Greymatter import.
    I am enjoying WordPress a lot. It is super-powered. Thank you.

  15. awh
    Member
    Posted 7 years ago #

    I have good news. The problem related to missing archive pages I mentioned above was caused by user error (my own), and not WordPress.
    In the middle of putting my old archives into categories (after the Greymatter import), I realized that I should be careful with multiple WordPress management interface pages open in Mozilla tabs. On my slow dial-up link, it would take WordPress a few seconds to process each command. I began waiting until each command was processed before I made changes on the next entry page. For all those entry pages I changed after I switched to this method, none were lost.
    Thus, the cause of the lost pages was user error.
    It would be nice if WordPress could somehow detect multiple simultaneous database writes from the management interface, and block them, giving an error message. That would prevent this form of user error from causing problems, but it might be more trouble than it would be worth.

  16. Anonymous
    Unregistered
    Posted 7 years ago #

    Hi everyone,
    sorry if this is a silly question, but any idea what the following errors when doing a greymatter -> wp import could be?
    Warning: Invalid argument supplied for foreach() in /usr/home/kasprzak/public_html/blog_new/wp-admin/upgrade-functions.php on line 567
    Warning: Invalid argument supplied for foreach() in /usr/home/kasprzak/public_html/blog_new/wp-admin/upgrade-functions.php on line 637

  17. awh
    Member
    Posted 7 years ago #

    Maybe nothing. Do you see any problem with the way your blog is working? If not, maybe it was a spurious error.

  18. awh
    Member
    Posted 7 years ago #

    BTW, the redirects were 301 not 302.

  19. Anonymous
    Unregistered
    Posted 7 years ago #

    This may seem like a really stupid question, but I'm a complete newbie to all this. In the instructions it says if I want to convert my old GM author to the new WP author, I need to run "UPDATE wp_posts SET post_author=1" - where do I run this? Obviously not start/run :-)
    Thanks in advance,
    André

  20. skebrown
    Member
    Posted 7 years ago #

    I have run the import feature from WP 1.2 the file is named "import-greymatter.php".
    After running this import, I get the following report:
    =================
    The importer is running...
    importing users...
    user skebrown... Done
    Done
    importing posts, comments, and karma...
    Done
    Completed GM 2 b2 import !
    =======================
    However, the import does not seem to have worked because there are no entries in the DB.
    Could it be that I have tried this import after I have been using the WP install for a while? What I mean is, I did not do an immediate import after the initial install of WP. I have been using WP for about a year now and suddenly decided that the new version of WP (1.2) makes it easier to do an import, so I tried it. But this may be why it is not importing entries? The report says everything was imported?
    What could the problem be?
    Any help on this would be greatly appreciated.

  21. awh
    Member
    Posted 7 years ago #

    skebrown, if you are still working on this, are you sure that you followed all the steps? Did you try to run the whole process again, starting from scratch?

  22. skebrown
    Member
    Posted 7 years ago #

    I have tried several times to get it to work even using nightly builds just to make sure it wasn't something funky with a version that I had.
    I have checked my server to make sure that I can run cgi scripts outside of the cgi-bin (yes I can), thinking that this may be the problem (not sure if it even matters?). The script still gives me the message that everything works and was imported, but it isn't there.
    I thought I would wait for the next release and try again. However, not sure if that really matters either since I have been trying different builds of the "import-greymatter.php" file -- which is probably going to be included in the next release without further modification, but who know's.

  23. Sylvia
    Member
    Posted 7 years ago #

  24. Anonymous
    Unregistered
    Posted 7 years ago #

    z

  25. Anonymous
    Unregistered
    Posted 7 years ago #

    Ok, so I imported all of my Greymatter entries... about 107 of them and almost every " or . has been changed to a ?. Any ideas on how to fix that?
    Thanks.
    - jason

  26. shanelavalette
    Member
    Posted 6 years ago #

    if i import my greymatter files to wordpress and have already designed a template for my wordpress page, will it restart me with the beginning template or not change my template at all?

    thanks.

  27. moshu
    Member
    Posted 6 years ago #

    The import will put just your data (= posts and comments) into the database; it will not affect your design/theme.

  28. shanelavalette
    Member
    Posted 6 years ago #

    thank you, thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.