Issue with group id's in list pre filter

mir.pub

New Member
Hi

A list pre filter I used in Fabrik v3.3.3 seems to have stopped working in The GitHub version pulled on 2015/10/27.

The list prefilter:
WHERE User id GREATER THAN OR EQUALS 0 Text Superuser
OR Sharing IN {$my->groups} Text Registered no
OR User id EQUALS {$my->id} Text Registered no

The middle line in the list pre filter, would basically select records where the field 'Sharing' (which contains group id's) is IN {$my->groups}..

see also screendump.

Testing the new Github version, the prefilter now only displays the current users records. Before it would display the users records AND records with a group id in the Shared field, matching the current users group id.

Hardcoding the group id's in the value field (like 2,10,11) works fine.

Also tried, without success :
$myUser = JFactory::getUser();
$myGroups = $myUser->getAuthorisedGroups();
return implode(",",$myGroups);

(win7, Joomla 3.4.5 and firefox 41.0.2)

Any ideas?

Regards

Mir

upload_2015-10-28_1-38-2.png
 
Can you enable Fabrik debug (in the global options), and append &fabrikdebug=1 to your list's URL.

Then expand the debug output for the getData() query, and paste the WHERE clause it is generating here.

I'm surprised that ever filtered anything, to be honest, as the first filter is always going to be true if userid >= 0, so if userid is not negative ... it doesn't matter what the next two filters are, as they are OR'ed.

-- hugh
 
Hi Thanks for your reply

I did a new update of my site with a new set of update files, pulled from Github today, and so far it works.
So, maybe a corrupt download or bad update created the problem yesterday.

As for the functionality.. Like you said it will show all records for the Super user, but the following two filters are only for registered users. So for a registered user, I would expect it to show the shared records from all users.. as it also does.. But, please let me know, if this is not how its supposed to work.

Regards

Mikkel
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top