Hi,

This is a great module and it works really well with the relation module.

I've got an interesting issue that I hope someone can help me with. I've created a tree of "Parts" (mechanical parts) all the same content type. They are related to each other in a part - sub part relationship (using the relation module) and then I use views tree to build a tree of all the sub parts leading up to the one main part. (like a car being made up of an engine etc and an engine being made up of other parts) and it all works great BUT;

The top level of the tree (the car) is only visible to User 1. For all other users they see everything else in the right structure but the top level is missing.

This would indicate a permissions issue but as the entire tree is made up of only 1 content type (all parts) I can't see how the top level would have any different permissions to any other nodes of the part content type.

Any ideas?

Thanks very much for this excellent module and have a great day.

Comments

geerlingguy’s picture

Category: bug » support

Sounds like there could be a configuration problem on your site; is it able to be viewed online? I imagine there may be some permission issue, or something else like that. Views Tree should only affect the way view items are rendered, but not whether items are displayed or not.

kingswoodute’s picture

Hi geerlingguy,

Thanks for responding so quickly.

The top level part is visible to all users. That was the first thing I checked. And all the other items in the tree are the exact same content type with the exact same permissions.

It's quite unusual. I'll keep looking into it and if I find the answer I will post.

kingswoodute’s picture

If I enable the "Bypass Content Access Control" the top level part is visible. However if I then disable that permission and simply add another part one level above the top level part, it becomes visible and the "new" top level part remains hidden.

I'm using the Relation Module and will keep hunting until I find a solution and then I'll post. If anyone has any ideas please let me know.

Thanks and have a good one!

geerlingguy’s picture

Sure thing! I'll keep thinking if there's something I'm missing. But let us know if you figure it out!

T1ckL35’s picture

Might be related (but may not be as I'm using Entity Reference, not Relations) but in my View I have a Relationships: Entity Reference which references the parent to the current node. If the 'Require this relationship' was ticked then it would NOT render the root node. But if it wasn't ticked then it would render the root node in the views_tree fine.
Currently I am hooked down to a single tree with a single content type so this isn't a problem having it unticked but if that changed then I would have to dig deeper.

Again it may not help but just thought a mention may help you or point someone else in a useful direction :)

JThan’s picture

I have the exact same problem:
- User 1 sees complete tree
- Other users do not see the first level of items
- If I give "bypass access control" rights, the users can see first level items

This is weird and broken :(. Will investigate further as this is a major problem on my site.

JThan’s picture

If you deactivate SQL Rewriting in Views, then it works as it should. Maybe that is hint in the direction of a general solution?

JThan’s picture

Issue summary: View changes
JThan’s picture

Sorry for double posting.

indigoxela’s picture

Hi JThan,
your suspicion seems right, content access modules make the first (top level) item only visible for user#1.

It happend here with entityreference + nodeaccess_userreference, even though not using the same entityreference field and nodeaccess_userreference permissions are not applied to the content type we would like to show as a views tree.
Disabling nodeaccess_userreference module makes the top level item publicly visible in the tree view.

This seems to be a bug in core node module.