Hi!
I have found a bug in the plugin file:
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:
T he change that I've done is:
(Line 554)
I hope it to be helpfull!
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!