Postponed (maintainer needs more info)
Project:
User backreference
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2010 at 14:37 UTC
Updated:
28 Sep 2011 at 13:38 UTC
on fresh drupal 6.20 install I get this error and I'm not able to select relevant content to user even if he has some nodes created
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 '= 3' at line 1 query: SELECT nid FROM content_ WHERE = 3 in /var/www/drupal/sites/all/modules/user_backreference/user_backreference.module on line 175.
Comments
Comment #1
joachim commentedCan you debug what $db_info gets back from CCK at line 171 please?
Comment #2
mogop commentedcould you telm me how , pls ? :) i'm not familiar with debugging
Comment #3
joachim commentedInstall devel module, then add a line:
dpr($db_info);Comment #4
mogop commentedok ...
i put
dpr($db_info);in page.tpl.php but still it's not showing any messages. the error showing when I'm editing profile and after Save give me this too :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 '= 1' at line 1 query: SELECT nid FROM content_ WHERE = 1 in /var/www/drupal/sites/all/modules/user_backreference/user_backreference.module on line 175.
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 '= 1' at line 1 query: DELETE FROM content_ WHERE = 1 in /var/www/drupal/sites/all/modules/user_backreference/user_backreference.module on line 234.
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 '= 1' at line 1 query: SELECT nid FROM content_ WHERE = 1 in /var/www/drupal/sites/all/modules/user_backreference/user_backreference.module on line 175.
Comment #5
joachim commentedNo, you put it in the module code on the line I mentioned. In page.tpl that variable doesn't exist!
Comment #6
mogop commentedso this:
prints this:
if I wrote :
nothing happens, except the error...
Comment #7
joachim commentedUm, well of course the second one won't work -- the variable hasn't been set yet at that point! ;)
Have you correctly set up user_backreference_get_fields() ?
Comment #8
Marko B commentedI had the same problem, but it was because field wasnt hardcoded in the begining of module.
function user_backreference_get_fields() {
// HARDCODED field name. Put your own here! Or better stillm write a patch for an admin UI! ;)
$field_names = array('field_1dopredsjednik');
then again who would know that this must take places?! some readme file maybe would help?
In the end this works fine but i would like to have support fo multiple fields in the same node and also views do display this, without this module wont be useful much :(
Comment #9
joachim commented> then again who would know that this must take places?! some readme file maybe would help?
There is a really loud warning on the project page that explains this module is missing several key pieces!
> In the end this works fine but i would like to have support fo multiple fields in the same node
What happens if you put several field names into that array?
Comment #10
Marko B commentedJust suggesting this should be added somewhere, could help people to exactly know what to do. Why dont you add that information to project page?
I tried with several fields, no change but maybe its should work like that in current mode.
What i wanted to do is to have node type "club" then have node reference fields 5 of them, for example president, manager etc Then to use some member both as president and manager, and then on this memeber profile that it says both. Currently it just states name of the node.
Comment #11
joachim commentedOk I've added that to the project page.
But I think what I state on the project page is clear -- this is work that was done for a specific case, for a single client. I've released it because it goes *some* of the way towards being a general-purpose module that others can use. But it doesn't go *all* the way. I've released it because that way perhaps another developer can do the rest of the work on it, rather than have to start from scratch.
If that's you, you can post patches or talk to me about becoming a co-maintainer :)
Comment #12
Marko B commentedWish that was the case, as i would like to tweek it to my needs, unfortionatly my knowledge is nowhere near that so i wonder around trying to find some solutions for my need :-(