When creating a dynamic get with a join on 'DB tables', the table prefix is hardcoded in the dropdown.
This results in the prefix being inserted into the 'getListQuery' function and crashing since the '#__' prefix is also applied.
Steps to reproduce the Bug
Create Dynamic get
Select join -> DB tables to any table
Compile and install
500 error 'Table {dbname}.{prefix}_{prefix}_users does not exist
Which Joomla version are you compiling in?
5.4.3
Which PHP version are you compiling in?
8.1
Which Joomla versions are you targeting?
5.4.3
Which PHP version are you targeting?
8.1
Which Web server is JCB running on?
Ubuntu
Which Relational Database is JCB running on?
MariaDB
Which OS is JCB running on?
Ubuntu
Which JCB version are you using?
5.1.6 stable
Where in JCB did this issue occur?
Compilation of a component
On which browsers did you encounter the issue?
Firefox
Additional Comments
No response
### What Happened?
When creating a dynamic get with a join on 'DB tables', the table prefix is hardcoded in the dropdown.

This results in the prefix being inserted into the 'getListQuery' function and crashing since the '#__' prefix is also applied.

### Steps to reproduce the Bug
1) Create Dynamic get
2) Select join -> DB tables to any table
3) Compile and install
4) 500 error 'Table {dbname}.{prefix}_{prefix}_users does not exist
### Which Joomla version are you compiling in?
5.4.3
### Which PHP version are you compiling in?
8.1
### Which Joomla versions are you targeting?
5.4.3
### Which PHP version are you targeting?
8.1
### Which Web server is JCB running on?
Ubuntu
### Which Relational Database is JCB running on?
MariaDB
### Which OS is JCB running on?
Ubuntu
### Which JCB version are you using?
5.1.6 stable
### Where in JCB did this issue occur?
Compilation of a component
### On which browsers did you encounter the issue?
Firefox
### Additional Comments
_No response_
@SimonvanDoorne I've reviewed this issue you've raised and here is my setup:
Join value in the Dynamic Get (getListQuery)
Generated code in the getListQuery
Seems to me there is a missing table in your setup because this setup I'm showing here is working perfectly and I'm getting no errors.
But when I change the #__demo_detail to some thing that does not exist eg. #__123demo_detail I get the error you're encountering.
@SimonvanDoorne I've reviewed this issue you've raised and here is my setup:
Join value in the Dynamic Get (getListQuery)

Generated code in the `getListQuery`

Seems to me there is a missing table in your setup because this setup I'm showing here is working perfectly and I'm getting no errors.
But when I change the `#__demo_detail` to some thing that does not exist eg. `#__123demo_detail` I get the error you're encountering.

Thanks to your testing i have now found my mistake. There are 2 Joomla instances installed on the same database. Site 1 runs JCB and site 2 is for some testing purposes. I realise now that i selected the join DB on site 2, so my original 'recipie' is wrong. It works correctly when selecting any table from site 1, but does not work with any selection of site 2. Closing the ticket since it seems like user error :).
Thanks to your testing i have now found my mistake. There are 2 Joomla instances installed on the same database. Site 1 runs JCB and site 2 is for some testing purposes. I realise now that i selected the join DB on site 2, so my original 'recipie' is wrong. It works correctly when selecting any table from site 1, but does not work with any selection of site 2. Closing the ticket since it seems like user error :).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What Happened?
When creating a dynamic get with a join on 'DB tables', the table prefix is hardcoded in the dropdown.


This results in the prefix being inserted into the 'getListQuery' function and crashing since the '#__' prefix is also applied.
Steps to reproduce the Bug
Which Joomla version are you compiling in?
5.4.3
Which PHP version are you compiling in?
8.1
Which Joomla versions are you targeting?
5.4.3
Which PHP version are you targeting?
8.1
Which Web server is JCB running on?
Ubuntu
Which Relational Database is JCB running on?
MariaDB
Which OS is JCB running on?
Ubuntu
Which JCB version are you using?
5.1.6 stable
Where in JCB did this issue occur?
Compilation of a component
On which browsers did you encounter the issue?
Firefox
Additional Comments
No response
@SimonvanDoorne I've reviewed this issue you've raised and here is my setup:
Join value in the Dynamic Get (getListQuery)


Generated code in the
getListQuerySeems to me there is a missing table in your setup because this setup I'm showing here is working perfectly and I'm getting no errors.
But when I change the

#__demo_detailto some thing that does not exist eg.#__123demo_detailI get the error you're encountering.Thanks to your testing i have now found my mistake. There are 2 Joomla instances installed on the same database. Site 1 runs JCB and site 2 is for some testing purposes. I realise now that i selected the join DB on site 2, so my original 'recipie' is wrong. It works correctly when selecting any table from site 1, but does not work with any selection of site 2. Closing the ticket since it seems like user error :).