"Enable Multiple Languages" causes "Critical error"
Overview
After ticking the box "Enable Multiple Languages" on /civicrm/admin/setting/localization a white page with "Critical error. Please see server logs for errorID:218b8315a384" is being shown. This is a very fresh installation of CiviCRM (standalone) with no other extensions besides CiviReport.
Reproduction steps
- Go to Administer -> Localisation -> Languages, Currency, Locations -> tick "Enable Multiple Languages"
- Click Save.
Current behaviour
Apache error log:
[Mon Feb 03 14:04:42.062484 2025] [php:notice] [pid 45731] [client ::1:59618] errorID:218b8315a384\nInitialization Error:\nArray\n(\n [callback] => Array\n (\n [0] => CRM_Core_Error\n [1] => simpleHandler\n )\n\n [code] => -19\n [message] => DB Error: no such field\n [mode] => 16\n [debug_info] => SELECT name AS id, label AS label, name AS name, description AS description, is_active, component_id\nFROM civicrm_option_value\nWHERE (option_group_id = 85)\nORDER BY weight\n [nativecode=1054 ** Unknown column 'label' in 'field list']\n [type] => DB_Error\n [user_info] => SELECT name AS id, label AS label, name AS name, description AS description, is_active, component_id\nFROM civicrm_option_value\nWHERE (option_group_id = 85)\nORDER BY weight\n [nativecode=1054 ** Unknown column 'label' in 'field list']\n [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="SELECT name AS id, label AS label, name AS name, description AS description, is_active, component_id\nFROM civicrm_option_value\nWHERE (option_group_id = 85)\nORDER BY weight\n [nativecode=1054 ** Unknown column 'label' in 'field list']"]\n)\n, referer: https://XXXXXXXXX/civicrm/admin/setting/localization?reset=1
CiviCRM log:
2025-02-03 14:04:42+0000 [debug] $backTrace = #0 /var/www/html/core/CRM/Core/Error.php(249): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/core/vendor/pear/pear-core-minimal/src/PEAR.php(945): CRM_Core_Error::simpleHandler(Object(DB_Error))
#2 /var/www/html/core/vendor/pear/db/DB.php(1001): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT name AS id, label AS label, name AS name, description AS description, ...")
#3 /var/www/html/core/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT name AS id, label AS label, name AS name, description AS description, ...")
#4 /var/www/html/core/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR::_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT name AS id, label AS label, name AS name, description AS description, ...", "DB_Erro
r", TRUE)
#5 /var/www/html/core/vendor/pear/db/DB/common.php(1951): PEAR->__call("raiseError", (Array:7))
#6 /var/www/html/core/vendor/pear/db/DB/mysqli.php(964): DB_common->raiseError(-19, NULL, NULL, "SELECT name AS id, label AS label, name AS name, description AS description, ...", "1054 ** Unknown column 'label' in 'field list
'")
#7 /var/www/html/core/vendor/pear/db/DB/mysqli.php(413): DB_mysqli->mysqliRaiseError()
#8 /var/www/html/core/vendor/pear/db/DB/common.php(1241): DB_mysqli->simpleQuery("SELECT name AS id, label AS label, name AS name, description AS description, ...")
#9 /var/www/html/core/packages/DB/DataObject.php(2696): DB_common->query("SELECT name AS id, label AS label, name AS name, description AS description, ...")
#10 /var/www/html/core/packages/DB/DataObject.php(1829): DB_DataObject->_query("SELECT name AS id, label AS label, name AS name, description AS description, ...")
#11 /var/www/html/core/CRM/Core/DAO.php(529): DB_DataObject->query("SELECT name AS id, label AS label, name AS name, description AS description, ...")
#12 /var/www/html/core/CRM/Core/DAO.php(1798): CRM_Core_DAO->query("SELECT name AS id, label AS label, name AS name, description AS description, ...", TRUE)
#13 /var/www/html/core/CRM/Utils/SQL/Select.php(646): CRM_Core_DAO::executeQuery("SELECT name AS id, label AS label, name AS name, description AS description, ...", (Array:0), TRUE, NULL, FALSE, TRUE, FALSE)
#14 /var/www/html/core/Civi/Schema/EntityMetadataBase.php(177): CRM_Utils_SQL_Select->execute()
#15 /var/www/html/core/Civi/Schema/EntityMetadataBase.php(66): Civi\Schema\EntityMetadataBase->getSqlOptions((Array:7), FALSE)
#16 /var/www/html/core/Civi/Schema/EntityProvider.php(82): Civi\Schema\EntityMetadataBase->getOptions("preferred_language", (Array:0), FALSE, FALSE, NULL)
#17 /var/www/html/core/CRM/Core/DAO.php(2951): Civi\Schema\EntityProvider->getOptions("preferred_language", (Array:0), FALSE, FALSE)
#18 /var/www/html/core/CRM/Contact/BAO/Contact.php(3337): CRM_Core_DAO::buildOptions("preferred_language", NULL, (Array:0))
#19 /var/www/html/core/Civi/Api4/Generic/AbstractAction.php(596): CRM_Contact_BAO_Contact::buildOptions("preferred_language")
#20 /var/www/html/core/Civi/Api4/Generic/AbstractAction.php(309): Civi\Api4\Generic\AbstractAction->getLanguageOptions()
#21 /var/www/html/core/Civi/Api4/Event/Subscriber/ValidateFieldsSubscriber.php(42): Civi\Api4\Generic\AbstractAction->getParamInfo()
#22 [internal function](): Civi\Api4\Event\Subscriber\ValidateFieldsSubscriber->onApiPrepare(Object(Civi\API\Event\PrepareEvent), "civi.api.prepare", Object(Civi\Core\UnoptimizedEventDispatcher))
#23 /var/www/html/core/Civi/Core/Event/ServiceListener.php(53): call_user_func_array((Array:2), (Array:3))
#24 /var/www/html/core/vendor/symfony/event-dispatcher/EventDispatcher.php(230): Civi\Core\Event\ServiceListener->__invoke(Object(Civi\API\Event\PrepareEvent), "civi.api.prepare", Object(Civi\Core\UnoptimizedEventDispatcher))
#25 /var/www/html/core/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners((Array:13), "civi.api.prepare", Object(Civi\API\Event\PrepareEvent))
#26 /var/www/html/core/Civi/Core/CiviEventDispatcher.php(263): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Civi\API\Event\PrepareEvent), "civi.api.prepare")
#27 /var/www/html/core/Civi/API/Kernel.php(251): Civi\Core\CiviEventDispatcher->dispatch("civi.api.prepare", Object(Civi\API\Event\PrepareEvent))
#28 /var/www/html/core/Civi/API/Kernel.php(152): Civi\API\Kernel->prepare(Object(Civi\Api4\Provider\ActionObjectProvider), Object(Civi\Api4\Generic\DAOGetAction))
#29 /var/www/html/core/Civi/Api4/Generic/AbstractAction.php(256): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
#30 /var/www/html/core/CRM/Utils/System/Standalone.php(439): Civi\Api4\Generic\AbstractAction->execute()
#31 /var/www/html/core/CRM/Utils/System/Standalone.php(554): CRM_Utils_System_Standalone->getUserById(1)
#32 /var/www/html/core/CRM/Utils/System/Base.php(782): CRM_Utils_System_Standalone->getTimeZoneString()
#33 /var/www/html/core/CRM/Utils/System/Standalone.php(688): CRM_Utils_System_Base->setTimeZone()
#34 /var/www/html/core/CRM/Core/Config.php(91): CRM_Utils_System_Standalone->postContainerBoot()
#35 /var/www/html/core/Civi/Standalone/WebEntrypoint.php(51): CRM_Core_Config::singleton()
#36 /var/www/html/core/Civi/Standalone/WebEntrypoint.php(20): Civi\Standalone\WebEntrypoint::invoke()
#37 /var/www/html/index.php(35): Civi\Standalone\WebEntrypoint::index()
#38 {main}
Expected behaviour
A non-breaking CiviCRM system.
Environment information
- CiviCRM: Master 5.81.1
- PHP: 8.3
- CMS: Standalone
- Database: MySQL 8.0.41
- Web Server: Apache 2.4.52, Ubuntu 22.04
Comments
None.