I'm having trouble getting the
depth
param to get my global type to return anything for a
relationship
type inside of a
group
type. No matter what I pass for depth (2, 3, 4), it only returns the document ID's.
Both the Home global and Projects collection have
read: () => true
for their access levels
This tells me that you are making a request and access control is returning false for that collection on those docs
@jarrod_not_jared both my Home global and Projects collection have
access: { read: () => true }
. Would there be another config / another area I need to explicitly allow access?
@jm.sv I just tried to recreate your issue as you described, and was unable to. If you can recreate it inside the
test/_community
folder and open an issue on github that would be great!
I wonder if this is due to the kind of relationship set?
Whaddya mean? I set up a relationship just like @jm.sv had and then used a global, with a group, with a relationship field inside of it (with the same field config settings)
Yeah good point @jarrod_not_jared - maybe an older payload vers on their end?
I cant replicate either
yeah possibly old payload, would like to know what version they are on
Probably a coincidence, but someone just made a support post with a similar issue on payload latest, not exact but similar-ish
@jarrod_not_jared @notchr this was a silly mistake, I must have had an old legacy field called
projects
on
Home
that was populated so it was still returning from the API even though it's no longer part of the schema. I was confusing that for my
projectsSection.projects
that I just confirmed is working correctly. Will do some digging to see best practice for handling stale data / fields stuck inside the database. Thank you both for your help!
Nice! No problem 🙂
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.