Hi,
I added outline module to a drupal-6.4 and now, when I edit a book page, when saving I always get error like

# user warning: Duplicate entry '6' for key 1 query: INSERT INTO d6demo_outline_book (bid, book_vid, uid, default_child_type, default_toc_depth, book_role_perm, book_user_perm) VALUES (6, 6, 1, '<default>', '-1', 0, 0) in /kunden/ja-web.de/DRUPAL/drupal-6.4/sites/all/modules/outline/outline.module on line 264.

the give entry id is the id of the edited node.

Shouldn't an edit result in a UPDATE statement instead of an INSERT?

Comments

beginner’s picture

Can you give a bit more details on how to reproduce this?

Do you use the outline tab, or the node form?

beginner’s picture

Never mind. I see the bug. I'm looking into it.

beginner’s picture

Status: Active » Reviewed & tested by the community

The problem was in the function _outline_update_outline($node) which has to handle all types of scenarios (insert and update) and be able to make the difference when to use either. I updated the module and commented the code a bit more to ease future debugging.

This is fixed in the head / 6.x-0.x-dev version (when the tarball is updated).
I'll close this issue when I'll release alpha2 (in about 2 weeks).

Thanks for reporting. :)

beginner’s picture

Assigned: Unassigned » beginner
ansorg’s picture

hi,

tested rev. 1.39 of the module and can confirm that it's fixed

thank you!

beginner’s picture

Thanks for the feedback. You're welcome :)

beginner’s picture

Version: 6.x-0.0-alpha1 » 6.x-0.0-alpha2
Status: Reviewed & tested by the community » Fixed

Fixed in alpha2 release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.