
[!ManagerCheck? &groups=`siteadminXYZ` &chunk=`send_newsletter` &debug=`true`!]
PHP error debug
Error: Invalid argument supplied for foreach()
Error type/ Nr.: Warning - 2
File: path_to_modx\manager\includes\document.parser.class.inc.php(769) : eval()’d code
Line: 131
function getInstance($debug) {
static $instance;
if (!isset ($instance)) {
$instance = new MemberCheck($debug);
}
else {
// THIS IS IMPORTANT !!!
/*
If you use this module twice on your page and at the first point you seht debug=TRUE - at the secound point debug is also TRUE
*/
$instance->MemberCheck($debug);
}
return $instance;
}
Hi everyone!
I just installed the ManagerCheck Extra by sottwell and I got a big problem
If the management group (e.g. siteadminXYZ) doesn’t exist I got the following error by using this snippet call:
[!ManagerCheck? &groups=`siteadminXYZ` &chunk=`send_newsletter` &debug=`true`!]
Error: The group siteadminXYZ could not be found.
Ok that’s what the debugging do. Everything is ok so far. But if the group exists I got a parse error.
PHP error debug
Error: Invalid argument supplied for foreach()
Error type/ Nr.: Warning - 2
File: path_to_modx\manager\includes\document.parser.class.inc.php(769) : eval()’d code
Line: 131
I just want to include a chunk/snippet on an front end webpage, if an management user is logged in...
EDIT:
I just tested to original MemberCheck Snippet by logging in as a webuser -> works fine. Only the ManagerCheck won’t work...
Hopefully someone has an idea to solve this problem.
Thanks in advance!
Chris


For some reason, the file repo-1787.txt was not found. The website administrators have been notified of this issue and will resolve it shortly.If a moderator can solve the problem... some will appreciate

[[!MemberCheck? &groups='Administrator,Oracle,Member' &chunk='privateSideMenu' &default='publicSideMenu' &debug='true']]
Fatal error: Using $this when not in object context in /home/hanneman/public_html/core/model/modx/modscript.class.php(96) : eval()'d code on line 59
Apache 2.0.63 (Unix), PHP-5.2.5, ModX Revolution 2.0.0-beta-1
All chunks exist and work fine by themselves, all the user group exist and turning off the [[!...]] no-cache option has no effect. Any ideas?

The group 'Member' could not be found...
[[!MemberCheck? &groups='Member' &chunk='privateSideMenu' &default='publicSideMenu' &debug='true']]