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.
There's no way to preserve book hierarchies from one Drupal instance to the other. I could use some advice on that or if it's not implemented I would appreciate a feature to do so.
Comment | File | Size | Author |
---|---|---|---|
#4 | migrate_d2d-book_migration-2146961-4-d7.patch | 5.62 KB | AndyF |
Comments
Comment #1
mmcintosh CreditAttribution: mmcintosh commentedI recently encountered this issue in multi-step migration upgrade of a drupal 6 to 7 project and I found that the best tool for the job was the Node Export Module also the UUID Module was needed.
I removed most of the other modules and did an in place upgrade to Drupal 7 then exported the books to a clean new drupal 7 instance and all the hierarchies remained intact.
Hope this helps.
Comment #2
CWSmith1701 CreditAttribution: CWSmith1701 commentedI don't disagree with this, however with Drupal 8 giving up the direct upgrade method in favor of migrate module this becomes even more important if you ask me. You need to be able to pull your content over without issues, including hierarchies and the like.
Comment #3
CWSmith1701 CreditAttribution: CWSmith1701 commentedI'm looking at the DB, and while I have no idea HOW to code this I would think using the information available at https://drupal.org/node/1513766 might be helpful. I honestly just don't have the coding ability to do it.
Hence why I ask support for books be in the UI here.
Comment #4
AndyF CreditAttribution: AndyF at NDP commentedHi,
I've made a menu migration class that reads from a D6 source and works with the D7 menu destination handler posted in #763880: Import Hierarchy as Book. The migration is based on a menu link migration, and should be run after all the book nodes have been imported. Here's an example that works if the book content types are
page
,story
andbook
. Thanks.Comment #5
pip0 CreditAttribution: pip0 commentedA simple method to import all my book hierarchy is :
1 - Dump the "menu_links" table from drupal 6 by selecting only links used by my book pages
2 - Add two columns "language" and "i18n_tsid" at the end of each row from the dumping Drupal 6 "menu_links" table with there value.
3 - Import the updated "menu_links" table from Drupal 6 to Drupal 7
Example "menu_links" table row to import with Drupal 7:
INSERT IGNORE INTO `menu_links` (`menu_name`, `mlid`, `plid`, `link_path`, `router_path`, `link_title`, `options`, `module`, `hidden`, `external`, `has_children`, `expanded`, `weight`, `depth`, `customized`, `p1`, `p2`, `p3`, `p4`, `p5`, `p6`, `p7`, `p8`, `p9`, `updated`, `language`, `i18n_tsid`) VALUES ('book-toc-200', 1320, 0, 'node/200', 'node/%', 'Services', 'a:0:{}', 'book', 0, 0, 1, 0, 0, 1, 0, 1320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'und', 0);
Hope that this can help some one else.
Comment #6
pierregermain CreditAttribution: pierregermain commentedI have left at https://www.drupal.org/node/1513766#comment-13273005 an example how to migrate the links from D6 to D8