1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

A bug when Default Connection is not "site database"

Discussion in 'Community' started by tali, Apr 21, 2021.

  1. tali

    tali Member

    Level: Community
    Step to reproduce :
    1. Set another connection a part "site database" ; let's call it "database2"
    2. Set database2 as favorite and test your two connections.
    3. Create a list with a databasejoin element which you want for a table on the "site database"
    4. In the Data tab, choose "site database" -> You'll get the list of "database2" tables.
    It may have to do with the following statements
    • In components/com_fabrik/models/list.php you have a call to
      Code (Text):
      public function &getDb();
      strangely, despite
      Code (Text):
      FabrikWorker::getConnection($this->getTable())
      returns the correct connection you asked for (Nb : 1 ), the following code
      Code (Text):
      FabrikWorker::getConnection($this->getTable())->getDb()
      gives the DB of the Default connection (Nb : 2 ) you did not asked for.
    So, if this is indeed a bug, meanwhile it is corrected, the solution is, when you want to create or connect to a table of the "site database", to be sure to have it as the default connection.
     
    Last edited: Apr 21, 2021
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Fabrik doesn't support "cross-joining", i.e. using a dbjoin to the other connection (although it's possible to select this)
     
  3. tali

    tali Member

    Level: Community
    That's good to know. Thanks troester.
     

Share This Page