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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
jpcarvalhinho1
Forum Members
Forum Members
Posts: 13
Joined: Tue Sep 23, 2014 3:28 pm

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

Post 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".
Last edited by jpcarvalhinho1 on Wed Sep 24, 2014 9:17 am, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: CGUserDirectory sortby="f:prop" error

Post 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
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
cb2004
Power Poster
Power Poster
Posts: 317
Joined: Wed Jul 04, 2007 3:39 pm

Re: CGUserDirectory sortby="f:prop" error

Post by cb2004 »

I seem to remember having this problem a couple of years back. If you clear your logs for FrontEndUsers, does that work?
jpcarvalhinho1
Forum Members
Forum Members
Posts: 13
Joined: Tue Sep 23, 2014 3:28 pm

Re: CGUserDirectory sortby="f:prop" error

Post by jpcarvalhinho1 »

GOD... Should have come here directly. :)

Thxs CB2004, worked like a charm.
cb2004
Power Poster
Power Poster
Posts: 317
Joined: Wed Jul 04, 2007 3:39 pm

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

Post 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.
Post Reply

Return to “Modules/Add-Ons”