I am setting up users to be able to create/edit specific content types. So I have setup a user in a role with all the permissions checked for Node Hierarchy and they are able to create/edit/delete the content type "Story".

When the user goes to create the story the Node Hierarchy dropdown list appears but is empty.

Comments

irritableshade’s picture

I'm having this issue, too. To let the user select anything from that dropdown, it appears the user needs the 'edit' priv. on anything that will act as a parent. The check is somewhere in the module code that builds the node create/edit form--look for a user_access line, I believe.

I'm not sure what should be done about this. I'd like to be able to allow users who have the right node hierarchy permissions to select any parent-able node when they create/edit a node. The module doesn't allow this at the moment--any thoughts on the best way to handle situations like these would be fantastic.

irritableshade’s picture

I should note that I'm using 1.1 stable, and haven't checked if things have changed in the repo.

ronan’s picture

Category: bug » task

Unfortunately this is by design. I'm not in love with the solution of requiring a node to be editiable to chose it as a parent, but drupal does not give a lot of access options to check against.

I have yet to come up with a good solution to this or for that matter a good workaround. Perhaps an additional permission would cover it. 'add child to any parent' or something similar (and hopefully more succinct).

planctus’s picture

Hi ronan...
this is what i could call a feature and not a bug :-)
I was really scared about the size of the select list after a while...
But i have roles able to create and edit only a few content types so it is really perfect the way it should normally work.
I asked for a feature, make the relationship exclusive for certain cotnent type but i don't need anymore, this should work out of the box for me.

Unfortunately it isn't.
I tell you what happens:
If i go to the node/add/content-typeA page as a user with a role able to create and edit content-typeB,
the node-hierarchy won't show me all the nodes of the content typeB but just one.
Actually i need to do more tests because i've only two nodes for the content-typeB.

What is really weird is that if i click to the "Children" tab in a "content-typeB" and then choose to add a node of the "content-typeA" type the select works fine.
Any idea?
I'm going further because this is very crucial to me.
Thanks,
Da.

planctus’s picture

This is drivng me crazy....
i've made intensive tests and it seems a non sense to me...
the select filter made by drupal and node hierarchy together sometimes gives me the right nodes to choose from and sometimes not in the node-hierachy select list .

I mean that it doesn't let me choose any content, even though i've the permissions to create, edit, edit own nodes of that content type.

I've 4 different combinations of roles and content type.
two of them are working , two not.
I don't know exactly what to say but this seems really a bug.
Hope someone can confirm this, i'm using drupal 5.15 and the latest "stable" release of node hierarchy on two development environments.
thanks,
Da.

planctus’s picture

I figured it out...at last.
It was really easy...so i'm stupid.
I had set default parents for some of the content types involved to make the selection easier.
Every node to be created had an ancestor to make the parents flow after it.
This was when i used to give the "administer nodes" permission to some roles and it was already stupid.
That ancestor wasn't editable by the roles i have, so the entire tree was cancelled by drupal and node hierarchy and then i had the select almost empty....it was almost empty just because sometimes i' ve changed settings, created new content types and not set the default parent.
I spent time to debug something that was normally working,
doesn't matter.
Thanks,
Da.

markhalliwell’s picture

Component: Code » Drupal/PHP Code

Copy & Pasted: This issue pertains to the 6.x-1.x branch which is now legacy and is over two years old. If this issue is not applicable anymore, please consider closing it. Otherwise, please update this issue appropriately. Will be closed in two weeks if no response.