mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
Database Failure after upgrading to Version 7.11.4 #3719
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#3719
Loading…
Add table
Add a link
Reference in a new issue
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?
Originally created by @mattlt on GitHub (May 7, 2019).
Originally assigned to: @Dillon-Brown on GitHub.
Issue
Project and Project Task module are not showing panels for History, Accounts, etc. Giving a "Database Failure." instead.
It showing up for me in the Project and Project Task pages after a task is updated. Projects and tasks that don't have any new changes seem to show up fine.
Expected Behavior
Panels should be included on the page and no database error.
Actual Behavior
Here's the full error from sugarcrm.log for a Project…
Here's the full error from sugarcrm.log for a Project Task…
Steps to Reproduce
Context
Major, Fatal Error.
Cannot create new tasks or relationships from a Project or Project Task due to the panels not showing up.
Your Environment
@mattlt commented on GitHub (May 7, 2019):
At least one other person is having the same issue…
https://suitecrm.com/suitecrm/forum/installation-upgrade-help/24551-database-failure-after-upgrading-to-version-7-11-4
@mattlt commented on GitHub (May 8, 2019):
It looks like I'm only getting the database failure error when there's an open task for a Project or a Project Task. If I close all the tasks for the Project, the Project's page loads normally.
The moment I open up a new task for the Project I get the database failure error again.
Thanks,
•• matt
@kunsirat-kps commented on GitHub (May 9, 2019):
I have similar issue. I could not access any case that includes opening tasks and getting the database failure error. In the log, it mentions that ...MySQL error 1054: Unknown column 'tasks.date_end' in 'field list'. And if I have changed this file modules/Tasks/metadata/subpanels/ForActivities.php to be like this:
'date_due' => array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
'alias' => 'date_due',
'sort_by' => 'date_due',
),
Then I could access case but task due date is still not be shown in the list view of Activity panel.

@mattlt commented on GitHub (May 9, 2019):
Thank you so much Kunsirat-kps! That got our activities panel back. It's true that the task due date doesn't show, but at least the page works now.
Thanks again!
•• matt
@tellmewhy99 commented on GitHub (May 15, 2019):
Hello guys, we also have the same issue after upgraded to 7.11.4
Our's one is MySQL error 1054: Unknown column 'contact_event_attendees.account_id' in 'where clause' , any solution for this please?
@sospc commented on GitHub (May 15, 2019):
Exactly the same error happens here. Anyone found a fix already?
For me this workaround works.
'date_due' => array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
'alias' => 'date_start',
'sort_by' => 'date_start',
),
Thanks Kunsirat and Mattlt
@pgorod commented on GitHub (May 16, 2019):
Possibly related: https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/24647-database-failure-product-view
@aalcaine commented on GitHub (May 17, 2019):
Same issue happens to us (same error and steps to reproduce). I think it's well documented in this issue, but if need more info and logs, just tell and I'll post them here.
@riotctrl commented on GitHub (Jun 5, 2019):
Were you able to get a due date to show up there for tasks?
@xavmp commented on GitHub (Jun 5, 2019):
Today I applied the Update…..
Error still there, no fix.
@kunsirat-kps commented on GitHub (Jun 6, 2019):
@riotctrl for Tasks, I never get a due date to show up on subpanel view
@markbond1007 commented on GitHub (Jun 13, 2019):
HI,
I had added Activities to Events and after the upgrade to 7.11.5 I had this problem (couldnt even get through to the event). I changed the entry to date_due and the page works again, but no Due date in the sub panel. I would also point out that the ForHistory subpanel already has "date_due" in it and it also isnt displaying the date.
Regards
Mark
@macroplan commented on GitHub (Jun 15, 2019):
Upgrade to 7.11.5 - the error persists for me also. Was able "get by" with help from kunsirat-kps fix above. Thanks! I would rather not show the due date on tasks within a project rather than have the database error break display of all sub-panels
@Dillon-Brown commented on GitHub (Jul 4, 2019):
Hi guys, I've put up a potential fix for this here: #7517. Let me know if you encounter any issues, thanks.
@markbond1007 commented on GitHub (Jul 4, 2019):
@Dillon-Brown
Hi Just checked through this, however I note that your fix is for the File:
modules/Meetings/metadata/subpanels/ForHistory.php
The file I had to change was:
modules/Tasks/metadata/subpanels/ForActivities.php
I may be missing something, but I think this may only be a partial fix.
@Dillon-Brown commented on GitHub (Jul 4, 2019):
@markbond1007 I think you would be able to edit either due_date in
ForActivitiesorForHistory.phpand it would resolve the db error. Although it does look like while my fix resolves the db and missing due_date from activities it removes due date from history... I'll take another look.@Dillon-Brown commented on GitHub (Jul 4, 2019):
Pushed a new commit, seems to resolve the issue for me on both subpanels.
@evgu commented on GitHub (Jul 9, 2019):
@Dillon-Brown we had the same issue and tried testing as per suggested patch #7517 above.
updating modules/Meetings/metadata/subpanels/ForHistory.php as per patch #7517 resolved some of the errors related to history panel, but errors remained related to activities panel.
We made the following update to modules/Meetings/metadata/subpanels/ForActivities.php which finally resolved remaining errors:
Please review this fix as our testing shows that both ForHistory.php and ForActivities.php need to be corrected
@Dillon-Brown commented on GitHub (Jul 26, 2019):
@evgu Confirmed, thanks!
@gody01 commented on GitHub (Apr 29, 2020):
This error still exsists in 7.11.6
Root cause:
Tasks has: date_due column
Meetings has: date_end column
In activites SuiteCRM tires to display different columns, but it failes.
Even with changes:
[root@crm3 custom]# diff modules/Tasks/metadata/subpanels/ForActivities.php ../modules/Tasks/metadata/subpanels/ForActivities.php -u
--- modules/Tasks/metadata/subpanels/ForActivities.php 2020-04-29 12:54:03.895998391 +0200
+++ ../modules/Tasks/metadata/subpanels/ForActivities.php 2020-04-06 13:48:01.251391032 +0200
@@ -76,8 +76,8 @@
'date_due' => array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
AND
--- modules/Meetings/metadata/subpanels/ForActivities.php 2020-04-29 12:51:38.693102421 +0200
+++ ../modules/Meetings/metadata/subpanels/ForActivities.php 2020-04-06 13:48:01.051388399 +0200
@@ -93,8 +93,8 @@
'date_end'=>array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
Only date for one or another is diplsayed in Activites, not both.
Simplest soluton would be, to change column name in either tasks or meetings DB defintion and have same definition in metadata for this date.
@pgorod commented on GitHub (Apr 29, 2020):
Whoever takes up this issue, please be very careful, we're on a succession of fix->regression->fix->regression->fix... this can't go on forever. So the fix needs to make sure it doesn't bring back the previous bug in some other module or view.
@gody01 commented on GitHub (Apr 29, 2020):
I just looked at the query in log and it seems, that maping in metadata somehow does not work for Meetings.
In Calls module ForActivities.php has this definition:
'date_end'=>array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
'alias' => 'date_due',
'sort_by' => 'date_due'
),
and in query there is: calls.date_end as date_due
if I make the same for Meetings module
'date_end'=>array(
'vname' => 'LBL_LIST_DUE_DATE',
'width' => '10%',
'alias' => 'date_due',
'sort_by' => 'date_due'
),
I get in query:
meetings.date_due as date_due
It looks like qeury buildr takes aliases for column name ...