Results 1 to 8 of 8

Thread: Error when creating a page (chmod)

  1. #1
    New user
    Join Date
    08-10-10.
    Posts
    5

    Default Error when creating a page (chmod)

    Hi!

    When logged in a non-admin account, I get an error right after the creation of the page.
    After browsing the code for a while, I found that the error comes from the BackendUser::isAllowed function, called when checking the permissions of the new page when in edit mode: it seems the chmod use to check the permissions of the new page, as not overwritten, is the one of its parent page. The problem is that in my case the parent page does not allow editing.
    The TYPOlight versions prior 2.9 (2.7 and 2.6) do not have the same problem.

    So, to summarize: when creating a page as a child of a page that does not grant the edit permission, an error is displayed.

    Did anyone ever meet this same problem? How can I bypass or fix this? Is this a known bug or a feature?

    Enisseo.

  2. #2
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Error when creating a page (chmod)

    Is this a known bug or a feature?
    http://dev.contao.org
    It would hardly be a feature :D
    Can you duplicate the error on http://demo.contao.org?
    If so, and you feel this is not correct - you could report it as a bug.
    Unfortunately I can't say.

  3. #3
    New user
    Join Date
    08-10-10.
    Posts
    5

    Default Re: Error when creating a page (chmod)

    Hi,

    One year after, I come across the same problem: a page inherits the rights (chmod) of its parent, not the default rights.
    I can see this is the implemented behavior but I would like to know the reason. I can not understand why this is the behavior most people want. :?
    In my company, we use the chmod to remove some rights (no deletion, no edition...) over some specific pages. When a user creates a new page as a child of a restricted page, we want it to have the default chmod as the user has every rights over this page (s/he created it, after all...).

    Leo, maybe you can give me an explanation for this behavior?

    Enisseo.

  4. #4
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Error when creating a page (chmod)

    It is not the way nix systems inherit rights? I came accross this many times as well, at first giving it no thought. Same thing applies to layout setting.

    To circumvent this behavior you should try hooks to change the chmod of the new page provided you need to...

    In an extension I've made I have images inherited by subpages, but added a checkbox to cancel inheritance. Contao should have this as well?

  5. #5
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Error when creating a page (chmod)

    Hey Ruud... I agree... Or possibly have a layout assigned to a parent page that must apply to children but not to itself.

    Its just going to be difficult to visualise... because this principle could be applied to BE Permissions, Member Group Permissions, or other settings, so where do we add this?

  6. #6
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Error when creating a page (chmod)

    Well, I was thinking that adding this to the page properties might be confusing although it would be consistent with the way contao handles things (Contao usually offers extra buttons for data that comes from different tables, alike recepients for newsletters, or extra functionality alike sending a newsletter.

    The other option I can think of is adding a new button to the page that is called "inheritance settings". You could set the default layout and other inherited settings for children of this page.

    Such a feature, in whatever form it may be implemented would greatly add in the possibilities I get, and would have saved me hours of manually changing every child page when I had to change something but the inheritance gave me problems... (ok, Contao makes changing multiple pages easy, but still you need to select them, select what fields to edit, and then click and type a hundred times. Having a default inheritance setting would apply to all pages at once regardless of what I change to the parent itself)

    So, are we onto something here? See if this has been requested as a feature already?

  7. #7
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Error when creating a page (chmod)

    I just use the overrride method Of editing. Also it's easy to select all the children. Before entering edit mode, first click on the page and then it filters the tree view to only show the parent with children. Then mutiple edit, click select all pages, just unselect patent, then override, select fields and edit once and save.

    I like your inheritance settings idea a lot. This is useful for all pagetree tables...

  8. #8
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Error when creating a page (chmod)

    I've requested it as a feature, let's see what Leo thinks of it. http://dev.contao.org/issues/3647

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •