$modx->getContext Returns NULL for web and mgr - is this expected behavior?
When I call another context (besides ’web’ and ’mgr’), I get an object but for web and mgr gettype returns NULL.
God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
-
MODX Staff
- 10,725 Posts
Sounds like the user does not have permission to load those contexts. Check your ACLs.
I think this is what’s causing problems in the other thread where I’m not able to generate url’s from other contexts. Can you give me some guidance on what settings to adjust? I don’t want to create users - both contexts are meant to be open to the general public. I just want to be able to freely get objects from one context to the other (which I currently am able to do from web to non-web contexts, just not the other way around). Also, I’m currently able to get resource objects from either context to the other without any problem - just not context objects.
I’ve been trying everything I can think of, but nothing’s working. It seems that what I’m trying to do is very simple (get a resource object from one context while in another context), and I just don’t get what I’m missing.
UPDATE: Ok, I finally got it working although I still don’t understand entirely why. It was an ACL issue - I made the access control settings in my non-web context the exact same as the web context and now it works fine.
God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.