creating users / protected content

  • Hi,

    First, to say that I am *not* a developer. I have extremely limited skills in web development. I chose Pagekit for a services feature on my website because it looks easy to use.

    I want to protect some of the site content so that only registered users can access it.

    I have studied the Pagekit documentation and followed the instructions. In Pagekit, I set up a page and checked the 'authenticated' box. I also set up a test user profile.

    When I try to test the login / access the protected page, I get an error message:

    "Whoops, looks like something went wrong."

    I do not know how to fix this. Any advice appreciated.



  • Thanks. For 'Permissions' I see a choice of anonymous, authenticated and administrator. Admin can do everything. Authenticated can only post comments and skip comment approval. Anonymous can't do anything.

    'Roles' just looks like a summary aggregated of the 'Permissions' screen.

  • Let's simplify things:

    Add a new page with the settings I've shown. Add a user with the settings I've shown. Check, if it's working or not ;)

    If it's working, we need to check other things according to your issue.

    You could also add a screenshot of the page (it does not have to show the full site - only the part with the permissions) and a screenshot of the user-details.

  • Thanks. I copied all of that. But I stil get the error message screen when the user is not signed in. I want to show instead a sign-in screen.

  • Aaaah, okay. Now I got your point ;)

    Well - if the user has no access to the page he wants to access, the error message will always be shown.

    But you can do the following: Add a menu entry for the protected content with all the content you would like to show for your users. Create another one (with the same title) only for Guests. The page for Guests can be styled as you want to (login-box, redirect to a login-site, ...).

    Now the Guest can click on the page and see the login-box - and the registered user will see the content.

    But: The slug/url will be different.

    I could also write an extension that redirects to a specific site, if an protected content is accessed. Would that be helpful?

  • Well - I will try to make it more simple.

    You would like to create some content that is accessible for registered users. Let's call it "Test-Item".

    Now you create two pages:

    1. Page with the following attributes:
      1. Title: Test-Item
      2. Slug: test-item
      3. Permissions: Authenticated
      4. Content: Your protected content
    2. Page with the following attributes:
      1. Title: Test-Item
      2. Slug: test-item-guests
      3. Permissions: Anonymous
      4. Content: Information for the user that he is not allowed to see the content and must be logged in. On this page you can also add a login-box etc.

    Doing this your users would always see a menu item called "Test-Item", but if the user is not logged in, he gets nothing but the message that he should log in.

    I could also write a small extension that redirects to a specific URL, if it comes to 401 or 403-errors.