SQL error when attempting to get Most Emailed data.
spatz4000 - October 13, 2008 - 15:18
| Project: | Forward |
| Version: | 5.x-1.17 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Prior to the latest update 5.x-1.7, I was using the Most Emailed block without issue. After the update, I get the following SQL error
user warning: Unknown column 's.nid' in 'on clause' query: eval SELECT node.nid AS nid_me, node.title, count(*) AS cnt,node_data_field_headline.field_headline_value AS X FROM shared_forward_log s LEFT JOIN shared_node AS node ON s.nid = node.nid LEFT JOIN shared_content_field_headline node_data_field_headline ON node.vid = node_data_field_headline.vid WHERE (node.status = '1') AND (node.type IN ('article')) AND s.type='sent' group by node.nid ORDER BY cnt DESC LIMIT 0, 5 in /var/www/html/includes/database.mysqli.inc on line 156.So I thought "hey the schema changed, but there was nothing in the release notes, no big deal I'll look at the code and get the SQL I want from there." The SQL from the code though also throws an error:
Unknown column 's.nid' in 'on clause'
This is the code snippet from the Most Emailed section of forward.module
$query="SELECT n.nid, n.title, count(*) AS cnt FROM {forward_log} s LEFT JOIN {node} n ON s.nid = n.nid WHERE s.type='sent' AND n.status=1 AND timestamp > ". $pastday .' GROUP BY n.nid, n.title ORDER BY cnt DESC';Am I missing something?

#1
Updated the Version, I am using the latest release.
#2
Could you please retest with the current version?
#3