We're seeing the error: "DB Error: no such field" when trying to send email from Mosaico. This happens regardless of whether the email is a test, or going out to the intended recipients. The error appears immediately upon submitting the mailing.
We're also unable to view old mailings submitted via Mosico, with the same error appearing but as a webpage rather than a pop-up.
This started happening after we upgraded CiviCRM from 5.39.0 to 5.46.0.
"Traditional" mails are working fine (sending and viewing)
I've done a few basic things to fix the problem with no success:
The error that appears while sending the mailing doesn't leave anything in the error log. I do get the following when viewing old mailings though:
Mar 11 16:35:20 [error]
$Fatal Error Details = array:3 [
"message" => "DB Error: no such field"
"code" => null
"exception" => CiviCRM_API3_Exception {#3486
-extraParams: array:4 [
"error_code" => "no such field"
"tip" => "add debug=1 to your API call to have more info about the error"
"is_error" => 1
"error_message" => "DB Error: no such field"
]
#message: "DB Error: no such field"
#code: 0
#file: ".../sites/all/modules/civicrm/api/api.php"
#line: 134
trace: {
/.../sites/all/modules/civicrm/api/api.php:134 {
› if (is_array($result) && !empty($result['is_error'])) {
› throw new CiviCRM_API3_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result);
› }
}
/.../sites/all/modules/civicrm/CRM/Mailing/Page/View.php:148 { …}
/.../sites/all/modules/civicrm/CRM/Core/Invoke.php:319 { …}
/.../sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
/.../sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
/.../sites/all/modules/civicrm/drupal/civicrm.module:471 { …}
/.../domains/secure/htdocs/includes/menu.inc:527 { …}
/.../domains/secure/htdocs/index.php:21 { …}
}
}
]
Mar 11 16:35:20 [debug] $backTrace = #0 /.../domains/secure/htdocs/sites/all/modules/civicrm/CRM/Core/Error.php(433): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /.../domains/secure/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))
#2 /.../domains/secure/htdocs/sites/all/modules/civicrm/drupal/civicrm.module(471): CRM_Core_Invoke::invoke((Array:3))
#3 /.../domains/secure/htdocs/includes/menu.inc(527): civicrm_invoke("mailing", "view")
#4 /.../domains/secure/htdocs/index.php(21): menu_execute_active_handler()
#5 {main}
Environment:
Following a manual upgrade from 5.32.0 to 5.39.0, a contacts "summary" tab appears twice in the same window as per the attached screenshot (1). When another tab is selected, the summary fields remain visible off to one side.
Problem solved. Turns out it was a bit of code in a custom template that was causing the issue. My colleague added the below code years ago in order to get membership and group info to display on a contacts summary page. Not caused an issue until now. Reverted back to the normal template and everything works fine.
On the plus side, @kcristiano give me a kick to get other things updated
<div class="crm-summary-row">
<div class="crm-label">{ts}Groups{/ts}</div>
<div class="crm-content crm-contact_type_label">
{crmAPI var="groups" entity="GroupContact" action="get" version="3" contact_id=$contactId }
{foreach from=$groups.values item=group}
<a title="View group members" class="user-record-link"
href="/civicrm/group/search?force=1&context=smog&gid={$group.group_id}" target="_blank">{$group.title}</a>,
{/foreach}
</div>
</div>
Following a manual upgrade from 5.32.0 to 5.39.0, a contacts "summary" tab appears twice in the same window as per the attached screenshot (1). When another tab is selected, the summary fields remain visible off to one side.