Page 1 of 1

[solved]CGUserDirectory sortby="f:prop" error

Posted: Tue Sep 23, 2014 3:52 pm
by jpcarvalhinho1
Hello...

I have a lot of users (above 800).... and when I use the "f:prop" like this:

Code: Select all

{CGUserDirectory action="default" group="Parceiros" summarytemplate="v2_listaparceiros" sortby="f:nome"}
I get a MYSQL error stating that it will be too much information:
"The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay"

I cannot (my provider doesn't allow) activate this configurations on the MYSQL side. So I got to look for alternatives and found the http://forum.cmsmadesimple.org/viewtopi ... rt#p176047

UDT for multisort and array_flatten...

But this ones give another error:
On the Flatten Array:
"Warning: Invalid argument supplied for foreach() in /htdocs/public/www/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 17"

On the multisort:
Warning: Invalid argument supplied for foreach() in /htdocs/public/www/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 28 Warning: Parameter 1 to array_multisort() expected to be a reference, value given in /htdocs/public/www/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 46

And show no results.

How can I solve either one of these problems?

1.11.10 "Pinzon"
PHP: 5.3.3-7+squeeze3
API Php MYSQL: 5.1.49

I just want to sort my users by a property called "Nome".

Re: CGUserDirectory sortby="f:prop" error

Posted: Tue Sep 23, 2014 6:37 pm
by Jo Morg
Try removing the following from the UDT's:

Code: Select all

global $gCms;
$smarty= &$gCms->GetSmarty();
Those lines no longer work nor should be needed anymore.
HTH

Re: CGUserDirectory sortby="f:prop" error

Posted: Wed Sep 24, 2014 7:19 am
by cb2004
I seem to remember having this problem a couple of years back. If you clear your logs for FrontEndUsers, does that work?

Re: CGUserDirectory sortby="f:prop" error

Posted: Wed Sep 24, 2014 9:17 am
by jpcarvalhinho1
GOD... Should have come here directly. :)

Thxs CB2004, worked like a charm.

Re: [solved]CGUserDirectory sortby="f:prop" error

Posted: Wed Sep 24, 2014 9:46 am
by cb2004
Remember if the log gets too big this will stop working again. Maybe post it as a bug as I could never understand why CGUserDirectory would need to query the log database to work.