Sophist
Guest
Seems to work in a list but not in a form.
The issue is that it should create an SQL column definition like:
where `Name` is a field in the joomla users table, but instead it uses the base table field name:
I have traced this back to line 572 of user.php which sets variable $k2, but I have no idea how to fix it without potentially screwing something else up.
The User element extends the DatabaseJoin element, but instead of using the 'join_val_column' fieldname to store the column to display it uses 'my_table_data'. I haven't traced this back to why it causes a problem. But we cannot change the field name because of backward compatibility. I have tried overriding 'protected $labelParam = 'join_val_column'; at line 83 of databasejoin.php with protected $labelParam = 'my_table_data'; but this doesn't make any difference.
So I guess that we probably need to override databasejoin's getJoinLabelColumn() method, but I am not sure how to do this in a way which won't screw something else up.
If anyone can please help with a fix I would be most grateful.
P.S. The SQL for other elements puts the _raw column after the non-raw one, so if we can move lines 580-581 to before 574 when we fix this, that would bring User inline with other elements.
The issue is that it should create an SQL column definition like:
Code:
`j3_users_0`.`Name` AS `me_stats___createdBy`, `me_stats`.`createdBy` AS `me_stats___createdBy_raw`,
where `Name` is a field in the joomla users table, but instead it uses the base table field name:
Code:
`j3_users_0`.`createdBy` AS `me_stats___createdBy`, `me_stats`.`createdBy` AS `me_stats___createdBy_raw`,
I have traced this back to line 572 of user.php which sets variable $k2, but I have no idea how to fix it without potentially screwing something else up.
The User element extends the DatabaseJoin element, but instead of using the 'join_val_column' fieldname to store the column to display it uses 'my_table_data'. I haven't traced this back to why it causes a problem. But we cannot change the field name because of backward compatibility. I have tried overriding 'protected $labelParam = 'join_val_column'; at line 83 of databasejoin.php with protected $labelParam = 'my_table_data'; but this doesn't make any difference.
So I guess that we probably need to override databasejoin's getJoinLabelColumn() method, but I am not sure how to do this in a way which won't screw something else up.
If anyone can please help with a fix I would be most grateful.
P.S. The SQL for other elements puts the _raw column after the non-raw one, so if we can move lines 580-581 to before 574 when we fix this, that would bring User inline with other elements.