fabrikuser plugin bug

geros

New Member
Hi!

I have found a bug in the plugin file:

Code:
/com_fabrik/plugins/element/fabrikuser/fabrikuser.php

The problem is that when I use the user filter whith two tables with the same primary key attribute, the generated query is wrong.

That?s becouse in the fabrikuser.php file, when the query is created, it?s not expecified the table of the attribute.

For example, I have two tables (exampleA and jos_user) if the primary key is the attribute ID, the same as the jos_users one, it will fail and show the following error:

Code:
filter query error: Column 'id' in on clause is ambiguous

T he change that I've done is:

(Line 554)
PHP:
return 'INNER JOIN '.$joinTable.' AS '.$joinTableName.' ON '.$joinKey.' = '.$elName;
new:
return 'INNER JOIN '.$joinTable.' AS '.$joinTableName.' ON '.$joinTable.'.'.$joinKey.' = '.$elName;

I hope it to be helpfull!
 

Attachments

  • fabrikuser.zip
    7.1 KB · Views: 262
thanks, a similar fix (not quiet the same but which gives the same result) has been applied to the svn as of last night :)

Cheers
Rob
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top