Jump to content

InputfieldPage: Non-super-user cannot add page from within field


Recommended Posts

Hello community,

on a site with a simple blog, I am using Pages for blog categories. Therefore I created a template blog_categories as the categories PARENT page and another template blog_category for the CHILD pages. I configured blog_categories to only allow blog_category as children – and vice versa – blog_category to only allow blog_categories as parent. Having that set up, i created a field of InputfieldPage and configured it to have my (already added) blog_categories parent page as allowed parent and set template blog_category for selectable pages. I also checked "Allow new pages to be created from field".

For the super-user this works as expected: Categories (pages using blog_category) can be created within the InputfieldPage field while editing a blog post.

For my editor roll, i set up the following template permissions (beside the default view-permission):

  • blog_categories
    – add children
  • blog_category
    – create pages
    – edit pages

Logged in as  an user in editor role, I am able to create new categories in the page tree (as child pages to the categories parent). But when the the same user tries to create a new page from within the InputfieldPage, I get the "No access to add [template-name] pages to [path-of-parent]" error on no page is created.

After digging a little in wire/modules/Inputfield/InputfieldPage/InputfieldPage.module, I found that $page->publishable() returns false in the corresponding check.
But I don't understand why this returns false. In the page tree, the user in editor roll is able to publish/unpublish pages – also also to edit pages so it SEEMS there is a glitch in the permission check.

Note: I didn't install the predefined sytem permission "page-publish" because – as far as I understood – if not installed the page-edit permission should also indicate the permission for publishing a page.

On another site, using an slightly older version of ProcessWire, the same setup works fine. On the site in question, i am using 3.0.193 dev  (DEV branch) – maybe that's the problem? Or I'am doing something wrong?

I am glad for any hint in the right direction!

  • Like 1
Link to comment
Share on other sites

A tiny update: I replaced the wire directory with the one from the current MASTER branch (v 3.0.184) an now it works as expected.
So maybe there is an issue in the DEV branch only (wich may or may not make the way in an upcoming release).

@ryan FYI
(Let me know if you need any more information about this)

  • Like 2
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...