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.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 687538_T_STRING_error.patch | 1.57 KB | zyxware |
Comments
Comment #1
stefan81 commentedI experience the same.
Comment #2
rzelnik commentedI have the same issue - It is impossible to install the module.
Comment #3
rzelnik commentedFor your info: it seems the dev version works well.
Comment #4
un11imig commentedThe same.
Comment #5
willieseabrook commentedI get this too. Throughout the entire file the opening quote is a double quote " and the closing quote is a single quote '.
Comment #6
motou commentedcould anyone provide the PHP version on which the module is installed?
Comment #7
rzelnik commentedIn my localhost (Ubuntu 10.04) there is PHP 5.3.2.
I can reproduce this error in my current configuration.
Comment #8
Anonymous (not verified) commentedAbove posters, have you tried the development snapshot from 2009-Nov-13? That seems to work.
Comment #9
wgrunberg commentedI 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.
Comment #10
drupalninja99 commentedi got this too
Comment #11
grandfso commentedHi, the dev version seems to be working as expected...
Comment #12
leilyrken commentedTo 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));
Comment #13
zyxware commentedHi,
I also have the same issue. I created a patch file for fixing this. Following attachment contains the patch file.
Thanks,
zyxware
Comment #14
Ravel commentedThanks, that helped me out.