Closed (fixed)
Project:
Corresponding node references
Version:
6.x-1.8
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 May 2009 at 20:17 UTC
Updated:
31 Aug 2009 at 12:50 UTC
Now the module only supports nodereference instances pointing to only one node type... why? They have some technical limitation. Sorry if this is a stupid question, but i realy don't know how CCK and node reference work...
Thanks for this reaaaly great module.
Comments
Comment #1
domidc commentedThe module becomes a bit more complex when a single instance is needed. You need to keep in account that the node reference column is located in the content_type_x table for a single reference. For multiple references it is stored in the same table content_field_reference. It also should keep track of changes from single to multiple.
I might be a good idea to extend the module it s capability. When I find the time I just might include it.
On the other hand this module doesnt offer much free work with single references it gets handy when you have multiple references so it will most likely be used in this context.
Comment #2
soulston commentedHi,
Firstly thanks for a great module.
I am not sure what you are saying here. Has this module been altered to only support referencing:
A: other node types
B: nodes of same type
C: both the above
I have version 6.x-1.8 and am currently using it to reference nodes of the same type and nodes of different types (C).
Does this mean I will run into problems later on?
Comment #3
domidc commentedThe only thing the explaination says is that when you use node referencing and this module, the node reference instance has to multiple (which means multiple nodes can be referenced).
Your version of the module will work in both your cases. (the next release 6.x-1.9 only has a minor change in menu hook)
Comment #4
asak commentedI really like this module, but cannot have it set to multiple select options on the node type which is going to be created more often, and is going to reference a less-frequent node type which should capture all of these referencing nodes.
Basically - One node type is a competition, the other is competition submissions. each submission can only belong to 1 competition. I was glad that this module supports filtering the results through views, which allowed me to filter to active competitions only, but the problem remains with multiple select.
Is there a way to alter the display of the select box to only allow a single select, even though the configuration is set to multiple...? ;)
some form_alter kinda magic...?
Comment #5
domidc commentedGreat idea asak
You could try to add:
/**
* Implementation of hook_form_alter()
*/
function corresponding_node_references_form_alter(&$form, $form_state) {
if ($form['#id'] == 'node-form') {
$form['#field_info']['field_ref_to_story']['multiple'] = 0;
}
}
Where field_ref_to_story being your node reference instance.
When I ll find the time I ll make it dynamically and configurable on settings form of the module and it will be included in the 6.x-1.10 release
Thanks for the idea!
Comment #6
domidc commentedThis feature is now included in 6.x-2.0
Comment #7
kenorb commentedComment #9
kenorb commentedThis solved my problem how to setup permissions for referenced user and user profiles:
http://drupal.org/project/nodeaccess_autoreference
Comment #10
hefox commentedSorry for activating but I'm really confused. The title and original post seem by be asking why the limitation for only one node type, ie "content types that can be referenced : 1 content type". However the everything else is about the limitation for only multiple fields; was there deleted posts or something?
My question is about former; why the limitation on only pointing to one content type? I'd be interested in trying to remove that limitation but it'd be easier if I knew where to start.
BTW, fields that are used for multiple types are also stored in separate tables, so perhaps that could help find a different way for limit 1.
Comment #11
domidc commentedhefox, it is possible to remove the limitation. I will commit the new feature this weekend.
Comment #12
hefox commentedOh, cool thank you! =)
Comment #13
hefox commented(Actually, I might want to look into the single node issue to see if I can get a workaround that let's me use the settings on the field page instead of on CNR page; perhaps using a placeholder content type to force single table. Think it may be possible or is this a "erg! ack!" type frustrating type thing?)
Comment #14
domidc commentedAs from version 6.x-2.4 support for references having references to multiple node types is possible.
Comment #15
domidc commented