I recently started playing with Contexts in Revo. I created a new context called "secure" and tested dragging a resource into this new context within the tree, etc...all very basic, limited tests within the new GUI.
Today I updated the Context to add some Access Permissions. I clicked "Add Access Control", set the "User Group" to Administrator, the "Access Policy" to Resource and left "Authority" blank. Upon saving, the resulting Authority value showed up in the grid as "0", which I partially expected.
Shortly after I went to Security > Resource Groups to test the alternative way to adding Resources to a Resource Group (vs. Edit Resource > Access Permissions tab)...but I did not see my sample resource, let alone the entire "secure" context? I went back to Manager home and no longer saw "secure" context in the tree, and I went to System > Contexts and could only see "web" and "mgr" default contexts?
I am not sure how it "disappeared", but the "secure" context seemed to have been completely removed. I attempted to start over and simply re-create the context, however I was informed that "A Context with that name already exists." Clearly the context was still there, however was no longer showing up in the Manager?
I noticed the URL when editing "web" context, so I altered it by passing "secure" as the key just to see if I would be taken to the "Edit Context" page:
http://localhost/modx/revolution/manager/index.php?a=5&key=secure
...Unfortunately I was receiving "Permission Denied" error? Really not sure why I would receive that, as I was using the default Administrator account.
Long story short, I’m really not sure what could have happened that would cause the hidden context / permission errors I witnessed. I simply logged out, logged back in, and everything seemed to be back to normal.
For what it’s worth, here is a dump of my MODx error log, in case it may help to make sense of this:
Quote from: "MODx
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:45] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
[2010-08-02 20:30:52] (ERROR @ /modx/revolution/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected
INSERT INTO `modx_context` (`key`, `description`) VALUES (’secure’, ’where\’d it go?’)
Array
(
[0] => 23000
[1] => 1062
[2] => Duplicate entry ’secure’ for key ’PRIMARY’
)
[2010-08-02 22:43:45] (ERROR @ /modx/revolution/core/model/modx/error/moderror.class.php : 88) Recoverable error: Argument 1 passed to modError::checkValidation() must be an array, object given, called in /modx/revolution/core/model/modx/processors/context/create.php on line 26 and defined
NOTE: As an additional test, I attempted to remove the "secure" context and agreed to the prompt allowing this request to complete. Please be aware that all Resources within any deleted context will also be
permanently deleted.