Hi again,

I thought I would post a new issue, as opposed to following on.

I can't seem to get anon users to view the gallery. Is this a Drupal permissions thing becuase I can't see what would be causing it. And all my folders have 755 for the sub images?

What I am missing :) Please and thank you!

http://atlanticprorealty.com/drupal/listings/40672073

Comments

rjacobs’s picture

Hi,

You mentioned earlier that you were using the "Drealty" module and that it was providing a custom entity onto which you were adding Juicebox galleries. Is this still the case? If so, it's likely directly related to the points here: https://drupal.org/node/2058941

The specifics get a bit technical, but the general idea is that any time a module loads data that it does not directly manage, and then displays it to users, it needs to make special effort to ensure that appropriate access checks are enforced. Without such checks we would have what's called an "access bypass" issue. Anyway, when Juicebox builds the XML for a field-based gallery (which happens as an independent request) it tries to guarantee that the user is allowed to view both the field and the entity that the gallery is related to. If it can't make that guarantee for any reason, it returns an "Access Denied" response instead of the XML. This is possibly what's happening here.

There are some semi-unified ways to do these access checks in Drupal but ultimately it's up to the modules that manage the data to ensure that they expose themselves properly to other modules that may needs to run access checks against their data. This is where concepts like an Entity API "access callback" come in, etc. It's possible that Drealty just isn't implementing access checks in a way other modules expect.

A quick search of the Drealty issue queue, with a couple strategic keywords, reveals that there is a known issue that might be related to all this: #2120455: drealty_drealty_listing_access() never returns true for "create" and "view". That looks promising. Also, that issue has a pending solution/patch documented, so the first thing you might want to try is applying the patch listed there to see if it makes any difference. If not, it may also require a bit of additional interaction with the people that maintain Drealty.

Hopefully those thoughts are in-line with the actual problem, just let me know.

droddis’s picture

Well rjacobs, I'm not sure who you are but I could hug you at the moment. This absolutely solved the issue as you predicted. I am not as technical as I wold like. and this kind of support is so welcome.

thanks again and I know I won't be able to repay the favour but I owe you one!

Regards

Dave

rjacobs’s picture

Title: Issues with Anonymous users » Issues with Anonymous users and custom entity type (drealty)
Status: Active » Closed (duplicate)
Related issues: +#2120455: drealty_drealty_listing_access() never returns true for "create" and "view"

Glad it worked! I've been hands on with this module for a while now so sometimes I get a quick sense about these things :) Anyway, the person you should really thank is the one who reported that issue, and submitted the patch, in the Drealty queue. The fact that that issue showed up in a quick search for "entity_access" made quick work of things. The Drealty people may also be interested to know about this, so feel free to make a note to them as well if you have not already.

For now I'll make a formal link between that issue and this one, and mark this as a dup of that topic.