This module isn't working for me.

Im using content profile. When I look at my profile I can see a node that is referenced but when I go to that node I can't edit it.

From that node I can see other nodes that are referenced to it, and I also cant edit them.

Thanks

CommentFileSizeAuthor
#27 nodeaccess_autoreference.patch644 byteskenorb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kenorb’s picture

Category: bug » support

By default only view does work. For Edit please check permission table, if you enabled proper permission for specified content type.

jdln’s picture

Ive ticked 'Check permission via owners.'

In user permissions ive ticked 'edit referenced su content' for the role assigned to my user.

On my user's profile is the referenced node of type 'su', but i still can't edit it.

Thanks for such a speedy reply!

kenorb’s picture

Can you activate connection messages and paste it? If there is found connection between nodes or not.

jdln’s picture

On my user page;
Connected: YES; Path between user 10 and node 72: Array ( [0] => 0 )

On the referenced node of content type 'su'.
Connected: NO; Path between user 10 and node 23: n/a

The content type 'su' has a Node Referrer to the user's profile.

The profile has a Node reference to the content type 'su'.

Thanks

kenorb’s picture

Which node is user's profile? 23 or 72?
Node Referrer field is not supported, only nodereference.
If user's profile is 72, then you should have permission to edit the node, and you don't have?

jdln’s picture

The user's profile is node 27.

The referenced node is no 23.

Should this be working?

kenorb’s picture

I'm not sure if I understand, sorry. Could you explain me more?
You are logged as uid = 10, user's profile is node 27, and you can't edit your own profile that's node 27? Or you are logged as different user?

jdln’s picture

Sorry, i think i was wrong before.

When im logged in as the user, on my user page i get this;
Connected: YES; Path between user 10 and node 72: Array ( [0] => 0 )

So i think im user 10 and the user's profile is node 72.

On my su content type I get this;
Connected: NO; Path between user 10 and node 23: n/a

So i think the referenced node is 23.

If i edit the user profile i can see the node reference options. I can see that I am referencing a node called 'Imperial'. If I view the user profile i can see a link to 'Imperial' but when i click on the link i get this;
Connected: NO; Path between user 10 and node 23: n/a

Thanks

kenorb’s picture

Node 72 (user's profile) has reference to node 23 called 'Imperial' (content type 'su') which you can't edit and there is no connection found. Is that correct?
Can you check which field has the reference in your user's profile content type and by which module this field is provided? nodereference module or node nodereferrer?

jdln’s picture

Correct, user profile (node 72) references 'Imperial' which is node 23. I cant edit node 23 an no connection is found.

My Profile has a Node reference field called which_su_for_user.

kenorb’s picture

node 72 has nodereference to node 23. node 23 is not editable. It's reverse reference, because node 23 has no any references to other nodes. Have you checked that option as well in settings (reverse reference)?
And check then.
So user should be connection to node 23, because node 72 has reference to node 23 (reverse reference option) and he's direct owner of node 23 (via owner option).

jdln’s picture

Ah, so the module is working as it should i just need reverse references not references?

Where is the reverse reference setting?

Thanks

kenorb’s picture

If you don't have it, please upgrade to dev version and test it again.

kenorb’s picture

Title: Not Working » Can't edit node which is referenced from user's profile (content profile)
jdln’s picture

Ive installed the dev version and ticked the 'Enable reverse references checking' option.

Now on the user's page i get this;
Connected: YES; Path between user 10 and node 72 (profile): Array ( [0] => uid:10|via_owner|nid:72:profile )

But on the 'Imperial' referenced node im not getting any message.

If I go to the 'Imperial' page as the admin user I get this;
Connected: YES; Path between user 1 and node 23 (su): Array ( [0] => uid:1|via_owner|nid:21:region [1] => nid:23|su|field_whichregion|nid:21 )

jdln’s picture

Ive just turned on 'Show more connection messages.' For my non admin user on the profile page i get this;
Array ( [0] => nid:72|profile|field_which_su|nid:23 )
Array ( [0] => nid:72|profile|field_which_su|nid:23 [1] => nid:23|su|field_whichregion|nid:21 )
Array ( [0] => nid:72|profile|field_which_su|nid:23 [1] => nid:23|su|field_whichregion|nid:21 [2] => uid:1|via_owner|nid:21:region )
Connected: YES; Path between user 10 and node 72 (profile): Array ( [0] => nid:72|profile|field_which_su|nid:23 [1] => nid:23|su|field_whichregion|nid:21 [2] => uid:1|via_owner|nid:21:region [3] => uid:10|via_owner|nid:72:profile )

And on the imperial page I get this;
Array ( [0] => nid:23|su|field_whichregion|nid:21 )
Array ( [0] => nid:23|su|field_whichregion|nid:21 [1] => uid:1|via_owner|nid:21:region )
Array ( [0] => nid:23|su|field_whichregion|nid:21 )
Array ( [0] => nid:23|su|field_whichregion|nid:21 [1] => uid:1|via_owner|nid:21:region )

kenorb’s picture

Have you activated reverse reference in settings page in dev version? Probably it's not implemented in 1.0

jdln’s picture

Ive ticked 'Enable reverse references checking.'

jdln’s picture

The dev version didn't do anything differently at first but now its making node references disappear. Uninstalling the module makes them come back.

jdln’s picture

Is this a bug or am I using this module in a non standard way?

kenorb’s picture

What do you mean by references disappear? It not interfere with content. When you activated reverse references option, messages are the same?

jdln’s picture

It did interfere with the content. I haven't changed the layout of my nodes so by default the node reference was shown on the node page. After installing the dev version this reference disappeared, but it came back when I removed the module.

Ill install the module again and see what messages I get.
Thanks

kenorb’s picture

Can you provide some screenshot, how node reference disappeared?
It's possible that you can send me the environment (files and db) to test those node references why it doesn't work? It will be difficult to diagnose otherwise.

jdln’s picture

Thanks kenorb, thats a great offer.

Shall i email you the files or upload the site so you can do it 'live'? Whats easier for you?

kenorb’s picture

Yes, upload or send the site (link to download to priv), I'll configure it on my local environment and I'll test it.

jdln’s picture

Ill email you the details. Thanks again.

kenorb’s picture

Status: Active » Needs review
FileSize
644 bytes

Please test the latest dev.
http://drupal.org/cvs?commit=404912

kenorb’s picture

Status: Needs review » Fixed

No comments about last commit, supposing it works.

Status: Fixed » Closed (fixed)

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