Jump to content

Custom user role can't add pages to pageTable field


Marc
 Share

Recommended Posts

I am trying to add information about users of my website to a pageTable field called 'user_notes', which I added to the 'user' template. The parent of the pageField pages is a user, so every user can have child pages with a 'note' template. Adding new notes to this pageTable works great when I'm logged in as the superuser, but when I try to do this logged in as a 'planner' user, the child pages are created but they are not added to the pageTable array. I'm not sure why, as I've been looking at every involved permission setting and I just can't seem to find out what might be going wrong. Here are some details:

  • I have created a user role called 'planner'. It has all the 'page-edit' (sub)permissions.
  • I have a pageTable field called 'user_notes'.
  • The pageTable 'user_notes' creates pages under a 'user' with a 'note' template. The 'planner' role has all permissions to edit/create pages using this 'note' template.
Link to comment
Share on other sites

Don't forget about the "Add Children" permission on the parent template.

That would be the user template in this case, which already has all permissions checked. The pages are actually created in the correct location, but they are not added to the pageTable array so I have to add them manually after the page is saved. (I get the "Children were found that may be added to this table" message in that case.)

Link to comment
Share on other sites

So I did a new install of Processwire just for testing this issue, and no matter what I do, I can not get anybody but the superuser to add pages to a pageTable field when the parent of those pages is a user page. I guess I will have to come up with another place to store those pageTable pages then.

Link to comment
Share on other sites

Hi Marc, if it isn't reproducible it can be hard to track down. I haven't tried it with the latest 2.7.2 master version. What version of PW do you use?

I'm using the latest master version, so version 2.7.2. I don't understand why the PW developers would not be able to reproduce it though, as I first encountered it with my current project and still encounter it doing a brand new, unmodified install just for testing this bug.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...