Posted by butler360 on June 18, 2009 at 10:17pm
| Project: | Plainscape |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Anaonymous visitors get this warning on most pages:
* user warning: Unknown column 'n.type' in 'where clause' query: SELECT nid, title FROM node WHERE (( CASE n.type WHEN 'stormexpense' THEN 0 WHEN 'storminvoice' THEN 0 WHEN 'stormknowledgebase' THEN 0 WHEN 'stormnote' THEN 0 WHEN 'stormorganization' THEN 0 WHEN 'stormperson' THEN 0 WHEN 'stormproject' THEN 0 WHEN 'stormtask' THEN 0 WHEN 'stormticket' THEN 0 WHEN 'stormtimetracking' THEN 0 ELSE 1 END )=1 ) AND ( type = 'blog' AND status = 1 AND created < 1244502789 )ORDER BY created DESC LIMIT 0, 1 in [mysite]/themes/plainscape/template.php on line 231.
* user warning: Unknown column 'n.type' in 'where clause' query: SELECT nid, title FROM node WHERE (( CASE n.type WHEN 'stormexpense' THEN 0 WHEN 'storminvoice' THEN 0 WHEN 'stormknowledgebase' THEN 0 WHEN 'stormnote' THEN 0 WHEN 'stormorganization' THEN 0 WHEN 'stormperson' THEN 0 WHEN 'stormproject' THEN 0 WHEN 'stormtask' THEN 0 WHEN 'stormticket' THEN 0 WHEN 'stormtimetracking' THEN 0 ELSE 1 END )=1 ) AND ( type = 'blog' AND status = 1 AND created > 1244502789 )ORDER BY created ASC LIMIT 0, 1 in [mysite]/themes/plainscape/template.php on line 253.I'm no coder, so unfortunately I'm not able to do any troubleshooting on my own. I've run update.php and cleared the cache. Also, I did a search of the issue queue and didn't find any similar errors that didn't say they weren't already fixed.
Comments
#1
I'm getting this too! I restarted the server, cleared the caches, run update.php ... no luck.
#2
Are you both using the theme plainscape or a different one?
#3
(Changed Status - Awaiting more info)
#4
I have had a look through this issue, and believe that it is caused by the SQL queries done by the theme functions in template.php of Plainscape. These call the rewrite sql function (which Storm hooks into for access management), and conflicts with the labelling of the node table by Storm n.
The easiest resolution would I think be if Plainscape could label the table n also even though there is only one db table used in each query.
#5
Ah, thanks for the update.
#6
Hi,
Thanks butler360 and Magnity for the feedback!
I modified the query to use "n" as alias for {node} table. Please wait until the snapshot is regenerated and see if it fix the problem.
#7
#8
Whoops, I forgot that the -dev snapshot doesn't point to HEAD.
So could you try putting the attached
template.phpin the plainscape directory and see if it fix the problem?#9
That appears to have fixed the problem. Thanks Magnity and kong.
#10
#11
Automatically closed -- issue fixed for 2 weeks with no activity.