I just installed Node_template on a 5.1 Drupal instance. Activated the module, went in to set the options. (FYI, the text for the first to options is exactly the same, but I'm guessing they have different functions.)

Saved the options.

Then went to a Book page I had already created. chose Set Template. Got the confirmation page with no errors (though the title formatting was showing the html, as below:)

Do you really want to set <em>Opel Blitz Truck (July 29th)</em> as a template?

I Choose Next to complete the operation, and get the following error:

user warning: Unknown column 'shared' in 'field list' query: INSERT INTO node_template (nid, is_template, shared) VALUES (192, 1, 0) in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.

As far as I can tell the template was not set. Though I'm not sure what i'm supposed to see at that point.

The options I have set in the settings section:

- Set template needs no confirmation: unchecked
- Set template but without duplicating the node: checked
- Book pages should be duplicated with all the children: checked
- none of the Publishing Reset Options are set.

Thanks,

Jeff

Comments

Steel Rat’s picture

As a test, I went to the update.php page in the modules section, and ran the 1 and 2 updates shown for nodetemplate. This got me past the initial error of the 'shared' column not found. And I was able to create a template.

However, when I go to My Node Templates and attempt to duplicate the node from the template I get the following error:

Fatal error: Call to undefined function: book_update() in /home/ir/public_html/ordnance/modules/node_template/nodetemplate.module on line 290

Steel Rat’s picture

When looking back at my book nodes, it turns out that 4 copies were created from the template when I was getting that final error, but none of the child pages were created.

motou’s picture

Hi Steel,

1. In order to make an update always available to the users of old versions, I made the table change in the update 2. May it's not so good for new user. Now I make only one install() function instead of update 2. Hope it makes install for new user easier.

2. It looks really weird when I figure out that unlike drupal v5.0, from the v5.1 there is no book_update() function any more! So thanks for the bug report.

I've already pack the content of the old book_update() into the new version of node template. Please try the newly released version and see if this bug is corrected!

motou’s picture

Assigned: Unassigned » motou
Status: Active » Fixed

Hi Steel,

1. In order to make an update always available to the users of old versions, I made the table change in the update 2. May it's not so good for new user. Now I make only one install() function instead of update 2. Hope it makes install for new user easier. :)

2. It looks really weird when I figure out that unlike drupal v5.0, from the v5.1 there is no book_update() function any more! So thanks for the bug report.

I've already pack the content of the old book_update() into the new version of node template. Please try the newly released version and see if this bug is corrected!

Steel Rat’s picture

Thanks for the quick reply!

That seems to have fixed it. Though I did get an error when I deleted one of the templates:

Unknown column 'uid' in 'field list' query: SELECT uid FROM node_template WHERE nid = 192 in /home/ir/public_html/ordnance/includes/database.mysql.inc on line 172.

motou’s picture

You can really find bugs quickly. :)

That is a bug too, I think. Already fixed in the dev version.

Anonymous’s picture

Status: Fixed » Closed (fixed)
kenorb’s picture

Title: Error when setting template » Error when setting template: user warning: Unknown column 'shared' in 'field list' query: INSERT INTO node_template