Translation issueshttps://lab.civicrm.org/dev/translation/-/issues2023-05-18T23:33:29Zhttps://lab.civicrm.org/dev/translation/-/issues/56Membership Types are accidentally translated on Find Membership2023-05-18T23:33:29ZbgmMembership Types are accidentally translated on Find Membership* Switch the locale to French
* Create a Membership Type called "Premium"
* Go to Find Membership screen
Result: "Premium" is displayed as "Cadeau" instead of the intended label.
cc @alainb* Switch the locale to French
* Create a Membership Type called "Premium"
* Go to Find Membership screen
Result: "Premium" is displayed as "Cadeau" instead of the intended label.
cc @alainbhttps://lab.civicrm.org/dev/translation/-/issues/20DB Error: no such table when executing schedule jobs2022-11-07T18:05:35ZYepaDB Error: no such table when executing schedule jobsWe've a single language installation with CiviCRM 5.6.1 & Drupal 7
After we've enabled the "Multiple Language" option under "Multiple Languages Support" section in the config page:
https://www.domain.org/civicrm/admin/setting/localiz...We've a single language installation with CiviCRM 5.6.1 & Drupal 7
After we've enabled the "Multiple Language" option under "Multiple Languages Support" section in the config page:
https://www.domain.org/civicrm/admin/setting/localization?reset=1
If we prepare a mailing with a language different from the language interface, when we execute the schedule jobs, we have the following error:
```
Feb 14 18:17:32 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -18
[message] => DB Error: no such table
[mode] => 16
[debug_info] => select id, extends, extends_entity_column_value, style from civicrm_custom_group__en_US where is_active = 1 [nativecode=1146 ** Table 'drupal.civicrm_custom_group__en_US' doesn't exist]
[type] => DB_Error
[user_info] => select id, extends, extends_entity_column_value, style from civicrm_custom_group__en_US where is_active = 1 [nativecode=1146 ** Table 'drupal.civicrm_custom_group__en_US' doesn't exist]
[to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="select id, extends, extends_entity_column_value, style from civicrm_custom_group__en_US where is_activ$
)
Feb 14 18:17:32 [info] $backTrace = #0 /var/www/drupal/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(232): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error))
#3 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "select id, extends, extends_entity_column_value, style from civicrm_custom_gr...")
#4 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), "select id, extends, extends_entity_column_value, style from civicrm_custom_gr...")
#5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL, -18, NULL, NULL, "select id, extends, extends_entity_column_value, style from civicrm_custom_gr...", "DB_Error", TRUE)
#6 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8))
#7 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#8 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB/common.php(1907): PEAR->raiseError(NULL, -18, NULL, NULL, "select id, extends, extends_entity_column_value, style from civicrm_custom_gr...", "DB_Error", TRUE)
#9 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-18, NULL, NULL, NULL, "1146 ** Table 'drupal.civicrm_custom_group__en_US' doesn't exist")
#10 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#11 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("select id, extends, extends_entity_column_value, style from civicrm_custom_gr...")
#12 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2415): DB_common->query("select id, extends, extends_entity_column_value, style from civicrm_custom_gr...")
#13 /var/www/drupal/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("select id, extends, extends_entity_column_value, style from civicrm_custom_gr...")
#14 /var/www/drupal/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(438): DB_DataObject->query("select id, extends, extends_entity_column_value, style from civicrm_custom_gr...")
#15 /var/www/drupal/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1411): CRM_Core_DAO->query("select id, extends, extends_entity_column_value, style from civicrm_custom_gr...", TRUE)
#16 /var/www/drupal/public_html/sites/all/modules/civicrm/drupal/modules/views/components/civicrm.core.inc(3119): CRM_Core_DAO::executeQuery("select id, extends, extends_entity_column_value, style from civicrm_custom_gr...")
#17 /var/www/drupal/public_html/sites/all/modules/civicrm/drupal/modules/views/civicrm.views.inc(87): _civicrm_core_data((Array:301), (Array:8))
#18 /var/www/drupal/public_html/sites/all/modules/contrib/views/includes/cache.inc(93): civicrm_views_data_alter((Array:301))
#19 /var/www/drupal/public_html/sites/all/modules/contrib/views/includes/cache.inc(37): _views_fetch_data_build()
#20 /var/www/drupal/public_html/sites/all/modules/contrib/views/views.module(1319): _views_fetch_data("twitter", FALSE, FALSE)
#21 /var/www/drupal/public_html/sites/all/modules/contrib/views/views.module(1655): views_fetch_data("twitter", FALSE)
#22 /var/www/drupal/public_html/sites/all/modules/contrib/views/includes/view.inc(277): views_move_table("twitter")
#23 /var/www/drupal/public_html/sites/all/modules/contrib/views/views.module(1643): view->update()
#24 /var/www/drupal/public_html/sites/all/modules/contrib/views/views.module(762): views_get_view("tweets")
#25 [internal function](): views_block_view("tweets-block")
#26 /var/www/drupal/public_html/includes/module.inc(934): call_user_func_array("views_block_view", (Array:1))
#27 /var/www/drupal/public_html/modules/block/block.module(911): module_invoke("views", "block_view", "tweets-block")
#28 /var/www/drupal/public_html/modules/block/block.module(690): _block_render_blocks((Array:1))
#29 /var/www/drupal/public_html/modules/block/block.module(319): block_list("footer3")
#30 /var/www/drupal/public_html/modules/block/block.module(270): block_get_blocks_by_region("footer3")
#31 /var/www/drupal/public_html/includes/common.inc(5914): block_page_build((Array:11))
#32 /var/www/drupal/public_html/includes/common.inc(2761): drupal_render_page("\n<div id=\"crm-container\" class=\"crm-container\" lang=\"en\" xml:lang=\"en...")
#33 /var/www/drupal/public_html/includes/common.inc(2634): drupal_deliver_html_page("\n<div id=\"crm-container\" class=\"crm-container\" lang=\"en\" xml:lang=\"en...")
#34 /var/www/drupal/public_html/includes/menu.inc(542): drupal_deliver_page("\n<div id=\"crm-container\" class=\"crm-container\" lang=\"en\" xml:lang=\"en...", "")
#35 /var/www/drupal/public_html/index.php(21): menu_execute_active_handler()
#36 {main}
```
The global $dbLocale is equal to '__en_US' because it's not correctly set in the public function setLocale($locale) of i18n.php. The $locale is equal to '_en_US' when the fatal error occurred.
```
/**
* Change the processing language without changing the current user language
*
* @param $locale
* Locale (for example 'en_US', or 'fr_CA').
* True if the domain was changed for an extension.
*/
public function setLocale($locale) {
// Change the language of the CMS as well, for URLs.
CRM_Utils_System::setUFLocale($locale);
// change the gettext ressources
if ($this->_nativegettext) {
$this->setNativeGettextLocale($locale);
}
else {
// phpgettext
$this->setPhpGettextLocale($locale);
}
// for sql queries
global $dbLocale;
$dbLocale = "_{$locale}";
}
```
"inherit locale" option is enabled and no cache error.
Here is the backtrace from setLocale function: [locale_not_well_set_error.txt](/uploads/29d6263e244abc1d0973ff4679463615/locale_not_well_set_error.txt)
I tried without sendgrid extension, the error was the same.