0

CiviCRM 5.35.0 on Joomla 3.9.25

Search (basic, advanced or search builder) when I select a Group returns:

 "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: no such field"

I'm not sure when this started happening. We update regularly and haven't had any issues installing updates or running the db update function.

Error log has this:

    Mar 11 05:12:10  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params`
FROM civicrm_saved_search a
WHERE (`a`.`id` = "71")
 [nativecode=1054 ** Unknown column 'a.name' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params`
FROM civicrm_saved_search a
WHERE (`a`.`id` = "71")
 [nativecode=1054 ** Unknown column 'a.name' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`form_values` AS `form_values`, `a`.`mapping_id` AS `mapping_id`, `a`.`search_custom_id` AS `search_custom_id`, `a`.`api_entity` AS `api_entity`, `a`.`api_params` AS `api_params`
FROM civicrm_saved_search a
WHERE (`a`.`id` = "71")
 [nativecode=1054 ** Unknown column 'a.name' in 'field list']"]
)
7
  • If you have access to the MySQL database, could you copy-paste the output of show create table civicrm_saved_search ? It seems like a field is missing on that table, which is rather odd. The 'name' column was added in CiviCRM 2.1 and not changed since. Also, do you have detailed logging enabled?
    – bgm
    Mar 11, 2021 at 20:55
  • @bgm link Is that what you wanted to see?
    – Matt
    Mar 12, 2021 at 14:33
  • Oops, hit enter by accident. Yes, detailed logging is enabled. Here is the full log (too large to fit here) link
    – Matt
    Mar 12, 2021 at 14:38
  • It might be the 5.32 upgrade like Demerit mentioned, but if not, you may want to check that the log table also has the new column. In the above I don't see the "show create table" output? You might want to compare with show create table log_civicrm_saved_search.
    – bgm
    Mar 12, 2021 at 19:09
  • Edit: actually, it's unlikely to be a log table issue, since it's a SELECT query, not an UPDATE/INSERT. So more likely to be the 5.32 update issue that Demerit mentioned. Can you also report the output of select version from civicrm_domain?
    – bgm
    Mar 12, 2021 at 19:15

2 Answers 2

0

It sounds like the 5.32 upgrade didn't complete properly. See https://github.com/civicrm/civicrm-core/blob/0cc012c6d478a2602db3720117b39fff3799b7f7/CRM/Upgrade/Incremental/php/FiveThirtyTwo.php#L89

0

It might be that the column that you are trying to get in your saved search no longer exists? It is trying to find a record in the table civicrm_saved_search with and id of 71. Can you check if that record exists and what it looks like?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.