We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23447
    • 7 Posts
    Greetings all,

    I’ve set up a site with protected main parent pages but with sub pages that users can edit. I have set Tools/Configuration/Interface&Features/ShowProtected to "Yes’. So the pages are visible in the menu tree and editable. However, users cannot add pages under the protected parent.

    Is there a simple way to allow users to add new pages below protected pages?

    All replies will be much appreciated.
      • 36416
      • 589 Posts
      Quote from: Piscator at Feb 09, 2009, 02:09 PM

      Is there a simple way to allow users to add new pages below protected pages?

      I think there is a bug with checking children inside "protected" parent:
      http://modxcms.com/forums/index.php/topic,32884.0.html
      but still investigating it at the moment...

      Do you get SQL error or just nothing happens when you try to add new document?
        • 23447
        • 7 Posts
        Many thanks for the reply. There is no error, but the user does not have permission to create the page below the protected parent. Full details below in case it helps.

        I assume the "Inherit Parent Template" is being used on my site as it seems to have been installed by default. My further details are:

        Modx: 0.9.6.3, Apache: 2.0.63, PHP: 5.2.8, MySQL: 5.0.67, Architeecture: i686, OS: Linux, accessed through Cpanel: 11.24.4

        Modx settings: Use access permissions: "YES", Show protected pages: "YES", Allow root: "NO", "Friendly URLs: "YES".

        I have a structure with a parent page that is protected (because it just hold a wayfinder menu of the sub pages that mustn’t be tampered with). Then there are several sub-pages for user content editor, all of which can be edited. The structure is like this:

        Parent(id 11) Protected in "Admin Only" group
        ...Child one (id 12) User editable in "User Edit" group
        ...Child two (id 13) User editable in "User Edit" group
        ...Child three (id 14) User editable in "User Edit" group

        So the user hovers the mouse over "Parent" and chooses "Create document here" to add "Child Four". The editor opens and Modx has already set the "Document parent" field under the "General" tab of the editor to "11". So at this stage Modx is assuming a page will be created below "Parent" and the user can edit the new page.

        However, when the user clicks "Save", this message comes up: "You do not have permission to create or move a document here! Please choose another location". I can’t find a system error in the events log.

        Changing the "Allow root" setting makes no difference. But the user can create the page under another parent page below root which the user has permission to access.
          • 36416
          • 589 Posts
          Quote from: Piscator at Feb 10, 2009, 06:07 PM

          I have a structure with a parent page that is protected (because it just hold a wayfinder menu of the sub pages that mustn’t be tampered with). Then there are several sub-pages for user content editor, all of which can be edited.

          I’m afraid this is how MODx hierarchical permisssions work.
          It can be worked around with ManagerManager widget AccesDenied by giving the parent full content editing permissions and hiding its editor form with mmwidget_AccessDenied.
            • 23447
            • 7 Posts
            Yes, the AccessDenied widget did the trick. In fact, as the site has a simple structure and only one responsible user, I’ve skipped permissions altogether and just flagged the menu pages to be protected with AccessDenied. An ideal solution for my needs and one that might suit some others.

            Many thanks for the great support, makes me glad I migrated to Modx! smiley