Jump to content

[SOLVED] Repeater field images not accessible on page that requires log in


Recommended Posts

Posted

I have an area in the front end of a site that can be accessed only by logged-in users with a particular role.

The page works fine for such users, except that images in a repeater field don't appear.

Each image field within the repeater displays either the alt text or a placeholder (depending on which browser), but the image does not load.

Attempting to load one of the images on its own in a window using its URL also fails.

However, the images load correctly when the page is accessed by a superuser.

It thus seems as if users with the role don't have permission to access the images. I've tried specifically giving view access on the field settings, but it doesn't help. I can't think what other settings might work.

Does anyone know what I should be doing?

 

Posted

Okay, please check the setting of the page's template you can find under "Access", then "Prevent direct access to file assets owned by pages using this template?". Did you configure something there?

  • Like 1
Posted

"Prevent direct access to file assets owned by pages using this template?" is set to "No".

I tested the other two settings, and they didn't change anything.

Also, following on from your suggestion, I checked $config->pagefileSecure in wire/config.php, and it's set to "false".

Posted

However, I've just found that $page->secureFiles() returns "true".

[EDIT] I don't understand this, but I'm not sure how relevant it is, as I think I may have found the solution - see next post.

Posted

I think the solution may be here (applied to a repeater rather than a repeater matrix), though I'm still conducting tests:

Posted

Well.. that might be something, yes!

In the end, Repeater Matrix is just an extended form of a Repeater (RepeaterMatrix literally extends Repeater in PHP) and thus might inherit such behaviours too.

  • Like 1
  • 3 weeks later...
  • BillH changed the title to [SOLVED] Repeater field images not accessible on page that requires log in

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...