0

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

1 Answer 1

0

Yeah, I had that too. You need to do an upgrade of the database on the extensions page.

3
  • This worked to resolve the DB Error, thanks! Unfortunately, I am back to square one on the "Could not identify any recipients. Perhaps your test group is empty..." error when trying to send messages.
    – SunriseGV
    Jun 13, 2022 at 15:43
  • hmm, I had that too. Which was caused by something completely different. We might need to make this a different topic if you have the same. One of my mailing groups had a smart group as subgroup. That makes the whole mailing group a smart group. Something went wrong with calculating it, so I had to give it another parent. Then the original Mailing group worked again.
    – Catorghans
    Jun 14, 2022 at 16:06
  • Interesting - yes, I opened another question here: civicrm.stackexchange.com/questions/42099/… So far I have been able to track the error I am receiving to some sort of denied auth request in the SparkPost mailing. It sounds like this error message has been around for a while and encompasses a huge number of issues. Not sure if more specific debugging info is logged anywhere. Didn't immediately see it in the CiviCRM ConfigAndLog
    – SunriseGV
    Jun 14, 2022 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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