Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.6, 4.5
-
Fix Version/s: 4.6
-
Component/s: Drupal Integration Modules
-
Labels:
-
Documentation Required?:None
Description
When editing CiviCRM profile in user/xx/edit/Profile name, if we switch the language, the page is not found. The reason is we use the profile tille (which is translated) in the url.
I think we should use the name of the profile instead so that the url is the same in every languages.
Configuration :
- CiviCRM with Drupal,
- multilingual mode with 2 languages (fr_CA, en_CA)
- Inherit CMS language
- Some profiles that are used to "View/Edit Drupal User Account"
Attachments
Issue Links
- is supplemented by
-
CRM-15952 Edit screen fails when user uf_group name is not unique
-
- Done/Fixed
-
It seems to be a feature because in CRM_Core_BAO_UFGroup::getModuleUFGroup there is a special if to return title instead of the name field when the name field needs to be returned.
I don't get why it's like that but it's seems a little counter intuitive.
There are several places that uses getModuleUFGroup, so it's quite difficult to see what the impact of changing this will be. Here is a list of impacted files :
drupal/civicrm.module: $allUFGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('User Account', 0, TRUE);
drupal/civicrm_user.inc: $allUFGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('User Account', 0, TRUE, CRM_Core_Permission::VIEW, array('id', 'name', 'title', 'is_active'));
drupal/civicrm_user.inc: $ufGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('User Account', 0, TRUE);
CRM/UF/Page/Group.php: $allUFGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup();
CRM/Core/BAO/UFGroup.php: $ufGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('User Registration');
CRM/Core/BAO/UFGroup.php: $ufGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('Profile');
CRM/Core/BAO/UFGroup.php: public static function getModuleUFGroup($moduleName = NULL, $count = 0, $skipPermission = TRUE, $op = CRM_Core_Permission::VIEW, $returnFields = NULL) {
CRM/Contact/Form/Search/Criteria.php: $ufGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('Search Profile', 1);
CRM/Profile/Form.php: $ufGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('User Registration');
CRM/Profile/Page/View.php: $ufGroups = CRM_Core_BAO_UFGroup::getModuleUFGroup('Profile');