Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Replace (on line 400 or so in nodereferrer.module):
$query = "SELECT n.nid, n.vid, n.title
FROM {" . $db_info['table'] . "} nr
INNER JOIN {node} n ON n.vid = nr.vid AND n.status = 1 ". $filter_nodetypes ."
WHERE nr." . $db_info['columns']['nid']['column'] . " = %d
ORDER BY ". $order;
With this:
$query = "SELECT n.nid, n.vid, n.title
FROM {" . $db_info['table'] . "} nr
INNER JOIN {node} n ON n.vid = nr.vid ". $filter_nodetypes ."
WHERE nr." . $db_info['columns']['nid']['column'] . " = %d
ORDER BY ". $order;
Notice the change in the INNER JOIN line.
A colleague and I will work towards making a patch that adds this as a configuration option and submit it here for consideration for inclusion. Meanwhile, this will do what you want I think.
Thank you this is exactly was I was looking for. Works great.
I actually use a Views 2 block to display my node referrers field -- so even with this module edit it is still possible for me to block unpublished nodes by adding a views filter... perhaps the change trailerparkopera showed above should be the default behavior for this module, and let persons with other needs adjust it with views?
good luck adding a configuration option, trailerparkopera.
SAme need here.. it would be nice to have a field-option to include/exclude unpublished nodes (I use it as a list of reviewers for editors that are the only one that can access that field).
Comments
Comment #1
trailerparkopera commentedYes...but you have to modify the module.
Replace (on line 400 or so in nodereferrer.module):
With this:
Notice the change in the INNER JOIN line.
A colleague and I will work towards making a patch that adds this as a configuration option and submit it here for consideration for inclusion. Meanwhile, this will do what you want I think.
Comment #2
pztrick commentedThank you this is exactly was I was looking for. Works great.
I actually use a Views 2 block to display my node referrers field -- so even with this module edit it is still possible for me to block unpublished nodes by adding a views filter... perhaps the change trailerparkopera showed above should be the default behavior for this module, and let persons with other needs adjust it with views?
good luck adding a configuration option, trailerparkopera.
Comment #3
nardberjean commentedI plan to use the module revisionning in a way where it is important that unpublished refered nodes appear.
Comment #4
andypostThis should be implemented as option for field some kind of #416332: Option in views to only display the number of referrers node ( count the child node of a cck node and display the number )
Comment #5
sylvaticus commentedSAme need here.. it would be nice to have a field-option to include/exclude unpublished nodes (I use it as a list of reviewers for editors that are the only one that can access that field).