Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | template.php_.zip | 3.34 KB | kong |
Comments
Comment #1
tiyberius CreditAttribution: tiyberius commentedI'm getting this too! I restarted the server, cleared the caches, run update.php ... no luck.
Comment #2
Magnity CreditAttribution: Magnity commentedAre you both using the theme plainscape or a different one?
Comment #3
Magnity CreditAttribution: Magnity commented(Changed Status - Awaiting more info)
Comment #4
Magnity CreditAttribution: Magnity commentedI 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.
Comment #5
butler360 CreditAttribution: butler360 commentedAh, thanks for the update.
Comment #6
kong CreditAttribution: kong commentedHi,
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.
Comment #7
kong CreditAttribution: kong commentedComment #8
kong CreditAttribution: kong commentedWhoops, I forgot that the -dev snapshot doesn't point to HEAD.
So could you try putting the attached
template.php
in the plainscape directory and see if it fix the problem?Comment #9
butler360 CreditAttribution: butler360 commentedThat appears to have fixed the problem. Thanks Magnity and kong.
Comment #10
kong CreditAttribution: kong commented