Download & Extend

Can't reference multiple content types?

Project:NodeReferrer
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello,
I am using CCK(Node Reference), Node Referrer, and Nodereferrer_create modules.

I have a working relationship between two content types, Project and Task. They reference each other fine. No problem here.

I am trying to create a new relationship between a "parent" content type, Goal, and multiple "subordinate" content types, any of Page, Podcast, or DevNote... (Their attributes aren't significant.)

First attempt:
I created a common(shared by all) Node reference field for the subordinate content types named "Related goal" or field_relatedgoal.
Next, I create a Node referrer field on the parent content type named "Related nodes" or field_relatednode and allowed unlimited values, and allowed each of the specified content types--Page, Podcast, DevNote--and allows the field_relatedgoal field...
I create content, etc, and there is a problem: The Node Reference field, field_relatedgoal, is successfully displayed on any of the subordinate content types, but none of the parent pages' Node Referrer field field_relatedgoal is displayed.

Troubleshooting:
I noticed that as soon as I remove the field_relatedgoal from all except one content type--for instance, if I only have one Node Reference field field_relatedgoal attached to the Podcast content type, and remove it from all others--then it works fine. The "Related goal" is referenced on each of the subordinate podcast pages, and the "Related nodes" podcasts are visible on the Goal page.

To troubleshoot, I tried to create a distinct field_relatedgoal1 (or field_relatedgoal2 or 3, etc) for each of the distinct content types, and enabled them in the Node Referrer checkbox selection. No good.

Help:
Basically, it appears Node Referrer fields only displays when there is one content type/and one Node Reference field. If I have the same field on multiple content types, or distinct fields on multiple content types, the Node Referrer field fails to display on the parent page.

I suspect that the query could be modified in the Node Referrer module... Perhaps now it is glitchy for me because it queries for nodes that refer to it and match the conditions: [content type = Podcast <> content type = Page] and of course that returns no results.... I don't know--I'm a Drupal neophyte so its probably much more complicated than an AND conditional that should be OR.

Anyone got any ideas?

Patrick

Comments

#1

I am now using multiple "monogamous" relationships to implement multiple content type references for a single referrer...

Goal content type has these fields:
Node Referrer: field_relatedpodcast
Node Referrer: field_relatedpage
Node Referrer: field_relateddevnote

Podcast content type has this field:
Node Reference: field_relatedgoal_forpodcast

Page content type has this field:
Node Reference: field_relatedgoal_forpage

DevNote content type has this field:
Node Reference: field_relatedgoal_fordevnote

And each combination only references one other field(hence "monogamous" hah). This will work for my purposes now, but the module should be able to allow for multiple content types... I'd much rather have one common Node Reference field field_relatedgoal to use for any content type, and one Node Referrer field field_relatednode.... rather than 2 for each content type I wish to reference. -_-

Any further help would be appreciated... as this isn't a very desirable solution.

Patrick

#2

Good idea to separate different content referrers to different label but it shoul be configured

Right now I have no time to code and test