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.
When enabling the module on a clean D6 site which already has plenty of book pages in the book outline {book},
such nodes will not be populated in my {outline_*} tables. Code the module so that it can cope with missing data, and add them as we go along and customize the settings of such nodes.
i.e. improve the code in nodeapi / update, to check for missing data, and do an insert instead of an update.
Comment | File | Size | Author |
---|---|---|---|
#3 | enable_outline_import_book.patch | 774 bytes | beginner |
Comments
Comment #1
beginner CreditAttribution: beginner commentedThere are two ways to go about it:
1) either we initialize all existing book nodes to work with outline.module when the latter is initialized.
2) or we do nothing but we initialize each node separately as we go along.
solution 1 would make more sense, I think.
Next question: what needs to be initialized?
Comment #2
beginner CreditAttribution: beginner commentedLooking at the {outline_book} columns, I'm thinking we should update the table definition to create default values for some of them.
Comment #3
beginner CreditAttribution: beginner commentedHere is a very beginning of a patch. It's not complete, but I don't have time to play more today.
Comment #4
beginner CreditAttribution: beginner commentedcommitted full fix today.
Comment #5
beginner CreditAttribution: beginner commentedThe last patch didn't account for the following scenario:
install outline -> disable outline -> use book.module some more -> re-enable outline.
Comment #6
beginner CreditAttribution: beginner commentedhttp://api.drupal.org/api/function/hook_enable/6
Comment #7
beginner CreditAttribution: beginner commentedDone:
Import data from book.module where we don't have a corresponding outline entry:
TODO:
Update data where the vid, the place in the outline has changed, where nodes have been removed, etc...
Comment #8
captaindav CreditAttribution: captaindav commented