0

There was a similar post recently about a similar issue but I'm not positive they are related. I am having issues when trying to add or work with any contact in the system. The error is:

DB Error: no such field

I am unable to add or search any contacts. When I can view a contact, I'm unable to add contributions, groups, etc (but can see their contact info. Interestingly enough, users can use the front-end to create a contact or to make a contribution.

The problem seems to have started when updating to either 5.32.1 or 5.32.2 I noticed it after upgrading to 5.32.2 but not sure if it existed prior to this.

Our system:

Civicrm: 5.32.2

Database Type   mysql
Database Version    5.5.5-10.3.27-MariaDB
Database Collation  utf8_general_ci
Database Connection Collation   utf8mb4_general_ci
PHP Version 7.3.25
Web Server  Apache
WebServer to PHP Interface  fpm-fcgi
Joomla! Version Joomla! 3.9.23 Stable

During debugging and Backtrace, I get the following: backTrace

#0 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()

#1 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))

#2 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/DB.php(997): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "\nSELECT id, title, frontend_title, description, frontend_description, visibi...")

#3 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "\nSELECT id, title, frontend_title, description, frontend_description, visibi...")

#4 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "\nSELECT id, title, frontend_title, description, frontend_description, visibi...", "DB_Error", TRUE)

#5 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))

#6 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(936): DB_common->raiseError(-19, NULL, NULL, "\nSELECT id, title, frontend_title, description, frontend_description, visibi...", "1054 ** Unknown column 'frontend_title' in 'field list'")

#7 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()

#8 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("\nSELECT id, title, frontend_title, description, frontend_description, visibi...")

#9 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2696): DB_common->query("\nSELECT id, title, frontend_title, description, frontend_description, visibi...")

#10 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("\nSELECT id, title, frontend_title, description, frontend_description, visibi...")

#11 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(457): DB_DataObject->query("\nSELECT id, title, frontend_title, description, frontend_description, visibi...")

#12 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(1564): CRM_Core_DAO->query("\nSELECT id, title, frontend_title, description, frontend_description, visibi...", TRUE)

#13 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Group.php(1072): CRM_Core_DAO::executeQuery("\nSELECT id, title, frontend_title, description, frontend_description, visibi...", (Array:1))

#14 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Edit/TagsAndGroups.php(93): CRM_Contact_BAO_Group::getGroupsHierarchy((Array:27), NULL, "- ", FALSE, FALSE)

#15 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Contact.php(801): CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm(Object(CRM_Contact_Form_Contact), 0, 3, FALSE, NULL, "Group(s)", "Tag(s)", NULL, "select")

#16 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(630): CRM_Contact_Form_Contact->buildQuickForm()

#17 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()

#18 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Contact), "display")

#19 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "display")

#20 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("display")

#21 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()

#22 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(285): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))

#23 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))

#24 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))

#25 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:3))

#26 /home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()

#27 /home/ourdirectory/public_html/libraries/src/Component/ComponentHelper.php(402): require_once("/home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm.php")

#28 /home/ourdirectory/public_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/home/ourdirectory/public_html/administrator/components/com_civicrm/civicrm.php")

#29 /home/ourdirectory/public_html/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")

#30 /home/ourdirectory/public_html/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()

#31 /home/ourdirectory/public_html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication->doExecute()

#32 /home/ourdirectory/public_html/administrator/index.php(51): Joomla\CMS\Application\CMSApplication->execute()

#33 {main}




Database Error Code: Unknown column 'frontend_title' in 'field list', 1054
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => 
SELECT id, title, frontend_title, description, frontend_description, visibility, parents, saved_search_id
FROM   civicrm_group
WHERE  id IN (28,6,20,3,41,31,42,32,30,34,35,39,23,17,26,5,36,27,9,29,15,12,25,2,1,24,8)
 ORDER BY title [nativecode=1054 ** Unknown column 'frontend_title' in 'field list']
    [type] => DB_Error
    [user_info] => 
SELECT id, title, frontend_title, description, frontend_description, visibility, parents, saved_search_id
FROM   civicrm_group
WHERE  id IN (28,6,20,3,41,31,42,32,30,34,35,39,23,17,26,5,36,27,9,29,15,12,25,2,1,24,8)
 ORDER BY title [nativecode=1054 ** Unknown column 'frontend_title' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT id, title, frontend_title, description, frontend_description, visibility, parents, saved_search_id
FROM   civicrm_group
WHERE  id IN (28,6,20,3,41,31,42,32,30,34,35,39,23,17,26,5,36,27,9,29,15,12,25,2,1,24,8)
 ORDER BY title [nativecode=1054 ** Unknown column 'frontend_title' in 'field list']"]
)

I can basically see the issue is 'frontend_title' but am not sure how to correct it (or what caused it). Any pointers in the correct direction would be extremely appreciated.

9
  • This sounds like an upgrade problem where it didn't create the field. See civicrm.stackexchange.com/questions/34262/… and see if the answer there works.
    – Demerit
    Commented Jan 4, 2021 at 15:05
  • Demerit, Interestingly enough that seems to match, however, those columns are located within the table. Commented Jan 4, 2021 at 15:37
  • So you have frontend_title in civicrm_group? Are you able to confirm civi is using the same database that you're looking at, e.g. in civicrm.settings.php?
    – Demerit
    Commented Jan 4, 2021 at 15:50
  • Demerit, Thank You for the prompt response. The post referred to the civicrm_uf_group and that's where they columns were. I checked civicrm_group and the were not present. I did add them to that table, however, the issue still occurs. For debugging, this is what I am getting now: Commented Jan 4, 2021 at 17:33
  • Database Error Code: Unknown column 'frontend_description' in 'field list', 1054 Additional Details: Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle ) [code] => -19 [message] => DB Error: no such field [mode] => 16 [debug_info] => SELECT id, title, frontend_title, description, frontend_description, visibility, parents, saved_search_id FROM civicrm_group WHERE id IN (28,6,20,3,41,31,42,32,30,34,35,39,23,17,26,5,36,27,9,29,15,12,25,2,1,24,8) Commented Jan 4, 2021 at 17:36

2 Answers 2

1

The recommended way would be to restore from an earlier backup and then run the upgrade again. If you want to live on the edge:

  1. Make a backup of your current database so you can at least get back to current.
  2. In the database fool civi into thinking you have an old database from just before when this seems to have been a problem: UPDATE civicrm_domain SET version='5.29.0';
  3. Visit http://example.org/civicrm/upgrade?reset=1
  4. Try and see what happens.
2

The suggestion by Demerit worked. I was not aware but our most recent backup was corrupt. Following the "live on the edge" comment, I completed another back-up (not corrupt) and changed the version number. Then ran the update script and it upgraded properly.

Thank You Demerit for assisting with this!

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.