Basic Problem
When attempting to send a basic traditional mailing (though it also occurs in Mosaico), attempting to send a test email to a single address or a group fails, showing an error that says "DB error: no such table". Based on debugging info, the table it is trying to access in my WordPress mySQL DB is "civicrm_search_segment" which does not show up in PHPmyAdmin for my Civi DB. Why is this table missing/why is the mailing failing?
More debugging info
- CiviCRM version: 5.50.1 (problem occurred directly after upgrading from 5.49.4, see section below)
- WordPress version: 6.0
- mySQL version: 5.7.32
- PHP Version: 7.40.30
- Specific error text (see below)
History of the problem:
We started on CiviCRM Spark, and were able to send mailings there through our Gmail account. We decided to switch to a full CiviCRM hosted on a new WordPress site. We migrated from Spark (on Drupal) to the new WordPress site. The migration went okay, except that I could not get the connection to our Gmail account to work. (One note here: during the migration, I created a new mySQL database in PHPMyAdmin separate from my CMS' database, imported the old Spark mySQL DB, and then changed Civi's config to point to the new database) I went through the process of connecting Gmail via OAuth, and was able to successfully test the account as a Mail account (Administer > CiviMail > Mail Accounts) for bounce processing. I also manually entered the address as our FROM address. This was all in CiviCRM Version 5.49.4 (for WordPress).
When I would try to send test emails, I would get an error saying "Could not identify any recipients. Perhaps the group is empty?" (as mentioned in other questions, [like this one][1]). I attempted multiple fixes, from recreating the mailing, ensuring the To addresses were not marked as "On Hold", checking all tokens in the email for missing brackets, recreating the OAuth connection (using GCP and the Civi OAuth extension). Nothing fixed the problem. The last solution I tried was upgrading Civi from 5.49.4 to 5.50.1, which led me to this problem.
Thanks much in advance!
Specific Error from log:
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -18
[message] => DB Error: no such table
[mode] => 16
[debug_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`description` AS `description`, `a`.`entity_name` AS `entity_name`, `a`.`items` AS `items`
FROM civicrm_search_segment a
ORDER BY `label` ASC
[nativecode=1146 ** Table '\<mySQL DB ID\>.civicrm_search_segment' doesn't exist]
[type] => DB_Error
[user_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`description` AS `description`, `a`.`entity_name` AS `entity_name`, `a`.`items` AS `items`
FROM civicrm_search_segment a
ORDER BY `label` ASC
[nativecode=1146 ** Table '\<mySQL DB ID\>.civicrm_search_segment' doesn't exist]
[to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`description` AS `description`, `a`.`entity_name` AS `entity_name`, `a`.`items` AS `items`
FROM civicrm_search_segment a
ORDER BY `label` ASC
[nativecode=1146 ** Table '\<mySQL DB ID\>.civicrm_search_segment' doesn't exist]"]
)```
[1]: https://civicrm.stackexchange.com/questions/10671/mailing-issue-could-not-identify-any-recipients-perhaps-the-group-is-empty