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

domidc’s picture

The 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.

soulston’s picture

Hi,

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?

domidc’s picture

The 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)

asak’s picture

I 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...?

domidc’s picture

Great 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!

domidc’s picture

Status: Active » Closed (fixed)

This feature is now included in 6.x-2.0

kenorb’s picture

Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kenorb’s picture

This solved my problem how to setup permissions for referenced user and user profiles:
http://drupal.org/project/nodeaccess_autoreference

hefox’s picture

Status: Closed (fixed) » Active

Sorry 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.

domidc’s picture

hefox, it is possible to remove the limitation. I will commit the new feature this weekend.

hefox’s picture

Oh, cool thank you! =)

hefox’s picture

(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?)

domidc’s picture

As from version 6.x-2.4 support for references having references to multiple node types is possible.

domidc’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.