testing your module and having some trouble getting it working. getting error messages about SQL syntax and have no real clue what´s causing this. using a shared host and wonder if my host may lack proper support.
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), nr.field_subnodes_tax_value AS tid FROM node n ' at line 1 query: SELECT n.vid, DISTINCT(n.nid), nr.field_subnodes_tax_value AS tid FROM node n INNER JOIN content_type_child nr ON nr.vid = n.vid AND nr.nid = n.nid WHERE nr.field_subnodes_ref_nid = 265 in "PATH"/sites/all/modules/subnodes_by_taxonomy/subnodes_by_taxonomy.module on line 385.
getting similar message when testing creating content for a parent node as well as a child node.
any clue on what´s causing this?
thank you for sharing your work, hope you benefit from people joining into some testing.
BR/jesse
Comments
Comment #1
vm commentedversion of MySQL in use?
Comment #2
markus_petrux commentedActually, I think this is caused by a node access module. Probably, we do not have to use db_rewrite_sql() here.
Could you please try the following changes to subnodes_by_taxonomy.module?
Comment #3
markus_petrux commentedWell, I have committed the fix in #2 to CVS.
Re: "thank you for sharing your work, hope you benefit from people joining into some testing."
Sure, thanks for reporting this issue. Also, if it doesn't exactly fit into someone else's use-case, maybe it can be used as an example on how to play with CCK fields and relations between nodes.
Our use case is: parent nodes are Games, and child nodes are Platforms. Each game can be related to one or more platforms, and there are a lot of attributes that need to be managed at Game/Platform level, hence we use child nodes, and the platforms are taxonomies that give meaning to the relation. Game/Platform data can be edited from the tabs in the parent game node. We also had to write a module that allows us to enable/disable Game/Platform fields depending on the platform, but that one has a lot of particular customizations and it cannot be shared. The whole thing works like a charm.
Comment #4
hyperzmart commentedINITIAL TEST WORKS!
out traveling, just got to a connected computer.. thank you much for swift response.
MY SYSTEM
MySQL: 5.0.81
PHP: 5.2.10
Drupal: 6.13
YES I do use Node Access: 6.x-1.1
just tried your fix #2 and got totally rid of the SQL error. SQL issue SOLVED!
do have another other issue*, will make a clean install and test better when back from worldly adventures
*) WHEN: Having a parentNode and from there created a childNode, this message appears: "Could not locate information about the new child node."
.. will get back to you once having my own equipment at hand and tested on clean installs.
again, thank you very much and sorry not being here sooner.
/jesse
Comment #5
markus_petrux commentedPlease, open a separate support request.