When I install the module, I get the WSOD and this error:

T_STRING in [base path] sites/all/modules/node_template/nodetemplate.module on line 212

(of course, [base path] is the base path to the site I'm developing, it doesn't actually print that out...)

contents of line 212:
db_query("INSERT INTO {node_template} (nid, is_template, shared) VALUES (%d, %d, %d)", $nid, 1, 0);

I'm just starting to get my head around php, so I can't say that the above makes much sense to me. This error happens immediately upon enabling the module, on a site running version 6.15. I'll provide any additional details if needed.

CommentFileSizeAuthor
#13 687538_T_STRING_error.patch1.57 KBzyxware

Comments

stefan81’s picture

I experience the same.

rzelnik’s picture

Priority: Normal » Critical

I have the same issue - It is impossible to install the module.

rzelnik’s picture

For your info: it seems the dev version works well.

un11imig’s picture

The same.

willieseabrook’s picture

I get this too. Throughout the entire file the opening quote is a double quote " and the closing quote is a single quote '.

motou’s picture

could anyone provide the PHP version on which the module is installed?

rzelnik’s picture

In my localhost (Ubuntu 10.04) there is PHP 5.3.2.
I can reproduce this error in my current configuration.

Anonymous’s picture

Above posters, have you tried the development snapshot from 2009-Nov-13? That seems to work.

wgrunberg’s picture

I am getting the same parsing error with the 6.x-1.0 version: PHP 5.2.8, MySQL 5.1.30, WinXP
I'll try the dev version.

drupalninja99’s picture

i got this too

grandfso’s picture

Hi, the dev version seems to be working as expected...

leilyrken’s picture

To fix it, edit nodetemplate.module: Change " to ' onn line 208, 253, 277. Easy to see with a php text editor with the text colorization.
- Change line 208:
$existed_node = db_result(db_query("SELECT COUNT(*) FROM {node_template} WHERE nid = %d', $nid));
>>>
$existed_node = db_result(db_query('SELECT COUNT(*) FROM {node_template} WHERE nid = %d', $nid));

- Change line 253:
$existed_node = db_result(db_query("SELECT COUNT(*) FROM {node_template} WHERE nid = %d', $nid));
>>>
$existed_node = db_result(db_query('SELECT COUNT(*) FROM {node_template} WHERE nid = %d', $nid));

- Change line 277:
$existed_node = db_result(db_query("SELECT COUNT(*) FROM {node_template} WHERE nid = %d', $nid));
>>>
$existed_node = db_result(db_query('SELECT COUNT(*) FROM {node_template} WHERE nid = %d', $nid));

zyxware’s picture

StatusFileSize
new1.57 KB

Hi,

I also have the same issue. I created a patch file for fixing this. Following attachment contains the patch file.

Thanks,
zyxware

Ravel’s picture

Thanks, that helped me out.