Just installed this on Drupal 5.1.

Went through creating skeleton templates for a complete book page with children. Added those templates to a new skeleton. No errors or problems encountered (though the workflow isn't necessarily obvious).

However, when trying to create a new instance from the skeleton I get a page with a title of "Create", with the error text: Illegal request.

Nothing else...

CommentFileSizeAuthor
#6 skeleton2.patch2.5 KBagentrickard
#2 skeleton.patch884 bytesagentrickard

Comments

agentrickard’s picture

Component: User interface » Code

Confirmed. Testing.

agentrickard’s picture

StatusFileSize
new884 bytes

This was a menu error. Patch attached and committed to HEAD.

agentrickard’s picture

Status: Active » Fixed
Steel Rat’s picture

Thanks for the quick reply.

Got a little farther, but still having problems.

When creating new instance from skeleton, I am presented with several "Your book page has been created" messages, then several errors:

* Your Book page has been created.
* Your Book page has been created.
* Your Book page has been created.
* Your Book page has been created.
* Your Book page has been created.
* Your Book page has been created.
* Your Book page has been created.

* user warning: Duplicate entry '311' for key 1 query: INSERT INTO book (vid, nid, parent, weight) VALUES (311, 311, 310, 0) in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '312' for key 1 query: INSERT INTO book (vid, nid, parent, weight) VALUES (312, 312, 310, -15) in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '313' for key 1 query: INSERT INTO book (vid, nid, parent, weight) VALUES (313, 313, 310, -14) in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '314' for key 1 query: INSERT INTO book (vid, nid, parent, weight) VALUES (314, 314, 310, -13) in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '315' for key 1 query: INSERT INTO book (vid, nid, parent, weight) VALUES (315, 315, 310, -12) in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.
* user warning: Duplicate entry '316' for key 1 query: INSERT INTO book (vid, nid, parent, weight) VALUES (316, 316, 310, -11) in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.

The child pages did get created, but show as created by anonymous, and the parent item is not being set.

Also, I had expected the top page in the template to be the cover, and that's what I set the parent to for the child pages in the skeleton. But when the instance is created it's having me enter a new parent page.

The skeleton I have created looks like this:

2 Article Template book
3 - Template: Credits and Copyright book
4 - Template: History and Information book
5 - Template: OGL Game Attributes book
6 - Template: EABA Game Attributes book
7 - Template: Action! System Game Attributes book

Ids 3-7 should be children of 2.

agentrickard’s picture

The creation of a new 'instance' will create a new book. When you create the instance, you first create the parent book. That is by design.

The user assignment is not made by the template -- it must be set explicitly by clicking on 'Authoring information.' This was deliberate, in the case where an admin creates the skeleton but the creates nodes belong to some other user. Perhaps it should default to whoever creates the instance.

I'm pretty sure that the SQL error occurs when you create 'book' nodes as templates. It's simply a user case I hadn't tested during original development.

I will investigate why templates of type 'book' cause errors -- I have a suspicion though.

agentrickard’s picture

StatusFileSize
new2.5 KB

The SQL error is caused by the 'parent' element of the book node type. The skeleton module really acts as a replacement for this UI feature.

Reworked so that the book node type does not store any data about parent or weight, and deletes existing records in the {book} table if necessary.

Patch attached. Committed to HEAD.

Steel Rat’s picture

Just installed the update, and that works perfectly now.

Thanks!

I was trying out both this module and Node Template. I'm leaning towards this one as a permanent solution since it doesn't require having an empty book structure sitting in the content.

Thanks again for the quick response!

Jeff

agentrickard’s picture

Makes sense.

Feel free to open UI and workflow suggestions as new issues.

Anonymous’s picture

Status: Fixed » Closed (fixed)