This is a great and very useful module. Any chance there will be a port to Drupal 7 and Views 3?

Many thanks!

CommentFileSizeAuthor
#18 computed_reverse_node_ref.tgz8.79 KBquazardous
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnv’s picture

subscribe. This would be very helpful.

mherchel’s picture

Definitely a must have for D7. Subscribe.

ogi’s picture

subscribe

michielnugter’s picture

I posted a patch to views itself that enables reverse references:

http://drupal.org/node/1043260

I would love some feedback on the patch.

Seraphin42’s picture

Suscribe

mattbk’s picture

subscribe

eric.chenchao’s picture

subscribe

mattbk’s picture

Title: Port to Drupal 7 » Port Reverse Node Reference to Drupal 7

Making title clearer.

federico.giunchi’s picture

subscribe

basicmagic.net’s picture

subscribe

midmood’s picture

+1

Stefan Haas’s picture

+1

g76’s picture

+1

Stefan Haas’s picture

+1

johnv’s picture

@Stefan, apparently you're a very busy person - It happened to me too (twice): describing twice to the same queue. Luckily a long weekend is coming up! ;-)

Stefan Haas’s picture

ups ;) I'm just to excited about this project

quazardous’s picture

+1 with some way to define field types that handle reference (because I have a ext_node_reference here ;p)

maybe we could use http://drupal.org/project/computed_field with a query on the field table...

quazardous’s picture

a first shot for computed reverse node reference

If you want I can post it as standalone module...

may lack a little something on line 161 of .module


if (!empty($settings['source_field'])) {

    $field_info=field_info_field($settings['source_field']);
    
    list($table, $info) = each($field_info['storage']['details']['sql']['FIELD_LOAD_CURRENT']);
    $nid_field = $info['nid'];
    
    list($id, , ) = entity_extract_ids($entity_type, $entity);
    $query = "SELECT DISTINCT entity_id FROM {{$table}} WHERE {$nid_field} = :nid AND language = :lang";
    foreach(db_query($query, array(':nid' => $id, ':lang' => $entity_lang))->fetchCol() as $delta => $nid) {
      $items[$delta]['nid'] = $nid;
    }

}

PS : it's not providing views integration

Russell Mann’s picture

subscribe. Looking for this functionality in D7.

michielnugter’s picture

This issue can be closed I think because #1188500 and #1083902 implement this feature for views and references, the first patch is already committed and the second one should make it into git too..

bradweikel’s picture

yched’s picture

Title: Port Reverse Node Reference to Drupal 7 » Module integrated to References D7
Status: Active » Closed (won't fix)

So the short answer is : the feature provided by Reverse Node Reference has been integrated in References D7, thanks to the legwork provided by Views.

If @markus_petrux is still around, this should probably be writtent down somewhere on the project page ?

markus_petrux’s picture