I was trying to understand who was guilty in error trace. Then I have discovered that:
1) The applications are sorted to be installed.
2) The default order of installation is Tinebase, Admin and Addressbook.
3) The method _getSelect() of Tinebase_Group_Sql mounts a LEFT JOIN with table addressbook_lists if Addressbook application is installed. It is verified by attribute _addressBookInstalled.
The problem is how this attribute is configured.
The constructor method of Tinebase_Group_Sql uses method describeTable() of Zend_Db_Adapter for checking if Addressbook application is installed. If it doesn't happen an error that throws an exception, the attribute _addressBookInstalled is set to true.
It works for MySQL (and it should work for Oracle, I think), but the describeTable() doesn't throw exception for PostgreSQL when table addressbook doesn't exist.
So, Tine 2.0 try to execute and SELECT with a LEFT JOIN without the table to be joined.
I have solved this problem this way, I change the code of __construct() of Tinebase_Group_Sql:
- Code: Select all
try {
$this->_db->describeTable(SQL_TABLE_PREFIX . 'addressbook');
$this->_addressBookInstalled = true;
} catch (Zend_Db_Statement_Exception $zdse) {
// nothing to do
}
for that:
- Code: Select all
try {
$tableDescription = $this->_db->describeTable(SQL_TABLE_PREFIX . 'addressbook');
if (!empty($tableDescription))
{
$this->_addressBookInstalled = true;
}
} catch (Zend_Db_Statement_Exception $zdse) {
// nothing to do
}
After that change, the LEFT JOIN exception disappeared.
This is not a bug (now), but I open an issue as a improvement suggestion: http://forge.tine20.org/mantisbt/view.php?id=4626
Well, I am updating the file with changes now, but be aware that it is necessary to change the method __construct() of Tinebase_Group_Sql. I will include only if my issue is not accepted.
Now I try to discover why I now need to discover why my user is not authenticated.


