Data synchronization book.module when outline.module is enabled.

beginner - September 30, 2008 - 07:47
Project:Outline
Version:6.x-0.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:beginner
Status:active
Description

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.

#1

beginner - September 30, 2008 - 08:09

There 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?

#2

beginner - September 30, 2008 - 08:17

Looking at the {outline_book} columns, I'm thinking we should update the table definition to create default values for some of them.

#3

beginner - September 30, 2008 - 08:27
Status:active» needs work

Here is a very beginning of a patch. It's not complete, but I don't have time to play more today.

AttachmentSize
enable_outline_import_book.patch 774 bytes

#4

beginner - October 23, 2008 - 02:20
Assigned to:Anonymous» beginner
Status:needs work» fixed

committed full fix today.

#5

beginner - October 29, 2008 - 10:06
Status:fixed» active

The last patch didn't account for the following scenario:
install outline -> disable outline -> use book.module some more -> re-enable outline.

#6

beginner - October 29, 2008 - 10:07

#7

beginner - November 30, 2008 - 01:48
Title:Missing data from book.module, when outline is enabled later.» Data synchronization book.module when outline.module is enabled.

Done:
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...

 
 

Drupal is a registered trademark of Dries Buytaert.