Add PHP in getListQuery is very limiting and should be moved after all the tables join #547
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#547
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
In admin side, I need to join a table with a key field not present in the main table (which is always aliased as 'a'), but with a key field in a table joined by the model query anyway.
With the PHP custom block inserted just after the from table, and before all the join(s), we are not able to use any fields of tables that will be joined below because they are not known yet at this stage and we get a mySql error "unknown colum XYZ in ON clause..."
The custom PHP block should be moved after all the model select(s) and join(s) at least.
In this case we can use all the joined tables (and their fields) and even the clear method to refine the query if needed.
Inserted in the current position we can only interact with the main table with a custom PHP.
Expected result
Actual result
System information (as much as possible)
Additional comments
There are different use cases here, and moving the field will break the implementation of other. I will take a look and see if we can add another field instead.
Great!
Thank you!