I am not sure if this should be reported under Core, or if its appropriate for this module, but I'm going to put this here, let me know if it should be reported elsewhere.

Here's the scenario -- using the Multiselect module (I have tried this with the core select list widget type and the result is the same) and a Reference view to populate a list of nodes that are either owned by the user or selected as shared by a checkbox in the nodes. So I get this behavior whether I am using Manage Display to do a 'rendered node' view - as well as in the template, rendering the nodes using node_view and drupal_render.

So in this case, we have 2 users:
User 1 (full administrative privileges)
User 2 (able to edit own pages, has access to contextual links)

We also have 4 nodes besides the node we're populating, which I'll name 1-4 for clarity.
Node1 - User1 owned
Node2 - User1 owned
Node3 - User2 owned
Node4 - User2 owned

The following problem will be with the assumption that User 2 is the one logged in, and the one editing/creating a new node.

To a lesser extent with a select list, user1 nodes can come before user2 nodes, and with multiselect, i can order them however I want.

So here's what's happening, as I will illustrate by the order the nodes are being rendered.

Case 1:
Node3: Contextual links for editing come up
Node4: Contextual links for editing come up
Node1: No Contextual links - but this is how it should work, node1 not owned by current user

Case 2:
Node1: No contextual links (which there shouldn't be)
Node3: No contextual links (there should be)
Node4: No contextual links (there should be)

Case 3:
Node 3: Contextual links for editing come up
Node 1: No contextual links (there shouldn't be)
Node 4: No contextual links (there should be)

Anyways, the point is that it will render contextual links for any nodes being loaded by node_view and drupal_render (or as well, when Display fields is set to 'rendered node') -- however, once a node that doesn't belong to the current user is rendered, the rest of the nodes that are rendered after that never have contextual links added to them. You could put 50 nodes (as example) owned by the current user and all will have contextual links then have 1 node not owned by current user, and then 50 more nodes afterwards owned by current user, and those last 50 nodes are not getting contextual links applied to them.

So I'm not sure if this is a problem that is rooted in the Node Reference portion of the module, or if this is a problem in contextual.module

Has anyone else experienced this?

I have run this same experiment in Garland, and Zen themes, currently running Drupal 7.9 and References 7.x-2.0-beta3

Comments

Frogtown’s picture

Anyone anyone? Asked this over a month ago -- Am I barking up the wrong tree? Should this be submitted as a contextual link problem to core instead? Haven't really seen this issue anywhere else.