Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Write migration script for Leech 1.9 to FeedAPI 1.0.
Comment | File | Size | Author |
---|---|---|---|
#5 | leech2feedapi1.1.php_.txt | 4.9 KB | MMachnik |
#4 | leech2feedapi.php_.txt | 4.44 KB | Aron Novak |
Comments
Comment #1
ahneill CreditAttribution: ahneill commentedI agree a migration script is needed... for those who have used leech to aggregate but want to take advantage of the long term flexibility of feedapi...
PLEASE!
I can commit $50 if we see some results.
thanks
art
Comment #2
alex_b CreditAttribution: alex_b commentedI can't do anything until in a week or two.
If somebody wants to step up here, I will be happy to give advice (free of charge :).
Comment #3
brashquido CreditAttribution: brashquido commentedSeeing as Leech is to be no more in D6, I'd love to see an upgrade script too.
Comment #4
Aron NovakThis is the migration script. You can use it, but only for your own risk. A complicated site may be loss data. Read the instructions very carefully, you can read it in the file comment header.
Comment #5
MMachnik CreditAttribution: MMachnik commentedI needed to convert from Leech to FeedAPI 1.1. I had to make some modifications to the script so it would work. Here it is in case it helps anyone. Same disclaimer as Aron's.
Important differences between this version and the 1.0 version:
* there were database changes, so this script reflects those. The 1.0 script on this page will fail if used with the 1.1 module.
* changed node migration to use the node's created time as the feedapi item's timestamp, preserving the times stored before. The 1.0 version of the script just sets it to the current time.
* added some output to tell you more about what it is doing.
* fixed call to feedapi_get_settings() which used to be _feedapi_get_settings() in FeedAPI 1.0.
I cleaned this up a little before posting it here, so hopefully I did not miss anything. I definitely suggest you run this only on a development site until you are sure it does what you want, and also that you back up your database first.
Thank you to Aron for providing the initial version of this script, I could not have done the migration to FeedAPI without it!
Comment #6
alex_b CreditAttribution: alex_b commentedMMachnik, thank you very much for providing the 1.1 script.
Comment #7
jgraham CreditAttribution: jgraham commentedJust an FYI for anybody migrating a multi-site setup I needed to do this to just one site in a multi-site setup. Also I'm sure there is a cleaner way to do this, but this worked in my situation.
The code snippet at the bottom replaces the following section in the original file;
Replacement snippet, please note to replace YOURSITE with the appropriate site and YOURSITE_DB_URL with the appropriate $db_url. I'm sure some of this can be cleaned up.
Please also note that this is not functionally equivalent and may run into troubles as the later bootstrapping stages (after db) are skipped.
Comment #8
Aron NovakI saw a successful migration from Leech to FeedAPI a few days ago, so i think if somebody wants to migrate, it's possible :)
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
Aron NovakThe 1.1 migration script is not perfect. The feed_item cross table remains empty.
Here is an SQL statement what is missing:
INSERT INTO feedapi_node_item_feed (feed_nid, feed_item_nid) (SELECT fid, nid from leech_news_item);
So just simply execute the migration script and after that, run the above query. If you have table prefixes, of course, add the prefix to the query as well.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #12
ScriptLeech CreditAttribution: ScriptLeech commentedThank you very much!
Respect, ScriptLeech.com