Closed (duplicate)
Project:
FeedAPI
Version:
6.x-1.9-beta3
Component:
Code feedapi_node
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2009 at 17:56 UTC
Updated:
7 Dec 2009 at 17:24 UTC
I have been having issues with feedapi this morning were I get
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(n.nid) FROM node n WHERE n.nid IN (5231) ORDER BY title DESC' at line 1 query: SELECT n.title, DISTINCT(n.nid) FROM node n WHERE n.nid IN (5231) ORDER BY title DESC in modules/feedapi/feedapi_node/feedapi_node.module on line 98.
showing on every feed node that's created. I am using feedapi_mapper to map feeds to nodes and I am not sure if that's related to this issue. Anyways, I am using latest drupal-6.14 and -dev modules.
Comments
Comment #1
likewhoa commentedjust an added note the 5231 node is the feed node and thus this user warning is shown on every feed item page.
Comment #2
spangaroo commentedI'm also receiving the same error:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(n.nid) FROM node n INNER JOIN node_access na ON na.nid = n.nid WHERE (' at line 1 query: SELECT n.title, DISTINCT(n.nid) FROM node n INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'workflow_access') OR (na.gid = 0 AND na.realm = 'workflow_access_owner'))) AND ( n.nid IN (2678) )ORDER BY title DESC in public_html/sites/all/modules/feedapi/feedapi_node/feedapi_node.module on line 98.Mine mentions something about workflow_access but even if I disable the workflow module I still get the error in feedapi.
Comment #3
kostajh commentedSame problem here with 6.x-1.9-beta3.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(n.nid) FROM node n WHERE n.nid IN (324) ORDER BY title DESC' at line 1 query: SELECT n.title, DISTINCT(n.nid) FROM node n WHERE n.nid IN (324) ORDER BY title DESC in /mysite/live-docs/sites/all/modules/feedapi/feedapi_node/feedapi_node.module on line 98.I only got this error after enabling Content_Access and rebuilding content permissions on the site. If I disable and uninstall Content_Access, the errors go away.
Any thoughts?
Here is line 98 of the code:
Comment #4
khapin commentedSubscribe!
Same problem here, and I also use content_access.
I'll investigate some more next week...
Comment #5
khapin commentedI've applied the "patch" suggested in http://drupal.org/node/606256#comment-2257348 and it looks like it solved the problem. I don't really understand why it does though...
Comment #6
aron novak#5: thanks khapin for trying it out, then this bug is the duplicate of
#606256: user warning
Comment #7
spangaroo commentedGreat job, thank you.
Here's how I got it to work.
1. Backed up feedapi_node.module by changing its name to orig-feedapi_node.module
2. Downloaded the patch file located in http://drupal.org/node/606256#comment-2258088 (comment #11, 606256_fix_rewrite.patch)
3. Saved the file to /Applications/MAMP/htdocs/drupal/sites/all/modules/feedapi/
3. Opened the Terminal and navigated to /Applications/MAMP/htdocs/drupal/sites/all/modules/feedapi/
4. Applied the patch using this command: patch -p0 < 606256_fix_rewrite.patch
5. Received this message: "patching file feedapi_node/feedapi_node.module".
6. Uploaded the newly-patched version of feedapi_node.module to this directory on my webserver: /public_html/sites/all/modules/feedapi/feedapi_node/
8. Ran update.php and the user warning disappeared on all the /feed-item/[nid] pages.
9. Thanks again guys!