Hi, I have configured suitecrm for my business application and i was able to access all my records until yesterday. When i try to access my data which is present in the modules i am getting an error “Database failure. Please refer to suitecrm.log for details.” The records are present in my phpmyadmin DB but i am unable to retreive and view them on the suitecrm application. Is there a fix avaiable for the Database failure issue ? I am using Suite CRM Version 7.10.20 which i installed recently. Can any one provide a solution/fix for this issue ?
@pgr - I am unable to login nor able to see any screens during this issue. During this DB Failure instance when i check my database one of my table is getting automatically deleted ( database_name.table_name.cstm ). This table was part of my custom module that i created from scratch. I am not sure what is the cause that is leading to DB failure issue and loss of my table that gets automatically deleted. This is the third time i am getting this similar issue and this is causing me a huge obstacle in creating my application. During these failures i would need to install SuiteCRM from scratch which is a huge blocker for me.
I came across a fix that was recommended by you and when double checked for the code in data/Link2.php the braces is already present in the code. Attaching the copy of code that i fetched from my SuiteCRM App
public function getSide()
{
//First try the relationship
$focusModuleName = null;
if (isset($this->focus->module_name)) {
$focusModuleName = $this->focus->module_name;
} else {
LoggerManager::getLogger()->error('Focus Module Name is not set for Link2 get side.');
}
if ($this->relationship->getLHSLink() == $this->name &&
($this->relationship->getLHSModule() == (isset($this->focus->module_name) ? $this->focus->module_name : null))
) {
return REL_LHS;
}
The ablove mentioned code has already the braces added. But still no luck on this
Frankly, I don’t remember that issue with the braces. :unsure:
Can you please check your logs? We need to know exactly what the problem is.
The problem of automatic changes in the database I can only see as coming from some discrepancy with the vardefs. Maybe you have something in custom directory that is causing the changes. This would only happen during a Quick Repair and Rebuild, and only if you pressed the button to sync the database with vardefs…
This is precisely the same issue and the fix is the same.
This issue impacts subpanels in every module as all the subpanels use SugarBean.php when pulling data. Where the user first encounters the error depends on what part of the CRM they use after the MySQL environment on their server is updated.
To fix:
In SuiteCRM/data/SugarBean.php
Replace
$final_query = ‘(’ . $tmp_final_query . ‘)’;
With
$final_query = $tmp_final_query ;
AND on line number 930
comment out:
$query = '(' . $query . ')';
Both changes are required to fix this issue.
The $final_query variable is used further in the code.