zynth Posted October 9, 2021 Share Posted October 9, 2021 Hi, I have this weird problem where my page content is only shown, when I'm logged in as an admin. A thing worth mentioning is, that I've imported data from a site that's already online via the built-in import/export functionality. Maybe someone here had a similar experience? I don't know how to debug this as well, since there's no errors thrown when accessing the data in the templates. It's just blank when not logged in. When logged in: When logged out: Cheers Dennis Link to comment Share on other sites More sharing options...
kongondo Posted October 9, 2021 Share Posted October 9, 2021 Where is Schule and Meht Erfahren coming from? Is Schule coming from $page->title? Where is the content Musik erlerenen coming from? From $page->body? Or some other field? I am asking since there could be one or more permission restrictions in place. Possible issues: You have in condition in your template file that is restricting the output of the content. It could even be a hardcoded value of a page ID that doesn't existing in your import site. I.e., in the export site, SOME_PAGE might have the ID 1234 which when you import in your local/other site is saved as SOME_PAGE with ID 1255. You have a field-level view restriction. Especially if only the content of one field is not showing, I would focus on this. You have template-level view restriction. This means that SOME_PAGE utilises 'some-template' which has view restrictions. Is this happening on all the pages? Is it happening on pages that use different templates? Link to comment Share on other sites More sharing options...
zynth Posted October 9, 2021 Author Share Posted October 9, 2021 Hi @kongondo, "Schule" and "Mehr erfahren" are just hard coded values in my template. The template here is called home and the field we're looking at is a repeater field (back then I didn't know that Fieldset elements existed.) The repeater field has two fields - ttile and paragraph. Those are the fields that come from the database. In my template, I access the repeater field via: $page->schule_home[0] Also there's no restrictions set on the template or the repeater field. The problem also occurs on other page templates... Link to comment Share on other sites More sharing options...
zynth Posted October 9, 2021 Author Share Posted October 9, 2021 I've found the issue.. The field that was being used in the repeater had access control enabled, but guest had view permissions. I turned it off, and now it works again. Can you explain why it didn't work, even though guest had view access? Cheers, Dennis Link to comment Share on other sites More sharing options...
kongondo Posted October 9, 2021 Share Posted October 9, 2021 (edited) Maybe because of this? Repeaters are admin pages. Guests do not have view access to repeater pages (page where the field exists), hence, even though guest had view permission, they still couldn't view the field since it lives in a restricted area (repeater). In other words, their view permission was not 'applicable'. Edited October 9, 2021 by kongondo Link to comment Share on other sites More sharing options...
zynth Posted October 9, 2021 Author Share Posted October 9, 2021 That sounds like that's what happened here. Although that makes me wonder, how you're supposed to use both these features together? What if i want to use access control? Link to comment Share on other sites More sharing options...
kongondo Posted October 9, 2021 Share Posted October 9, 2021 (edited) 54 minutes ago, zynth said: Although that makes me wonder, how you're supposed to use both these features together? EDITED It should work for 'usual frontend' pages. Since non-super users will have view permission for such pages. The added layer of restriction with respect to repeaters wouldn't apply. Hope this makes sense. For instance, if you had a 'members' field that is only viewable to 'members', logged in members (non-superusers) will be able to see the field as long as that field was on a page that members have page view or edit access to. Meaning, if that page is not a child of an admin page (e.g. repeaters, etc), the permission set will kick in. Edited October 9, 2021 by kongondo clarification 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now