Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor "applyLocale" and remove references to "language" column in UFMatch table #18049

Merged
merged 1 commit into from
Aug 5, 2020

Conversation

christianwach
Copy link
Member

Overview

Fixes issues raised in this ticket on Lab.

Before

  • CRM_Core_BAO_ConfigSetting::applyLocale() does not apply the desired locale when inheritLocale is specified.
  • CRM_Core_BAO_ConfigSetting::applyLocale() reads and saves the locale in the UFMatch table with no discernible use case in doing so.
  • CRM_Admin_Form_Setting_Localization::onChangeLcMessages() saves the locale in the UFMatch table for the contact/user that saves the setting, again with no discernible effect.

After

  • CRM_Core_BAO_ConfigSetting::applyLocale() correctly applies the desired locale when inheritLocale is specified.
  • CRM_Core_BAO_ConfigSetting::applyLocale() and CRM_Admin_Form_Setting_Localization::onChangeLcMessages() no longer touch the language column in the UFMatch table.

Technical Details

See this ticket on Lab for full discussion.

tl;dr This PR fixes a regression where CRM_Core_BAO_ConfigSetting::applyLocale() no longer applies the desired locale when inheritLocale is specified and removes references to the seemingly-unused language column in the UFMatch table.

Comments

  • I don't know how to create the upgrade script to remove the column from the table itself.
  • I'm not sure how to write tests for this.

@civibot
Copy link

civibot bot commented Aug 3, 2020

(Standard links)

@civibot civibot bot added the master label Aug 3, 2020
@mattwire
Copy link
Contributor

mattwire commented Aug 3, 2020

I think we can leave the upgrader step for a later version of CiviCRM - in case there are any wierd and wonderful customisations that still use it they won't break immediately (or at least won't lose the data).

@christianwach
Copy link
Member Author

@mattwire Ah yes, good point!

@eileenmcnaughton
Copy link
Contributor

@mattwire @mlutfy @seamuslee001 we talked about getting this merged before the next rc is cut - does anyone feel comfortable enough with this to merge?

@mattwire
Copy link
Contributor

mattwire commented Aug 5, 2020

Yes, I'm happy with this. I've got it running on a couple of sites. Anyone using multiple languages should do a little extra testing on 5.29 to check everything works ok @kcristiano @aydun @MikeyMJCO @mlutfy

@mattwire mattwire merged commit b7fa17a into civicrm:master Aug 5, 2020
@christianwach christianwach deleted the lab-core-1891 branch March 22, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants